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

timeout around input does not work with submitter

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • Jenkins ver. 1.651.3 (also 2.7.4)
      Pipeline: Basic Steps 2.1
      Pipeline: Input Step 2.1

      The example from https://jenkins.io/doc/pipeline/

      timeout(time:5, unit:'DAYS') {
          input message:'Approve deployment?', submitter: 'it-ops'
      }
      

      does not work.
      I tested with a shorter timeout and as soon as i added an submitter the input stays for ever open. without submitter the input is correctly terminated.

          [JENKINS-38380] timeout around input does not work with submitter

          Thomas Kalmár created issue -
          Thomas Kalmár made changes -
          Issue Type Original: Improvement [ 4 ] New: Bug [ 1 ]
          Jesse Glick made changes -
          Component/s Original: workflow-basic-steps-plugin [ 21712 ]

          Jesse Glick added a comment -

          Smells like a regression from the fix of JENKINS-37154 to me. canCancel() should have been true if running as SYSTEM; need to check it.

          Jesse Glick added a comment - Smells like a regression from the fix of JENKINS-37154 to me. canCancel() should have been true if running as SYSTEM ; need to check it.
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-37154 [ JENKINS-37154 ]
          Jesse Glick made changes -
          Labels New: regression

          Seems to run as anonymous and has no Job.CANCEL Permission.

          Authentication authentication = Jenkins.getAuthentication();
          GrantedAuthority[] authorities = authentication.getAuthorities();
          

          contains only [anonymous]

          Thomas Kalmár added a comment - Seems to run as anonymous and has no Job.CANCEL Permission. Authentication authentication = Jenkins.getAuthentication(); GrantedAuthority[] authorities = authentication.getAuthorities(); contains only [anonymous]

          The check inside canCancel seems to be ok.

          getRun().getParent().hasPermission(ACL.SYSTEM, Job.CANCEL)
          

          returns true, perhaps the problem is in the basic step not calling the cancel with SYSTEM-Authorization?

          Thomas Kalmár added a comment - The check inside canCancel seems to be ok. getRun().getParent().hasPermission(ACL.SYSTEM, Job.CANCEL) returns true, perhaps the problem is in the basic step not calling the cancel with SYSTEM-Authorization?
          Jesse Glick made changes -
          Priority Original: Minor [ 4 ] New: Critical [ 2 ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

            jglick Jesse Glick
            thomas_kalmar Thomas Kalmár
            Votes:
            7 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: