Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upUpdated documentation for JNLP slaves for newer Jenkins versions #167
Conversation
| @@ -4,6 +4,8 @@ Build agents configuration belongs (currently) under `jenkins` root element | |||
|
|
|||
| ## sample configuration | |||
|
|
|||
| ### Jenkins versions < 2.68 | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
MadsNielsen
Apr 5, 2018
Author
Member
That is a fair point, do we have a policy about this as at all?
I'd prefer to keep it for now, until we jot down and agree on a backwards compatibility strategy, and agree on updating the Jenkins version in the pom at regular intervals.
One thing i'm willing to do is to move the newest configuration to the top, and mark the old configuration deprecated so that the first thing you see is the most recent configuration.
This comment has been minimized.
This comment has been minimized.
| remoteFS: "/home/user1" | ||
| launcher: | ||
| jnlp: | ||
| workDirSettings: |
This comment has been minimized.
This comment has been minimized.
| @@ -4,6 +4,8 @@ Build agents configuration belongs (currently) under `jenkins` root element | |||
|
|
|||
| ## sample configuration | |||
|
|
|||
| ### Jenkins versions < 2.68 | |||
This comment has been minimized.
This comment has been minimized.
|
The plugin needs workDir settings as a mandatory dependency, because the field is marked as Nonnull here: https://github.com/jenkinsci/jenkins/blob/393680beb5d64628bdf8d9e5bf8daf4cab2191ad/core/src/main/java/hudson/slaves/JNLPLauncher.java#L69-L77 . There is a default constructor which does not require working directory, but IIUC this plugin is unable to discover that constructor. It may be a serious compatibility issue for the CasC design - many plugins evolve by creating new constructors and deprecating existing ones. In such case the user's configuration YAML will be broken during update. @MadsNielsen @ewelinawilkosz @ndeloof My proposal would be to see whether it is possible to update the plugin to heck for deprecated public constructor in order to retain compatibility in such case |
|
config-as-code assumes databound constructor do cleanly reflect the component requirements. |
|
OK |
|
Obviously, we could modify Jenkins Core in this particular case. |
|
I also expect plugin developer could take more care not changing DataBoundConstructor but for newly introduced required parameters. They can rely on DataBoundSetters to introduce optional parameters. AFAICT changing constructor has been used a lot in the past because we missed this option. |
|
|
Just like a public constructor parameter and associated getter for databinding, right ?
As long as you don't explose it as a mutable data structure on getter, that shouldn't be an issue. Same issue applies in many places with data migration from |
|
just to make sure - cause there was a long discussion in this PR - is it ok to merge that one? |
|
IMHO we need #234 instead, but I am fine with the merge if it helps to move forward |
|
I'm just trying to clean up, haven't got to #234 yet |
|
I'm fine with not merging this, if we can merge #234. I like @oleg-nenashev elegant solution. It's glue code for the first period, until people start writing proper plugins with correct use of @DataBound. |
|
@MadsNielsen It can be closed once #234 is released |
|
#234 merged, closing this one as decided above |
MadsNielsen commentedApr 5, 2018
Found out while creating a demo, that recent changes in remoting requires a new configuration for JNLP slaves.
So i updated the documentation with the new tidbits.