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

Jenkins merges queued builds with the different file parameters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      Jenkins LTS 1.480.3 (affects all versions), both Linux and Windows masters
    • Similar Issues:

      Description

      Reproduction steps:

      • Create build with file parameter
      • Add execution delay or invalid label restrictions
      • Try to put more than one build into queue

      Queue build comparator successfully enters FileParameterValue::equals().

      According to function docs, "In practice this will always be false, since location should be unique". However, in practice of queued builds location is relative path to file in workspace (which is specified in parameter configs), so that function returns true => Jenkins merges builds even if theirs file parameters are different.

      It is not possible to use anything instead of bit-wise file comparison, because different files can be uploaded from same place during manual build submission. It can require much time in long queues...

      I propose to consider files as different if they are specified in the build parameters.

        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/FileParameterValue.java
            core/src/test/java/hudson/model/FileParameterValueTest.java
            http://jenkins-ci.org/commit/jenkins/e80fa118aa0cdca880d7413890f18e505a5decb1
            Log:
            Merge pull request #1411 from synopsys-arc-oss/JENKINS-19017

            [FIXED JENKINS-19017] - FileParameter - Handle non-null file parameters as different values

            Compare: https://github.com/jenkinsci/jenkins/compare/7fa1252e5811...e80fa118aa0c

            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/FileParameterValue.java core/src/test/java/hudson/model/FileParameterValueTest.java http://jenkins-ci.org/commit/jenkins/e80fa118aa0cdca880d7413890f18e505a5decb1 Log: Merge pull request #1411 from synopsys-arc-oss/ JENKINS-19017 [FIXED JENKINS-19017] - FileParameter - Handle non-null file parameters as different values Compare: https://github.com/jenkinsci/jenkins/compare/7fa1252e5811...e80fa118aa0c
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3766
            [FIXED JENKINS-19017] - FileParameter - Handle non-null file parameters as different values (Revision 7c4f6b7ef433f4a3d85707096f9e5f8b366f232a)
            JENKINS-19017 - Unit tests (Revision cc06ae78e3955746176f64ff3f36d7f0e3cc80ab)

            Result = SUCCESS
            o.v.nenashev : 7c4f6b7ef433f4a3d85707096f9e5f8b366f232a
            Files :

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

            o.v.nenashev : cc06ae78e3955746176f64ff3f36d7f0e3cc80ab
            Files :

            • core/src/test/java/hudson/model/FileParameterValueTest.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3766 [FIXED JENKINS-19017] - FileParameter - Handle non-null file parameters as different values (Revision 7c4f6b7ef433f4a3d85707096f9e5f8b366f232a) JENKINS-19017 - Unit tests (Revision cc06ae78e3955746176f64ff3f36d7f0e3cc80ab) Result = SUCCESS o.v.nenashev : 7c4f6b7ef433f4a3d85707096f9e5f8b366f232a Files : core/src/main/java/hudson/model/FileParameterValue.java o.v.nenashev : cc06ae78e3955746176f64ff3f36d7f0e3cc80ab Files : core/src/test/java/hudson/model/FileParameterValueTest.java
            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/FileParameterValue.java
            http://jenkins-ci.org/commit/jenkins/fff888cc822f235dde8ebdd01152c626e85a12b2
            Log:
            [FIXED JENKINS-19017] - FileParameter - Handle non-null file parameters as different values

            The change prevents the issue when Jenkins merges builds with different files coming from one source (It may happen!).

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

            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/FileParameterValue.java http://jenkins-ci.org/commit/jenkins/fff888cc822f235dde8ebdd01152c626e85a12b2 Log: [FIXED JENKINS-19017] - FileParameter - Handle non-null file parameters as different values The change prevents the issue when Jenkins merges builds with different files coming from one source (It may happen!). Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com> (cherry picked from commit 7c4f6b7ef433f4a3d85707096f9e5f8b366f232a)
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            core/src/test/java/hudson/model/FileParameterValueTest.java
            http://jenkins-ci.org/commit/jenkins/be835bfcfb172ecde489ad3598750b7fdc88a965
            Log:
            JENKINS-19017 - Unit tests

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

            Compare: https://github.com/jenkinsci/jenkins/compare/034919e1fde1...be835bfcfb17

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/test/java/hudson/model/FileParameterValueTest.java http://jenkins-ci.org/commit/jenkins/be835bfcfb172ecde489ad3598750b7fdc88a965 Log: JENKINS-19017 - Unit tests Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com> (cherry picked from commit cc06ae78e3955746176f64ff3f36d7f0e3cc80ab) Compare: https://github.com/jenkinsci/jenkins/compare/034919e1fde1...be835bfcfb17
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4292
            [FIXED JENKINS-19017] - FileParameter - Handle non-null file parameters as different values (Revision fff888cc822f235dde8ebdd01152c626e85a12b2)
            JENKINS-19017 - Unit tests (Revision be835bfcfb172ecde489ad3598750b7fdc88a965)

            Result = UNSTABLE
            ogondza : fff888cc822f235dde8ebdd01152c626e85a12b2
            Files :

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

            ogondza : be835bfcfb172ecde489ad3598750b7fdc88a965
            Files :

            • core/src/test/java/hudson/model/FileParameterValueTest.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4292 [FIXED JENKINS-19017] - FileParameter - Handle non-null file parameters as different values (Revision fff888cc822f235dde8ebdd01152c626e85a12b2) JENKINS-19017 - Unit tests (Revision be835bfcfb172ecde489ad3598750b7fdc88a965) Result = UNSTABLE ogondza : fff888cc822f235dde8ebdd01152c626e85a12b2 Files : core/src/main/java/hudson/model/FileParameterValue.java ogondza : be835bfcfb172ecde489ad3598750b7fdc88a965 Files : core/src/test/java/hudson/model/FileParameterValueTest.java

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: