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

/wfapi/describe returns wrong overall status ("NOT EXECUTED") for jenkins job that was flagged with NOT_BUILT

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • Jenkins 2.289.1 on openshift 3

      we set the BUILD_STATUS in the current build to NOT_BUILT thru the standard API

                      currentBuild.result = 'NOT_BUILT'
       
       
      and it's showing up correctly in blue ocean as "not_built" - and also in the logs:

      [Pipeline] }[Pipeline] // withCredentials[Pipeline] }[Pipeline] // wrap[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineFinished: NOT_BUILT

       
      but if the WF API (/wfapi/describe) is used: 
       
      {"_links":{"self":{"href":"https://..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/wfapi/describe"}},"id":"2","name":"#2","status":"NOT_EXECUTED","startTimeMillis":1642165415793,"endTimeMillis":1642165463650,"durationMillis":47857,"queueDurationMillis":71,"pauseDurationMillis":0,"stages":\\\\{"_links":{"self":{"href":"https://j..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/execution/node/17/wfapi/describe"}},"id":"17","name":"odsPipeline start","execNode":"","status":"SUCCESS","startTimeMillis":1642165458315,"durationMillis":4006,"pauseDurationMillis":0}
       
      one can see the status as "status":"NOT_EXECUTED" which is clearly wrong. This is causing downstream issues for example in the openshift plugin which shows the status "pending" for the job - rather than "completed"
       

          [JENKINS-67618] /wfapi/describe returns wrong overall status ("NOT EXECUTED") for jenkins job that was flagged with NOT_BUILT

          Clemens Utschig created issue -
          Clemens Utschig made changes -
          Description Original: we set the BUILD_STATUS in the current build to NOT_BUILT thru the standard API

                          currentBuild.result = 'NOT_BUILT'
           
           
          and it's showing up correctly in blue ocean as "not_built"
           
          but if the WF API us used 
           
          {"_links":\{"self":{"href":"https://..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/wfapi/describe"}},"id":"2","name":"#2","status":"NOT_EXECUTED","startTimeMillis":1642165415793,"endTimeMillis":1642165463650,"durationMillis":47857,"queueDurationMillis":71,"pauseDurationMillis":0,"stages":[\{"_links":{"self":{"href":"https://j..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/execution/node/17/wfapi/describe"}},"id":"17","name":"odsPipeline start","execNode":"","status":"SUCCESS","startTimeMillis":1642165458315,"durationMillis":4006,"pauseDurationMillis":0}]} 
           
          one can see the status as "status":"NOT_EXECUTED" which is clearly wrong
           
          New: we set the BUILD_STATUS in the current build to NOT_BUILT thru the standard API

                          currentBuild.result = 'NOT_BUILT'
            
            
           and it's showing up correctly in blue ocean as "not_built"
            
           but if the WF API us used 
            
           \{"_links":{"self":{"href":"https://..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/wfapi/describe"}},"id":"2","name":"#2","status":"NOT_EXECUTED","startTimeMillis":1642165415793,"endTimeMillis":1642165463650,"durationMillis":47857,"queueDurationMillis":71,"pauseDurationMillis":0,"stages":[\\{"_links":{"self":{"href":"https://j..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/execution/node/17/wfapi/describe"}},"id":"17","name":"odsPipeline start","execNode":"","status":"SUCCESS","startTimeMillis":1642165458315,"durationMillis":4006,"pauseDurationMillis":0}]} 
            
           one can see the status as "status":"NOT_EXECUTED" which is clearly wrong. This is causing downstream issues for example in the openshift plugin which shows the status "pending" for the job - rather than completed
            
          Clemens Utschig made changes -
          Description Original: we set the BUILD_STATUS in the current build to NOT_BUILT thru the standard API

                          currentBuild.result = 'NOT_BUILT'
            
            
           and it's showing up correctly in blue ocean as "not_built"
            
           but if the WF API us used 
            
           \{"_links":{"self":{"href":"https://..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/wfapi/describe"}},"id":"2","name":"#2","status":"NOT_EXECUTED","startTimeMillis":1642165415793,"endTimeMillis":1642165463650,"durationMillis":47857,"queueDurationMillis":71,"pauseDurationMillis":0,"stages":[\\{"_links":{"self":{"href":"https://j..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/execution/node/17/wfapi/describe"}},"id":"17","name":"odsPipeline start","execNode":"","status":"SUCCESS","startTimeMillis":1642165458315,"durationMillis":4006,"pauseDurationMillis":0}]} 
            
           one can see the status as "status":"NOT_EXECUTED" which is clearly wrong. This is causing downstream issues for example in the openshift plugin which shows the status "pending" for the job - rather than completed
            
          New: we set the BUILD_STATUS in the current build to NOT_BUILT thru the standard API

                          currentBuild.result = 'NOT_BUILT'
            
            
           and it's showing up correctly in blue ocean as "not_built" - and also in the logs:


          [Pipeline] }[Pipeline] // withCredentials[Pipeline] }[Pipeline] // wrap[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineFinished: NOT_BUILT

            
           but if the WF API us used 
            
           \{"_links":{"self":{"href":"https://..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/wfapi/describe"}},"id":"2","name":"#2","status":"NOT_EXECUTED","startTimeMillis":1642165415793,"endTimeMillis":1642165463650,"durationMillis":47857,"queueDurationMillis":71,"pauseDurationMillis":0,"stages":[\\\{"_links":{"self":{"href":"https://j..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/execution/node/17/wfapi/describe"}},"id":"17","name":"odsPipeline start","execNode":"","status":"SUCCESS","startTimeMillis":1642165458315,"durationMillis":4006,"pauseDurationMillis":0}|file://%7B%22_links%22:%7B%22self%22:%7B%22href%22:%22https://j..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/execution/node/17/wfapi/describe%22%7D%7D,%22id%22:%2217%22,%22name%22:%22odsPipeline%20start%22,%22execNode%22:%22%22,%22status%22:%22SUCCESS%22,%22startTimeMillis%22:1642165458315,%22durationMillis%22:4006,%22pauseDurationMillis%22:0%7D]} 
            
           one can see the status as "status":"NOT_EXECUTED" which is clearly wrong. This is causing downstream issues for example in the openshift plugin which shows the status "pending" for the job - rather than completed
            
          Clemens Utschig made changes -
          Description Original: we set the BUILD_STATUS in the current build to NOT_BUILT thru the standard API

                          currentBuild.result = 'NOT_BUILT'
            
            
           and it's showing up correctly in blue ocean as "not_built" - and also in the logs:


          [Pipeline] }[Pipeline] // withCredentials[Pipeline] }[Pipeline] // wrap[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineFinished: NOT_BUILT

            
           but if the WF API us used 
            
           \{"_links":{"self":{"href":"https://..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/wfapi/describe"}},"id":"2","name":"#2","status":"NOT_EXECUTED","startTimeMillis":1642165415793,"endTimeMillis":1642165463650,"durationMillis":47857,"queueDurationMillis":71,"pauseDurationMillis":0,"stages":[\\\{"_links":{"self":{"href":"https://j..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/execution/node/17/wfapi/describe"}},"id":"17","name":"odsPipeline start","execNode":"","status":"SUCCESS","startTimeMillis":1642165458315,"durationMillis":4006,"pauseDurationMillis":0}|file://%7B%22_links%22:%7B%22self%22:%7B%22href%22:%22https://j..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/execution/node/17/wfapi/describe%22%7D%7D,%22id%22:%2217%22,%22name%22:%22odsPipeline%20start%22,%22execNode%22:%22%22,%22status%22:%22SUCCESS%22,%22startTimeMillis%22:1642165458315,%22durationMillis%22:4006,%22pauseDurationMillis%22:0%7D]} 
            
           one can see the status as "status":"NOT_EXECUTED" which is clearly wrong. This is causing downstream issues for example in the openshift plugin which shows the status "pending" for the job - rather than completed
            
          New: we set the BUILD_STATUS in the current build to NOT_BUILT thru the standard API

                          currentBuild.result = 'NOT_BUILT'
            
            
           and it's showing up correctly in blue ocean as "not_built" - and also in the logs:

          [Pipeline] }[Pipeline] // withCredentials[Pipeline] }[Pipeline] // wrap[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineFinished: NOT_BUILT

           
           but if the WF API (+/wfapi/describe+) is used: 
            
           \{"_links":{"self":{"href":"https://..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/wfapi/describe"}},"id":"2","name":"#2","status":"NOT_EXECUTED","startTimeMillis":1642165415793,"endTimeMillis":1642165463650,"durationMillis":47857,"queueDurationMillis":71,"pauseDurationMillis":0,"stages":[\\\\{"_links":{"self":{"href":"https://j..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/execution/node/17/wfapi/describe"}},"id":"17","name":"odsPipeline start","execNode":"","status":"SUCCESS","startTimeMillis":1642165458315,"durationMillis":4006,"pauseDurationMillis":0}|file://%7B%22_links%22:%7B%22self%22:%7B%22href%22:%22https://j..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/execution/node/17/wfapi/describe%22%7D%7D,%22id%22:%2217%22,%22name%22:%22odsPipeline%20start%22,%22execNode%22:%22%22,%22status%22:%22SUCCESS%22,%22startTimeMillis%22:1642165458315,%22durationMillis%22:4006,%22pauseDurationMillis%22:0%7D]} 
            
           one can see the status as "status":"NOT_EXECUTED" which is clearly wrong. This is causing downstream issues for example in the openshift plugin which shows the status "pending" for the job - rather than "completed"
            

            Unassigned Unassigned
            clemensutschig Clemens Utschig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: