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

Allow InputStep.id to start with a lowercase letter

      As per this change, the id of an input step must start with a capital letter. Fine enough for computed IDs, but very confusing for an explicitly specified ID.

      The reasoning was so that getDynamic would not be ambiguous. But I think this would be fixed more easily by deprecating getDynamic, using getExecution, and making this code append execution/ to the base URL.

          [JENKINS-34509] Allow InputStep.id to start with a lowercase letter

          Jesse Glick created issue -
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-26224 [ JENKINS-26224 ]
          Jesse Glick made changes -
          Epic Link New: JENKINS-35394 [ 171187 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 170642 ] New: JNJira + In-Review [ 183986 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Jesse Glick made changes -
          Component/s New: pipeline-input-step-plugin [ 21708 ]
          Component/s Original: pipeline [ 21692 ]

          C Flamm added a comment -

          Currently (v2.36) it's possible to define an input with a lower case id, but if you later want to provide the input via Rest you have to spell the id with a capital first letter.

          ...
              stage ('main') {
                  input(id: 'foofoo', message: 'Moo?')
              }
          ...
          

          id used as defined doesn't work.

          $ curl -X POST http://localhost:8080/job/pipe1/16/input/foofoo/proceedEmpty
          <html>
          <head>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
          <title>Error 404 Not Found</title>
          </head>
          <body><h2>HTTP ERROR 404</h2>
          <p>Problem accessing /job/pipe1/16/input/foofoo/proceedEmpty. Reason:
          <pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>
          
          </body>
          </html>
          

          Capitalized id works fine.

          $ curl -X POST http://localhost:8080/job/pipe1/16/input/Foofoo/proceedEmpty
          

          C Flamm added a comment - Currently (v2.36) it's possible to define an input with a lower case id , but if you later want to provide the input via Rest you have to spell the id with a capital first letter. ... stage ('main') { input(id: 'foofoo', message: 'Moo?') } ... id used as defined doesn't work. $ curl -X POST http://localhost:8080/job/pipe1/16/input/foofoo/proceedEmpty <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /job/pipe1/16/input/foofoo/proceedEmpty. Reason: <pre> Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/> </body> </html> Capitalized id works fine. $ curl -X POST http://localhost:8080/job/pipe1/16/input/Foofoo/proceedEmpty
          James Dumay made changes -
          Labels New: cloudbees-internal-pipeline
          CloudBees Inc. made changes -
          Remote Link New: This issue links to "CloudBees Internal CD-31 (Web Link)" [ 19135 ]

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: