Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-60500] - Promotion API Plugin PoC #145

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

oleg-nenashev
Copy link
Member

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 compatibility

  • Permission engine in Jenkins relies on Permission Groups, which reference class explicitly. In order to retain Permissions Promotion class has to be in promotion API
  • Promotion 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... somehow
  • Promotion and PromotionProcess 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 keep public abstract class PromotionProcess extends AbstractProject<PromotionProcess,Promotion> implements Saveable, Describable<PromotionProcess> in promotion API with class relocation
  • AbstractClass#getBuildClass() requires an exact class. And this is the end of the story for us, because the template declares PromotionProcess, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant