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

Jenkins merges queued builds with the different file parameters

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • Jenkins LTS 1.480.3 (affects all versions), both Linux and Windows masters

      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.

          [JENKINS-19017] Jenkins merges queued builds with the different file parameters

          Oleg Nenashev created issue -
          Oleg Nenashev made changes -
          Description Original: 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 treat consider files as different if they are specified in the build parameters.


          New: 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.


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

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - Created pull request: https://github.com/jenkinsci/jenkins/pull/889
          Oleg Nenashev made changes -
          Labels New: lts-candidate
          Oleg Nenashev made changes -
          Link New: This issue is duplicated by JENKINS-11733 [ JENKINS-11733 ]

          Daniel Beck added a comment -

          Did you forget about this?

          Daniel Beck added a comment - Did you forget about this?

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - New PR: https://github.com/jenkinsci/jenkins/pull/1411

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/model/FileParameterValue.java
          http://jenkins-ci.org/commit/jenkins/7c4f6b7ef433f4a3d85707096f9e5f8b366f232a
          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>

          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/7c4f6b7ef433f4a3d85707096f9e5f8b366f232a 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>
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

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

              Created:
              Updated:
              Resolved: