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-44892] DescribableModel customization #43

Merged

Conversation

jglick
Copy link
Member

@jglick jglick commented Apr 9, 2019

JENKINS-44892: API permitting plugins which define structs to fine-tune how their surface form is presented, particularly in Pipeline Groovy.

@jglick jglick marked this pull request as ready for review April 9, 2019 14:43
Copy link
Member

@daspilker daspilker left a comment

Choose a reason for hiding this comment

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

This change would only have limited effect on Job DSL. It is not possible to pass arbitrary arguments to DescribableModel.instantiate as it is possible in Pipeline (from what I understand). Job DSL does strict checks to allow only DescribableParameters to be passed as arguments for instantiation. The change will help to provide better backwards-compatibility like for JENKINS-51638, but it will not be possible to mitigate a removed DataBoundSetter. IMHO this change provides a missing hook, but does not address all use cased mentioned in JENKINS-44892, especially I do not see how the GerritTrigger case could be handled for Job DSL.

@jglick
Copy link
Member Author

jglick commented Apr 10, 2019

It is not possible to pass arbitrary arguments to DescribableModel.instantiate as it is possible in Pipeline (from what I understand). Job DSL does strict checks to allow only DescribableParameters to be passed as arguments for instantiation.

I think if JENKINS-33217 were implemented properly (inside DescribableModel.instantiate, after processing by CustomDescribableModel) this code could be deleted from job-dsl and customizations such as the hypothetical GerritTrigger example could be supported by workflow-cps and job-dsl equally.

@dwnusbaum dwnusbaum merged commit 44d3265 into jenkinsci:master Apr 25, 2019
@jglick jglick deleted the CustomDescribableModel-JENKINS-44892 branch April 25, 2019 16:55
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.

4 participants