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

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

    XMLWordPrintable

Details

    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

            oleg_nenashev Oleg Nenashev created issue -
            oleg_nenashev Oleg Nenashev made changes -
            Field Original Value New Value
            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 ()
            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)
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is related to JENKINS-24341 [ JENKINS-24341 ]
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is related to JENKINS-19179 [ JENKINS-19179 ]
            oleg_nenashev Oleg Nenashev made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            oleg_nenashev 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_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/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_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/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_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            dogfood 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 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
            oleg_nenashev Oleg Nenashev made changes -
            Labels lts-candidate

            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_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)
            olivergondza Oliver Gond┼ża made changes -
            Labels lts-candidate 1.580.2-fixed
            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
            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

            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.

            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.
            oleg_nenashev 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 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

            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
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 157260 ] JNJira + In-Review [ 195657 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: