Should throttledPipelinesByCategory be persisted to disk? #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am the new maintainer of this plugin and I am trying to understand the intended usage of
ThrottleJobProperty.DescriptorImpl#throttledPipelinesByCategory
. ShouldthrottledPipelinesByCategory
be persisted to disk or not?The current logic does not persist the descriptor to disk when
throttledPipelinesByCategory
is changed, but does persist the descriptor to disk (includingthrottledPipelinesByCategory
) whenever one happens to save the descriptor for some other reason, including hitting "Save" from the "Configure System" page. This behavior strikes me as inconsistent and possibly accidental. I can imagine two possible consistent implementations:throttledPipelinesByCategory
should be persisted to disk, then I think the current behavior [of persisting it only when other changes are made to the descriptor] is not sufficient. Rather, if this is the intention then I would expect us to persist the descriptor to disk whenever we modifythrottledPipelinesByCategory
. This draft PR is an example of such a change.throttledPipelinesByCategory
should not be persisted to disk, then I think the current behavior [of serializing the field to the XML file] is also incorrect. Rather, if this is the intention then I would expectthrottledPipelinesByCategory
to betransient
so that it is not serialized by XStream, perhaps with some migration logic to remove accidentally persisted entries.@abayer (since you originally wrote this code) and @oleg-nenashev (since you originally reviewed this code), could either of you shed some light into the intended behavior of
throttledPipelinesByCategory
? Should it be persisted to disk or not?