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

Log rotator: empty values decorated with 'Not a positive integer'

    Details

    • Similar Issues:

      Description

      Since (I think) the last update from 2.104 to 2.105 something has changed in validation of integer fields resulting in the 'discard builds' section of a freestyle job showing validation warning 'Not a positive integer'.

      Empty values are (and always have been) stored as -1.

      <logRotator class="hudson.tasks.LogRotator">
        <daysToKeep>-1</daysToKeep>
        <numToKeep>20</numToKeep>
        <artifactDaysToKeep>-1</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </logRotator>
      

       

      Changing the value to a positive integer clears the validation warning, but emptying it returns the warning.

        Attachments

          Issue Links

            Activity

            smd Stefan Drissen created issue -
            smd Stefan Drissen made changes -
            Field Original Value New Value
            Description Since (I think) the last update from 2.104 to 2.105 something has changed in validation of integer fields resulting in the 'discard builds' section of a freestyle job showing validation warning 'Not a positive integer'.

            !image-2018-02-13-00-14-48-787.png!


            Empty values are stored as -1.

            Changing the value to a positive integer clears the validation warning, but emptying it returns the warning.
            Since (I think) the last update from 2.104 to 2.105 something has changed in validation of integer fields resulting in the 'discard builds' section of a freestyle job showing validation warning 'Not a positive integer'.

            !image-2018-02-13-00-14-48-787.png!

            Empty values are (and always have been) stored as -1.

            {code}
            <logRotator class="hudson.tasks.LogRotator">
              <daysToKeep>-1</daysToKeep>
              <numToKeep>20</numToKeep>
              <artifactDaysToKeep>-1</artifactDaysToKeep>
              <artifactNumToKeep>-1</artifactNumToKeep>
            </logRotator>
            {code} 

            Changing the value to a positive integer clears the validation warning, but emptying it returns the warning.
            smd Stefan Drissen made changes -
            Description Since (I think) the last update from 2.104 to 2.105 something has changed in validation of integer fields resulting in the 'discard builds' section of a freestyle job showing validation warning 'Not a positive integer'.

            !image-2018-02-13-00-14-48-787.png!

            Empty values are (and always have been) stored as -1.

            {code}
            <logRotator class="hudson.tasks.LogRotator">
              <daysToKeep>-1</daysToKeep>
              <numToKeep>20</numToKeep>
              <artifactDaysToKeep>-1</artifactDaysToKeep>
              <artifactNumToKeep>-1</artifactNumToKeep>
            </logRotator>
            {code} 

            Changing the value to a positive integer clears the validation warning, but emptying it returns the warning.
            Since (I think) the last update from 2.104 to 2.105 something has changed in validation of integer fields resulting in the 'discard builds' section of a freestyle job showing validation warning 'Not a positive integer'.

            Probably a result of changes made in JENKINS-47793

            !image-2018-02-13-00-14-48-787.png!

            Empty values are (and always have been) stored as -1.
            {code:java}
            <logRotator class="hudson.tasks.LogRotator">
              <daysToKeep>-1</daysToKeep>
              <numToKeep>20</numToKeep>
              <artifactDaysToKeep>-1</artifactDaysToKeep>
              <artifactNumToKeep>-1</artifactNumToKeep>
            </logRotator>
            {code}
             

            Changing the value to a positive integer clears the validation warning, but emptying it returns the warning.
            smd Stefan Drissen made changes -
            Description Since (I think) the last update from 2.104 to 2.105 something has changed in validation of integer fields resulting in the 'discard builds' section of a freestyle job showing validation warning 'Not a positive integer'.

            Probably a result of changes made in JENKINS-47793

            !image-2018-02-13-00-14-48-787.png!

            Empty values are (and always have been) stored as -1.
            {code:java}
            <logRotator class="hudson.tasks.LogRotator">
              <daysToKeep>-1</daysToKeep>
              <numToKeep>20</numToKeep>
              <artifactDaysToKeep>-1</artifactDaysToKeep>
              <artifactNumToKeep>-1</artifactNumToKeep>
            </logRotator>
            {code}
             

            Changing the value to a positive integer clears the validation warning, but emptying it returns the warning.
            Since (I think) the last update from 2.104 to 2.105 something has changed in validation of integer fields resulting in the 'discard builds' section of a freestyle job showing validation warning 'Not a positive integer'.

            !image-2018-02-13-00-14-48-787.png!

            Empty values are (and always have been) stored as -1.
            {code:java}
            <logRotator class="hudson.tasks.LogRotator">
              <daysToKeep>-1</daysToKeep>
              <numToKeep>20</numToKeep>
              <artifactDaysToKeep>-1</artifactDaysToKeep>
              <artifactNumToKeep>-1</artifactNumToKeep>
            </logRotator>
            {code}
             

            Changing the value to a positive integer clears the validation warning, but emptying it returns the warning.
            Hide
            smd Stefan Drissen added a comment - - edited

            I am fairly sure that JENKINS-47793 introduced the issue, the pipe (|) was removed rendering blank an invalid value:

            https://github.com/ksenia-nenasheva/jenkins/commit/f8e3526244af53178439b9a73e1297cf3f7f5ce4#diff-da911448bbb85d374f604da9c1e00136

             

            Show
            smd Stefan Drissen added a comment - - edited I am fairly sure that JENKINS-47793 introduced the issue, the pipe (|) was removed rendering blank an invalid value: https://github.com/ksenia-nenasheva/jenkins/commit/f8e3526244af53178439b9a73e1297cf3f7f5ce4#diff-da911448bbb85d374f604da9c1e00136  
            ks_nenasheva Kseniia Nenasheva made changes -
            Assignee Kseniia Nenasheva [ ks_nenasheva ]
            ks_nenasheva Kseniia Nenasheva made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            ks_nenasheva Kseniia Nenasheva added a comment -

            Stefan Drissen Thanks!
            Fixed in PR #3292

            Show
            ks_nenasheva Kseniia Nenasheva added a comment - Stefan Drissen Thanks! Fixed in PR #3292
            ks_nenasheva Kseniia Nenasheva made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            oleg_nenashev Oleg Nenashev made changes -
            Labels lts-candidate regression
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            May need backporting to 2.107 which is the current LTS candidate baseline

            Show
            oleg_nenashev Oleg Nenashev added a comment - May need backporting to 2.107 which is the current LTS candidate baseline
            danielbeck Daniel Beck made changes -
            Link This issue is related to JENKINS-49387 [ JENKINS-49387 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kseniia Nenasheva
            Path:
            core/src/main/java/hudson/model/Computer.java
            core/src/main/resources/hudson/slaves/DumbSlave/configure-entries.jelly
            core/src/main/resources/jenkins/model/Jenkins/MasterComputer/configure.jelly
            core/src/main/resources/jenkins/model/MasterBuildConfiguration/config.groovy
            war/src/main/webapp/scripts/hudson-behavior.js
            http://jenkins-ci.org/commit/jenkins/5c8cc45900bf8d78058cecd471840bdbc88215d3
            Log:
            JENKINS-49387JENKINS-49520 - Validation errors (#3292)

            • Fixes for validation
            • Fix for an empty agent.nExecutors
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kseniia Nenasheva Path: core/src/main/java/hudson/model/Computer.java core/src/main/resources/hudson/slaves/DumbSlave/configure-entries.jelly core/src/main/resources/jenkins/model/Jenkins/MasterComputer/configure.jelly core/src/main/resources/jenkins/model/MasterBuildConfiguration/config.groovy war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/5c8cc45900bf8d78058cecd471840bdbc88215d3 Log: JENKINS-49387 JENKINS-49520 - Validation errors (#3292) Fixes for validation Fix for an empty agent.nExecutors
            Hide
            danielbeck Daniel Beck added a comment -

            Released in 2.108.

            Show
            danielbeck Daniel Beck added a comment - Released in 2.108.
            danielbeck Daniel Beck made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            danielbeck Daniel Beck made changes -
            Labels lts-candidate regression 2.107.1-fixed regression
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kseniia Nenasheva
            Path:
            core/src/main/java/hudson/model/Computer.java
            core/src/main/resources/hudson/slaves/DumbSlave/configure-entries.jelly
            core/src/main/resources/jenkins/model/Jenkins/MasterComputer/configure.jelly
            core/src/main/resources/jenkins/model/MasterBuildConfiguration/config.groovy
            war/src/main/webapp/scripts/hudson-behavior.js
            http://jenkins-ci.org/commit/jenkins/2ad96a3d5b5a10f11601d427690e765d654941a7
            Log:
            JENKINS-49387JENKINS-49520 - Validation errors (#3292)

            • Fixes for validation
            • Fix for an empty agent.nExecutors

            (cherry picked from commit 5c8cc45900bf8d78058cecd471840bdbc88215d3)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kseniia Nenasheva Path: core/src/main/java/hudson/model/Computer.java core/src/main/resources/hudson/slaves/DumbSlave/configure-entries.jelly core/src/main/resources/jenkins/model/Jenkins/MasterComputer/configure.jelly core/src/main/resources/jenkins/model/MasterBuildConfiguration/config.groovy war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/2ad96a3d5b5a10f11601d427690e765d654941a7 Log: JENKINS-49387 JENKINS-49520 - Validation errors (#3292) Fixes for validation Fix for an empty agent.nExecutors (cherry picked from commit 5c8cc45900bf8d78058cecd471840bdbc88215d3)

              People

              • Assignee:
                ks_nenasheva Kseniia Nenasheva
                Reporter:
                smd Stefan Drissen
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: