[JIRA] (JENKINS-60500) Break out the Promotion API plugin

6 views
Skip to first unread message

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 16, 2019, 7:33:02 AM12/16/19
to jenkinsc...@googlegroups.com
Oleg Nenashev created an issue
 
Jenkins / Task JENKINS-60500
Break out the Promotion API plugin
Issue Type: Task Task
Assignee: Oleg Nenashev
Components: promoted-builds-plugin
Created: 2019-12-16 12:32
Priority: Minor Minor
Reporter: Oleg Nenashev

It would be great to have a new Promotion API plugin which includes shareable functionality from the Promoted Builds plugin. It would help us to reuse the plugin on instances without AbstractProject and Freestyle builds in the future

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 16, 2019, 7:35:04 AM12/16/19
to jenkinsc...@googlegroups.com
Oleg Nenashev started work on Task JENKINS-60500
 
Change By: Oleg Nenashev
Status: Open In Progress

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 27, 2019, 7:33:02 AM12/27/19
to jenkinsc...@googlegroups.com
Oleg Nenashev commented on Task JENKINS-60500
 
Re: Break out the Promotion API plugin

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.

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 27, 2019, 7:34:03 AM12/27/19
to jenkinsc...@googlegroups.com

My plan is to do refactoring as a single plugin at the moment

Reply all
Reply to author
Forward
0 new messages