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

AbstractProject: makeDisabled() performs operations even if supportsMakeDisabled() is false

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core

      This bug is a follow-up to the discussion is https://github.com/jenkinsci/matrix-project-plugin/pull/5

      In my case it causes JENKINS-19179 for Matrix projects when jobs use Subversion SCM (JENKINS-24341)

          [JENKINS-24340] AbstractProject: makeDisabled() performs operations even if supportsMakeDisabled() is false

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - https://github.com/jenkinsci/jenkins/pull/1374

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/model/AbstractProject.java
          http://jenkins-ci.org/commit/jenkins/a78f1d3246cfdbee96820d5629dbb8676a3ca19a
          Log:
          [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false

          This changes prevents the improper usage of method without the preliminary supportsMakeDisabled() check.
          As an example, Subversion plugin behaves in such way (JENKINS-24341)

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/model/AbstractProject.java http://jenkins-ci.org/commit/jenkins/a78f1d3246cfdbee96820d5629dbb8676a3ca19a Log: [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false This changes prevents the improper usage of method without the preliminary supportsMakeDisabled() check. As an example, Subversion plugin behaves in such way ( JENKINS-24341 ) Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/model/AbstractProject.java
          http://jenkins-ci.org/commit/jenkins/a7cc2a1b3ad81c9c6279bd57732832800629cad1
          Log:
          Merge pull request #1374 from synopsys-arc-oss/JENKINS-24340

          [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false

          Compare: https://github.com/jenkinsci/jenkins/compare/afdbe73669d3...a7cc2a1b3ad8

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/model/AbstractProject.java http://jenkins-ci.org/commit/jenkins/a7cc2a1b3ad81c9c6279bd57732832800629cad1 Log: Merge pull request #1374 from synopsys-arc-oss/ JENKINS-24340 [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false Compare: https://github.com/jenkinsci/jenkins/compare/afdbe73669d3...a7cc2a1b3ad8

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3741
          [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false (Revision a78f1d3246cfdbee96820d5629dbb8676a3ca19a)

          Result = SUCCESS
          o.v.nenashev : a78f1d3246cfdbee96820d5629dbb8676a3ca19a
          Files :

          • core/src/main/java/hudson/model/AbstractProject.java

          dogfood added a comment - Integrated in jenkins_main_trunk #3741 [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false (Revision a78f1d3246cfdbee96820d5629dbb8676a3ca19a) Result = SUCCESS o.v.nenashev : a78f1d3246cfdbee96820d5629dbb8676a3ca19a Files : core/src/main/java/hudson/model/AbstractProject.java

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/model/AbstractProject.java
          http://jenkins-ci.org/commit/jenkins/1b0d8fb63aa98a666f656a60c4c6802c6d023dba
          Log:
          [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false

          This changes prevents the improper usage of method without the preliminary supportsMakeDisabled() check.
          As an example, Subversion plugin behaves in such way (JENKINS-24341)

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
          (cherry picked from commit a78f1d3246cfdbee96820d5629dbb8676a3ca19a)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/model/AbstractProject.java http://jenkins-ci.org/commit/jenkins/1b0d8fb63aa98a666f656a60c4c6802c6d023dba Log: [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false This changes prevents the improper usage of method without the preliminary supportsMakeDisabled() check. As an example, Subversion plugin behaves in such way ( JENKINS-24341 ) Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com> (cherry picked from commit a78f1d3246cfdbee96820d5629dbb8676a3ca19a)

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4292
          [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false (Revision 1b0d8fb63aa98a666f656a60c4c6802c6d023dba)

          Result = UNSTABLE
          ogondza : 1b0d8fb63aa98a666f656a60c4c6802c6d023dba
          Files :

          • core/src/main/java/hudson/model/AbstractProject.java

          dogfood added a comment - Integrated in jenkins_main_trunk #4292 [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false (Revision 1b0d8fb63aa98a666f656a60c4c6802c6d023dba) Result = UNSTABLE ogondza : 1b0d8fb63aa98a666f656a60c4c6802c6d023dba Files : core/src/main/java/hudson/model/AbstractProject.java

          I believe this change caused a small issue in the Ivy Plugin and likely in the Maven Plugin as well.

          Both of those plugins, when configured to build modules as separate jobs, disable their child projects if they no longer exist in the source on a new build. In both cases, the child projects IvyModule and MavenModule are not user-disableable, but the code does still need to be able to disable them programatically.

          On Jenkins versions with this change, removing a module from source control, or renaming a module, will leave 'ghost' module projects around that Jenkins still tries to build, but which are not listed as modules in the parent project anymore.

          Timothy Bingaman added a comment - I believe this change caused a small issue in the Ivy Plugin and likely in the Maven Plugin as well. Both of those plugins, when configured to build modules as separate jobs, disable their child projects if they no longer exist in the source on a new build. In both cases, the child projects IvyModule and MavenModule are not user-disableable, but the code does still need to be able to disable them programatically. On Jenkins versions with this change, removing a module from source control, or renaming a module, will leave 'ghost' module projects around that Jenkins still tries to build, but which are not listed as modules in the parent project anymore.

          Oleg Nenashev added a comment -

          tbingaman Yes, seems it's another issue related to the conflict of internal APIs and UIs. On the other hand, there was an issue in Subvrsion plugin before the fix.

          My proposal would be to update Ivy and Maven plugins, because the fix appears in multiple LTS lines. `disabled` and `isDisabled()` are accessible to child classes, so it should be possible. Have you created JIRA issues for this plugins? If no, I'll do it.

          Oleg Nenashev added a comment - tbingaman Yes, seems it's another issue related to the conflict of internal APIs and UIs. On the other hand, there was an issue in Subvrsion plugin before the fix. My proposal would be to update Ivy and Maven plugins, because the fix appears in multiple LTS lines. `disabled` and `isDisabled()` are accessible to child classes, so it should be possible. Have you created JIRA issues for this plugins? If no, I'll do it.

          Yep, sounds good. No tickets logged yet, if you could create them that'd be awesome.

          I ended up fixing our fork of the Ivy Plugin just by overriding makeDisabled in IvyModule using the method from before this change. Can confirm that that has restored the previous behaviour for us. c3c8ce3

          Timothy Bingaman added a comment - Yep, sounds good. No tickets logged yet, if you could create them that'd be awesome. I ended up fixing our fork of the Ivy Plugin just by overriding makeDisabled in IvyModule using the method from before this change. Can confirm that that has restored the previous behaviour for us. c3c8ce3

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

              Created:
              Updated:
              Resolved: