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

Change how build is resolved without keeping a reference to project. #74

Closed

Conversation

J-cztery
Copy link
Contributor

Inspired by DavidTanner #51
There does not seem to be happening much in that pull request so trying to get this stuff merged.

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

AbstractProject<?,?> j = parent.getOwner();
if (j==null) return null;
return j.getBuildByNumber(number);
return resolve();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what was the idea of the original method. Probably the idea was to make it static.
I'll check the code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what are you referring to. Are you talking about long term plans?

@J-cztery
Copy link
Contributor Author

oleg-nenashev: I had a slightly deeper look at the code of promoted-builds-plugin and I agree with your comment: "Keeping of a project is definitely a wrong thing from the data persistence perspective. It cannot be merged in the current state".
That is exactly what is causing the problem. JobPropertyImpl in promoted builds plugin keeps the reference to the project it is in (owner).

Inheritance plugin when asked for a collection of JobProperties or for a specific type of property just gets one of the properties from base projects(or merges them somehow, this logic can be different for every plugin).

So whenever promotion has been configured on project A it will cause problems in project B that inherits from A because the JobPropertyImpl will still have project A as owner, even though it is now in project B, technically.

I will need to think about a better solution to this problem than this... So please do not merge it for now.

@J-cztery J-cztery closed this Nov 21, 2015
@J-cztery J-cztery deleted the CHANGE_HOW_BUILD_IS_RESOLVED branch November 21, 2015 05:59
@oleg-nenashev oleg-nenashev added this to the 2.24 milestone Nov 24, 2015
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.

3 participants