Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51603

workDirSettings in JNLPLauncher requirements are too strict, CasC plugin is impacted

    • Jenkins 2.126

      See https://github.com/jenkinsci/configuration-as-code-plugin/issues/233

      Currently the CasC plugin does not offer compatibility for old-style logic using @DataBoundConstructor. If a plugin configuration gets updated (new constructor, old is deprecated), the plugin just fails if newly introduced fields are non-null.

          [JENKINS-51603] workDirSettings in JNLPLauncher requirements are too strict, CasC plugin is impacted

          Oleg Nenashev created issue -
          Oleg Nenashev made changes -
          Assignee New: Oleg Nenashev [ oleg_nenashev ]
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          The actual issue is that JNLPLauncher's workDirSettings is declared @Nonnull https://github.com/jenkinsci/jenkins/blob/393680beb5d64628bdf8d9e5bf8daf4cab2191ad/core/src/main/java/hudson/slaves/JNLPLauncher.java#L69-L77  while it's actually nullable, as a default value can be safely computed (as done by deprecated constructor)

           

          also read https://github.com/jenkinsci/jep/pull/111

          Nicolas De Loof added a comment - The actual issue is that JNLPLauncher's workDirSettings is declared @Nonnull  https://github.com/jenkinsci/jenkins/blob/393680beb5d64628bdf8d9e5bf8daf4cab2191ad/core/src/main/java/hudson/slaves/JNLPLauncher.java#L69-L77   while it's actually nullable, as a default value can be safely computed (as done by deprecated constructor)   also read  https://github.com/jenkinsci/jep/pull/111

          Oleg Nenashev added a comment -

          Yep, I am going to remove the non-null requirement

          Oleg Nenashev added a comment - Yep, I am going to remove the non-null requirement
          Oleg Nenashev made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]

          Oleg Nenashev added a comment -

          Created https://github.com/jenkinsci/jenkins/pull/3463
          IMHO it deserves backporting

          Oleg Nenashev added a comment - Created https://github.com/jenkinsci/jenkins/pull/3463 IMHO it deserves backporting
          Oleg Nenashev made changes -
          Remote Link New: This issue links to "https://github.com/jenkinsci/jenkins/pull/3463 (Web Link)" [ 20768 ]
          Oleg Nenashev made changes -
          Remote Link New: This issue links to "Workaround in JCasC (Web Link)" [ 20769 ]

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/slaves/JNLPLauncher.java
          http://jenkins-ci.org/commit/jenkins/229ed44a535034e045005bca942ed04a3093c91c
          Log:
          JENKINS-51603 - Relax workDirectory requirements for a JNLPLauncher constructor

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/slaves/JNLPLauncher.java http://jenkins-ci.org/commit/jenkins/229ed44a535034e045005bca942ed04a3093c91c Log: JENKINS-51603 - Relax workDirectory requirements for a JNLPLauncher constructor

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: