Details

    • Similar Issues:

      Description

      Upgrading Jenkins LTS from 2.77 to 2.89 will change Quiet Period effective value from seconds into milliseconds.

      ex. 30 sec have to be configured now as 30000.

      Use Case:

      Set job Quiet Period value from UI. Trigger new build using REST API without delay parameter. 

      Reproduce steps:

      Step 1. Try Quiet period value 30:

      1. Install LTS 2.89.2
      2. Create new Freestyle project (ex. trigger_test-quiet_period)
      3. Add Quiet Period value to 30 (like in picture). (Quiet period can be found under Advanced.. button in general section)
      4. Save the job
      5. Build the job by using REST API or for the testing purpose just build directly from browser address bar
        1. http://<jenkins_address>/job/trigger_test-quiet_period/build 
          1. Link can be found by hovering mouse cursor over 
        2. Click proceed
      6. Go back to job page http://<jenkins_address>/view/test/job/trigger_test-quiet_period/

      Result: Quiet periods is 30ms. Build basically starts immediately.

      Excepted result: Quiet period is 30s
       

      Step 2. Try Quiet period value 30000:

      1. Use same job as in step 1
      2. Change Quiet Period value to 30000. (Quiet period can be found under Advanced.. button in general section)
      3. Save the job
      4. Build the job by using REST API or for the testing purpose just build directly from browser address bar
        1. http://<jenkins_address>/job/trigger_test-quiet_period/build
          1. Link can be found by hovering mouse cursor over 
        2. Click proceed
      5. Go back to job page http://<jenkins_address>/view/test/job/trigger_test-quiet_period/

      Result: Quiet periods is 30s

      Excepted result: Quiet period is over 8h

       

        Attachments

          Issue Links

            Activity

            tpatteri Tapio Patteri created issue -
            tpatteri Tapio Patteri made changes -
            Field Original Value New Value
            Description *Use Case:* Trigger new build using REST API

            Upgrading Jenkins LTS from {color:#14892c}2.77{color} to {color:#d04437}2.89{color} will change Quiet Period parameter from {color:#14892c}seconds{color} into {color:#d04437}milliseconds{color}.

            ex. 300 sec have to be configured as 300000.

             
            *Use Case:* Trigger new build using REST API

            Upgrading Jenkins LTS from {color:#14892c}2.77{color} to {color:#d04437}2.89{color} will change Quiet Period parameter from {color:#14892c}seconds{color} into {color:#d04437}milliseconds{color}.

            ex. 30 sec have to be configured as 30000.

             
            tpatteri Tapio Patteri made changes -
            Link This issue relates to JENKINS-44052 [ JENKINS-44052 ]
            Hide
            tpatteri Tapio Patteri added a comment - - edited

            Maybe issue is related to this change https://issues.jenkins-ci.org/browse/JENKINS-44052

            Show
            tpatteri Tapio Patteri added a comment - - edited Maybe issue is related to this change  https://issues.jenkins-ci.org/browse/JENKINS-44052
            Hide
            oleg_nenashev Oleg Nenashev added a comment -
            Show
            oleg_nenashev Oleg Nenashev added a comment - FYI Baptiste Mathus
            Hide
            batmat Baptiste Mathus added a comment -

            Oleg Nenashev tapiomtr imo the right behaviour is the one fixed in 2.89. If you expect seconds, you should suffix the call with 'secs'. 

            Show
            batmat Baptiste Mathus added a comment - Oleg Nenashev tapiomtr  imo the right behaviour is the one fixed in 2.89. If you expect seconds, you should suffix the call with 'secs'. 
            Hide
            batmat Baptiste Mathus added a comment -

            I mean: there was definitely a bug in the code which was mostly invisible since for instance the UI was suffixing already with 'secs'. Which would only surface in your case without it.

            Show
            batmat Baptiste Mathus added a comment - I mean: there was definitely a bug in the code which was mostly invisible since for instance the UI was suffixing already with 'secs'. Which would only surface in your case without it.
            batmat Baptiste Mathus made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Not A Defect [ 7 ]
            Hide
            tpatteri Tapio Patteri added a comment - - edited

            Thank you for the answer Baptiste Mathus.

            EDIT2: 

            If implementation is correct then I think Quiet period comment box should be fixed from "Number of seconds" to "Number of seconds when you are using upstream job etc. but when you are using documented REST API numbers handled as milliseconds instead of seconds" or something better because now these Quiet period box numbers working differently in different use cases.

            Show
            tpatteri Tapio Patteri added a comment - - edited Thank you for the answer  Baptiste Mathus . EDIT2:  If implementation is correct then I think Quiet period comment box should be fixed from "Number of seconds" to "Number of seconds when you are using upstream job etc. but when you are using documented REST API numbers handled as milliseconds instead of seconds" or something better because now these Quiet period box numbers working differently in different use cases.
            Hide
            tpatteri Tapio Patteri added a comment - - edited

            If it's intended behavior that Quiet Period box numbers means different when using REST API, at least it should be documented.

            Show
            tpatteri Tapio Patteri added a comment - - edited If it's intended behavior that Quiet Period box numbers means different when using REST API, at least it should be documented.
            tpatteri Tapio Patteri made changes -
            Resolution Not A Defect [ 7 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            I tend to agree that it is a UI bug according to the attached screenshot.

            Show
            oleg_nenashev Oleg Nenashev added a comment - I tend to agree that it is a UI bug according to the attached screenshot.
            Hide
            batmat Baptiste Mathus added a comment -

            That I definitely agree too.

            Show
            batmat Baptiste Mathus added a comment - That I definitely agree too.
            oleg_nenashev Oleg Nenashev made changes -
            Labels newbie-friendly regression ui
            danielbeck Daniel Beck made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            Hide
            danielbeck Daniel Beck added a comment -

            Wait, so the problem is that the same value entered in a UI form field (documented as and interpreted as seconds) behaves differently when triggering the build programmatically (interpreted as millis unless secs suffix is used)?

            If so, would not consider that a bug.

            Show
            danielbeck Daniel Beck added a comment - Wait, so the problem is that the same value entered in a UI form field (documented as and interpreted as seconds) behaves differently when triggering the build programmatically (interpreted as millis unless secs suffix is used)? If so, would not consider that a bug.
            danielbeck Daniel Beck made changes -
            Priority Critical [ 2 ] Major [ 3 ]
            Hide
            tpatteri Tapio Patteri added a comment -

            If build is triggered by using REST API without "delay" parameter it's use value from Quiet Box. Quiet box value is documented as seconds and it has been worked as documented before LTS 2.89, when REST API is used.

            Reproduce steps are quit easy

            Step 1. Try Quiet period Value 30:**

            1. Install LTS 2.89.2
            2. Create new Freestyle project (ex. trigger_test-quiet_period)
            3. Add Quiet Period value to 30 (like in picture). (Quiet period can be found under Advanced.. button in general section)
            4. Save the job
            5. Build the job by using REST API or for the testing purpose just build directly from browser address bar
              1. http://<jenkins_address>/job/trigger_test-quiet_period/build 
                1. Link can be found by hovering mouse cursor over 
              2. Click proceed
            6. Go back to job page http://<jenkins_address>/view/test/job/trigger_test-quiet_period/

            Result: Quiet periods is 30ms. Build basically starts immediately.

            Excepted result: Quiet period is 30s
             

            Step 2. Try Quiet period Value 30000:

            1. Use same job as in step 1
            2. Change Quiet Period value to 30000. (Quiet period can be found under Advanced.. button in general section)
            3. Save the job
            4. Build the job by using REST API or for the testing purpose just build directly from browser address bar
              1. http://<jenkins_address>/job/trigger_test-quiet_period/build
                1. Link can be found by hovering mouse cursor over 
              2. Click proceed
            5. Go back to job page http://<jenkins_address>/view/test/job/trigger_test-quiet_period/

            Result: Quiet periods is 30s

            Excepted result: Quiet period is over 8h

             

            Show
            tpatteri Tapio Patteri added a comment - If build is triggered by using REST API without "delay" parameter it's use value from Quiet Box. Quiet box value is documented as seconds and it has been worked as documented before LTS 2.89, when REST API is used. Reproduce steps are quit easy Step 1. Try Quiet period Value 30: ** Install LTS 2.89.2 Create new Freestyle project (ex. trigger_test-quiet_period) Add Quiet Period value to 30 (like in picture). (Quiet period can be found under Advanced.. button in general section) Save the job Build the job by using REST API or for the testing purpose just build directly from browser address bar http://<jenkins_address>/job/trigger_test-quiet_period/build  Link can be found by hovering mouse cursor over  Click proceed Go back to job page http://<jenkins_address>/view/test/job/trigger_test-quiet_period/ Result: Quiet periods is 30ms. Build basically starts immediately. Excepted result: Quiet period is 30s   Step 2. Try Quiet period Value 30000: Use same job as in step 1 Change Quiet Period value to 30000. (Quiet period can be found under Advanced.. button in general section) Save the job Build the job by using REST API or for the testing purpose just build directly from browser address bar http://<jenkins_address>/job/trigger_test-quiet_period/build Link can be found by hovering mouse cursor over  Click proceed Go back to job page http://<jenkins_address>/view/test/job/trigger_test-quiet_period/ Result:  Quiet periods is 30s Excepted result:  Quiet period is over 8h  
            Hide
            danielbeck Daniel Beck added a comment -

            Okay, yes, that's clearly a regression.

            Show
            danielbeck Daniel Beck added a comment - Okay, yes, that's clearly a regression.
            danielbeck Daniel Beck made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-2629 (Web Link)" [ 19761 ]
            danielbeck Daniel Beck made changes -
            Labels newbie-friendly regression ui lts-candidate newbie-friendly regression ui
            Hide
            jsalonso Saul Alonso added a comment -

            Same wrong behaviour when you build a job calling REST API with delay value

            Show
            jsalonso Saul Alonso added a comment - Same wrong behaviour when you build a job calling REST API with delay value
            Hide
            danielbeck Daniel Beck added a comment -

            Saul Alonso That should work as intended, pass a value such as 10sec instead, like the 'Build Now' link URL demonstrates. Do we need to fix some docs?

            Show
            danielbeck Daniel Beck added a comment - Saul Alonso That should work as intended, pass a value such as 10sec instead, like the 'Build Now' link URL demonstrates. Do we need to fix some docs?
            tpatteri Tapio Patteri made changes -
            Description *Use Case:* Trigger new build using REST API

            Upgrading Jenkins LTS from {color:#14892c}2.77{color} to {color:#d04437}2.89{color} will change Quiet Period parameter from {color:#14892c}seconds{color} into {color:#d04437}milliseconds{color}.

            ex. 30 sec have to be configured as 30000.

             
            Upgrading Jenkins LTS from {color:#14892c}2.77{color} to {color:#d04437}2.89{color} will change Quiet Period effective value from {color:#14892c}seconds{color} into {color:#d04437}milliseconds{color}.

            ex. 30 sec have to be configured now as 30000.
            h3. *Use Case:*

            Set job Quiet Period value from UI. Trigger new build using REST API without delay parameter. 
            h3. *Reproduce steps:*

            *Step 1.* *Try Quiet period value 30:*
             # Install LTS 2.89.2
             # Create new Freestyle project (ex. trigger_test-quiet_period)
             # Add Quiet Period value to 30 (like in picture). (Quiet period can be found under Advanced.. button in general section)
             # Save the job
             # Build the job by using REST API or for the testing purpose just build directly from browser address bar
             ## http://&lt;jenkins_address&gt;/job/trigger_test-quiet_period/build&#xA0;
             ### Link can be found by hovering mouse cursor over 
             ## Click proceed
             # Go back to job page http://&lt;jenkins_address&gt;/view/test/job/trigger_test-quiet_period/

            *Result:* Quiet periods is 30ms. Build basically starts immediately.

            *Excepted result:* Quiet period is 30s
              

            *Step 2. Try Quiet period value 30000:*
             # Use same job as in step 1
             # Change Quiet Period value to 30000. (Quiet period can be found under Advanced.. button in general section)
             # Save the job
             # Build the job by using REST API or for the testing purpose just build directly from browser address bar
             ## http://&lt;jenkins_address&gt;/job/trigger_test-quiet_period/build
             ### Link can be found by hovering mouse cursor over 
             ## Click proceed
             # Go back to job page http://&lt;jenkins_address&gt;/view/test/job/trigger_test-quiet_period/

            *Result:* Quiet periods is 30s

            *Excepted result:* Quiet period is over 8h

             
            Hide
            tpatteri Tapio Patteri added a comment -

            Description updated

            Show
            tpatteri Tapio Patteri added a comment - Description updated
            Hide
            jsalonso Saul Alonso added a comment -

            Daniel Beck We have a external development (it can't be modified) that trigger builds via API with delay value without units (only number). With jenkins update to 2.89.2 it has stopped working.

            Show
            jsalonso Saul Alonso added a comment - Daniel Beck We have a external development (it can't be modified) that trigger builds via API with delay value without units (only number). With jenkins update to 2.89.2 it has stopped working.
            Hide
            danielbeck Daniel Beck added a comment -

            Saul Alonso That's unfortunate but not a bug. In fact, the previous behavior was a bug.

            Show
            danielbeck Daniel Beck added a comment - Saul Alonso That's unfortunate but not a bug. In fact, the previous behavior was a bug.
            Hide
            ban_nobuhiro Nobuhiro Ban added a comment -

            quietPeriod is integer and its unit is second.

            In 3hunks of https://github.com/jenkinsci/jenkins/commit/ff36adf0d243e2c3461045615ee654eb33665acb (JENKINS-44052),
            delay.getTime() was changed to delay.getTimeInSeconds().

            But this delay is created as new TimeDuration(xxx.getQuietPeriod()).
            This parameter should have to be changed to x1000.
            Now, if quietPeriod=5 then 5ms delay is created wrongly.

             

            Suggested fix:

            Change new TimeDuration(xxx.getQuietPeriod())
            to new TimeDuration(xxx.getQuietPeriod() * 1000L)
            in core/src/main/java/hudson/model/ParametersDefinitionProperty.java (2 places)
            and core/src/main/java/jenkins/model/ParameterizedJobMixIn.java.

            Show
            ban_nobuhiro Nobuhiro Ban added a comment - quietPeriod is integer and its unit is second. In 3hunks of https://github.com/jenkinsci/jenkins/commit/ff36adf0d243e2c3461045615ee654eb33665acb ( JENKINS-44052 ), delay.getTime() was changed to delay.getTimeInSeconds() . But this delay is created as new TimeDuration(xxx.getQuietPeriod()) . This parameter should have to be changed to x1000. Now, if quietPeriod=5 then 5ms delay is created wrongly.   Suggested fix: Change new TimeDuration(xxx.getQuietPeriod()) to new TimeDuration(xxx.getQuietPeriod() * 1000L) in core/src/main/java/hudson/model/ParametersDefinitionProperty.java (2 places) and core/src/main/java/jenkins/model/ParameterizedJobMixIn.java.
            Hide
            danielbeck Daniel Beck added a comment -

            Baptiste Mathus Ping. Apparently quiet period broke.

            Show
            danielbeck Daniel Beck added a comment - Baptiste Mathus Ping. Apparently quiet period broke.
            Hide
            idletekz Alex Doan added a comment -

            Downstream job (pipeline "build job" method) also affected by this change. The value is expecting is seconds so when quiet period is in milliseconds, it cause downstream to take hours/days to build.

            Show
            idletekz Alex Doan added a comment - Downstream job (pipeline "build job" method) also affected by this change. The value is expecting is seconds so when quiet period is in milliseconds, it cause downstream to take hours/days to build.
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal FNDN-243 (Web Link)" [ 20806 ]
            Hide
            oleg_nenashev Oleg Nenashev added a comment -
            Show
            oleg_nenashev Oleg Nenashev added a comment - Baptiste Mathus ping
            Hide
            batmat Baptiste Mathus added a comment -

            Unfortunately lacking the time to do this on personal time these days. Sorry

            Show
            batmat Baptiste Mathus added a comment - Unfortunately lacking the time to do this on personal time these days. Sorry
            danielbeck Daniel Beck made changes -
            Status Reopened [ 4 ] Open [ 1 ]
            fcojfernandez Francisco Fernández made changes -
            Assignee Francisco Fernández [ fcojfernandez ]
            fcojfernandez Francisco Fernández made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            fcojfernandez Francisco Fernández made changes -
            Remote Link This issue links to "PR#3591 (Web Link)" [ 21319 ]
            fcojfernandez Francisco Fernández made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            Hide
            fcojfernandez Francisco Fernández added a comment -

            PR merged

            Show
            fcojfernandez Francisco Fernández added a comment - PR merged
            fcojfernandez Francisco Fernández made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            danielbeck Daniel Beck made changes -
            Labels lts-candidate newbie-friendly regression ui 2.138.1-fixed newbie-friendly regression ui

              People

              • Assignee:
                fcojfernandez Francisco Fernández
                Reporter:
                tpatteri Tapio Patteri
              • Votes:
                3 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: