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

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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)

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link 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)

            Show
            scm_issue_link 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)
            Hide
            dogfood 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
            Show
            dogfood 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
            Hide
            tbingaman 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.

            Show
            tbingaman 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.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Timothy Bingaman 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.

            Show
            oleg_nenashev Oleg Nenashev added a comment - Timothy Bingaman 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.
            Hide
            tbingaman 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

            Show
            tbingaman 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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: