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

Warning threshold defaults generated by the Job DSL Plugin don't match the GUI defaults

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • job-dsl-plugin
    • None
    • jenkins 1.625.3 LTS
      job-dsl plugin 1.42
      xunit plugin 1.93

      The default values for the thresholds are empty strings in the GUI, while in the Job DSL plugin they are zeroes. An empty threshold means it is not enforced, while a 0 one means there should not be any failures of this kind.

      Effectively, in the GUI the default is "enforce nothing, any number of errors is fine", while in the default DSL-generated job it's "strictly enforce everything, there should be no errors at all".

      While this bug is actually promoting good practices, it is still a bug

      Faulty job example:

      job('threshold-defaults-bug') {
        publishers {
          archiveXUnit {
            jUnit {
              pattern('test-results.xml')
            }
          }
        }
      }
      

      You can run it here: http://job-dsl.herokuapp.com/. Note that all the generated thresholds have 0s, not empty strings.

          [JENKINS-33554] Warning threshold defaults generated by the Job DSL Plugin don't match the GUI defaults

          Dmitry Polyanitsa created issue -
          Dmitry Polyanitsa made changes -
          Description Original: The default values for the thresholds are empty strings in the GUI, while in the Job DSL plugin they are zeroes. An empty threshold means it is not enforced, while a 0 one means there should not be any failures of this kind.

          Effectively, in the GUI the default is "enforce nothing, any number of errors is fine", while in the default DSL-generated job it's "strictly enforce everything, there should be no errors at all".

          While this bug is actually enforcing good practices, it is still a bug :)

          Faulty job example:

          {code:groovy}
          job('threshold-defaults-bug') {
            publishers {
              archiveXUnit {
                jUnit {
                  pattern('test-results.xml')
                }
              }
            }
          }
          {code}
          You can run it here: http://job-dsl.herokuapp.com/. Note that all the generated thresholds have 0s, not empty strings.
          New: The default values for the thresholds are empty strings in the GUI, while in the Job DSL plugin they are zeroes. An empty threshold means it is not enforced, while a 0 one means there should not be any failures of this kind.

          Effectively, in the GUI the default is "enforce nothing, any number of errors is fine", while in the default DSL-generated job it's "strictly enforce everything, there should be no errors at all".

          While this bug is actually enforcing good practices, it is still a bug :)

          Faulty job example:

          {code:java}
          job('threshold-defaults-bug') {
            publishers {
              archiveXUnit {
                jUnit {
                  pattern('test-results.xml')
                }
              }
            }
          }
          {code}
          You can run it here: http://job-dsl.herokuapp.com/. Note that all the generated thresholds have 0s, not empty strings.
          Dmitry Polyanitsa made changes -
          Environment Original: jenkins 1.625.3 LTS
          job-dsl plugin 1.42
          warnings plugin 4.50
          New: jenkins 1.625.3 LTS
          job-dsl plugin 1.42
          xunit plugin 1.93
          Dmitry Polyanitsa made changes -
          Description Original: The default values for the thresholds are empty strings in the GUI, while in the Job DSL plugin they are zeroes. An empty threshold means it is not enforced, while a 0 one means there should not be any failures of this kind.

          Effectively, in the GUI the default is "enforce nothing, any number of errors is fine", while in the default DSL-generated job it's "strictly enforce everything, there should be no errors at all".

          While this bug is actually enforcing good practices, it is still a bug :)

          Faulty job example:

          {code:java}
          job('threshold-defaults-bug') {
            publishers {
              archiveXUnit {
                jUnit {
                  pattern('test-results.xml')
                }
              }
            }
          }
          {code}
          You can run it here: http://job-dsl.herokuapp.com/. Note that all the generated thresholds have 0s, not empty strings.
          New: The default values for the thresholds are empty strings in the GUI, while in the Job DSL plugin they are zeroes. An empty threshold means it is not enforced, while a 0 one means there should not be any failures of this kind.

          Effectively, in the GUI the default is "enforce nothing, any number of errors is fine", while in the default DSL-generated job it's "strictly enforce everything, there should be no errors at all".

          While this bug is actually promoting good practices, it is still a bug :)

          Faulty job example:

          {code:java}
          job('threshold-defaults-bug') {
            publishers {
              archiveXUnit {
                jUnit {
                  pattern('test-results.xml')
                }
              }
            }
          }
          {code}
          You can run it here: http://job-dsl.herokuapp.com/. Note that all the generated thresholds have 0s, not empty strings.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 169499 ] New: JNJira + In-Review [ 183526 ]
          Jamie Tanna made changes -
          Assignee Original: Daniel Spilker [ daspilker ] New: Jamie Tanna [ jamietanna ]

            jamietanna Jamie Tanna
            coffeecup_winner Dmitry Polyanitsa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: