[JENKINS-60500] - Promotion API Plugin PoC #145
Draft
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.
This is a draft pull request which explores ways to split the plugin to two ones.
Promotion
's Permission entities look to be a major showstopper on this way, but just in case.Research summary:
Promotion
is unsolvable knot if we want to retain binary compatibilityPromotion
class has to be in promotion APIPromotion
is also a persisted object on the disk. We could use XStream features to rename the class and move all run entries. It would split the class to two... somehowPromotion
andPromotionProcess
are a part of the API used by other plugins. Class Renaming will not help unless full interface is retained. It includes fields, and hence it has to be class inheritance. Hence we have to keeppublic abstract class PromotionProcess extends AbstractProject<PromotionProcess,Promotion> implements Saveable, Describable<PromotionProcess>
in promotion API with class relocationAbstractClass#getBuildClass()
requires an exact class. And this is the end of the story for us, because the template declaresPromotionProcess
, and hence splitting classes is not possible.So it is not possible to retain binary compatibility and to avoid pbreaking changes, at least without sophisticated Jenkins core patches.