[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2020-05-06 Thread 'jgl...@cloudbees.com (JIRA)' via Jenkins Issues
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick commented on  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
 

Should this bug be re-opened
 As a general rule: no, not unless the originally described bug was not in fact fixed. If a change causes some undesirable behavior, file a separate bug with a Link to the original. In this case there is no bug, your script was simply relying on undocumented behavior. The FlowInterruptedException does include all the same information, just in a DownstreamFailureCause rather than the Throwable.message. Anyway using a catch block and the exception here was the wrong idiom even before this change. Set propagate: false and inspect the resulting build object’s status and other fields.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.22560.1588765920379%40Atlassian.JIRA.


[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2020-05-05 Thread jaysp...@amazon.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jay Spang edited a comment on  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
 This fix introduced a new bug in my pipeline.The `build` step used to throw _hudson.AbortException_, but was changed to _org.jenkinsci.plugins.workflow.steps.FlowInterruptedException_.The problem: AbortException had a "message" which contained the job name/number, along with its status. We used this in our error handling to include context to the error. FlowInterruptedException contains no message, so our error handling fails. Unless I'm missing something, it contains almost no information on what actually failed.Should this bug be re-opened, or a new bug opened to pass FlowInterruptedException some contextual information? EDIT: Here's a code snippet to help explain:{code:java}try{def results = build job: 'fooJob'def job_number = results.getNumber()} catch (e) {// AbortMessage included a message along the lines of...// "fooJob #13 completed with status FAILURE (propagate: false to ignore)"// We used this message to add context to the errordef msg = e.getMessage() // Sadly, this is null for FlowInterruptedException}{code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.22165.1588706220298%40Atlassian.JIRA.


[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2020-05-05 Thread jaysp...@amazon.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jay Spang commented on  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
 This fix introduced a new bug in my pipeline. The `build` step used to throw hudson.AbortException, but was changed to org.jenkinsci.plugins.workflow.steps.FlowInterruptedException. The problem: AbortException had a "message" which contained the job name/number, along with its status. We used this in our error handling to include context to the error. FlowInterruptedException contains no message, so our error handling fails. Unless I'm missing something, it contains almost no information on what actually failed. Should this bug be re-opened, or a new bug opened to pass FlowInterruptedException some contextual information?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.22148.1588704720289%40Atlassian.JIRA.


[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2020-04-17 Thread philippjung2...@live.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Philipp Jung commented on  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
 Thanks for clearing that up.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.13112.1587126180312%40Atlassian.JIRA.


[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2020-04-15 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick commented on  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
 

The second part of the "unstable -> success" stage is never executed.
 As designed. Your parent job should terminate at that point with an UNSTABLE status. This change does not make the build step complete normally; it just makes the exception thrown indicate to the Pipeline machinery that (if uncaught) the build should have the indicated status. If you do not want that, then use propagate: false as before.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.11566.1586953380685%40Atlassian.JIRA.


[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2020-04-15 Thread philippjung2...@live.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Philipp Jung commented on  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
 I can reproduce this again on both our Jenkins instances: with Build-Step 2.12 and Pipeline Groovy 2.80. Here is a minimal example: The second part of the "unstable -> success"  stage is never executed. 

 

// Parent Job
node(){
def stage_map = [:]
stage_map['success'] = trigger('SUCCESS')
stage_map['unstable -> success']= {trigger('UNSTABLE').call(); trigger('SUCCESS').call()} // The second SUCCESS step is never triggered

parallel(stage_map)
}

def trigger(status){
return {
def result = build job:
'test_child',
parameters: [
string(name: 'status', value: status)
]
}
}
 

 

 

// Child Job
node(){
  properties([
parameters([string(name: 'status', defaultValue: 'SUCCESS')])
]) 
currentBuild.result = params.status
}
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
You received 

[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2019-11-26 Thread dnusb...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Devin Nusbaum edited a comment on  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
 A fix for this issue was just released in Pipeline: Build Step Plugin version 2.10. Note that if you use this step inside of the {{parallel}} step, you may wish to update Pipeline: Groovy Plugin to version 2.77  (not yet released)  at the same time so that the result of {{parallel}} steps is the worst result of all branches rather than the result of the first completed branch.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.7391.1574802121745%40Atlassian.JIRA.


[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2019-11-26 Thread dnusb...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Devin Nusbaum updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-49073  
 
 
  build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
Change By: 
 Devin Nusbaum  
 
 
Released As: 
 pipeline-build-step 2.10 , workflow-cps 2.77  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.7399.1574802122058%40Atlassian.JIRA.


[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2019-11-26 Thread dnusb...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Devin Nusbaum updated  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 A fix for this issue was just released in Pipeline: Build Step Plugin version 2.10. Note that if you use this step inside of the parallel step, you may wish to update Pipeline: Groovy Plugin to version 2.77 (not yet released) at the same time so that the result of parallel steps is the worst result of all branches rather than the result of the first completed branch.  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-49073  
 
 
  build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
Change By: 
 Devin Nusbaum  
 
 
Status: 
 Fixed but Unreleased Resolved  
 
 
Released As: 
 pipeline-build-step 2.10  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 
 

[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2019-09-18 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick commented on  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
 For the record, workflow-cps #325 is handling the latter suggestion.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.718.1568854140254%40Atlassian.JIRA.


[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2019-09-17 Thread m...@basilcrow.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Basil Crow commented on  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
 

As designed,
 I have an upstream job that runs three downstream jobs in parallel to perform various types of testing (unit tests, integration tests, functional tests, etc). The behavior of the parallel step is currently problematic when combined with the default behavior of the build step (propagate: true). Suppose the following scenario occurs: 
 
The unit test job finishes first with a Result of SUCCESS. 
The integration test job finishes second with a Result of UNSTABLE. 
The functional test job finishes last with a Result of FAILURE. 
 With the current behavior as of workflow-cps 2.74 and (the as-yet-unreleased) pipeline-build-step 2.10, the upstream job's Result will be UNSTABLE, because the integration test job (which finishes before the functional test job) has a Result of UNSTABLE, even though the functional test job has a Result of FAILURE. While I understand that this is behaving as designed/documented, the current behavior isn't very conducive to my use case. In my use case, I want to report to the end user the "worst" of the downstream results in the result of the upstream job; i.e., given a set of downstream results of SUCCESS, UNSTABLE, and FAILURE, I want the upstream job to report FAILURE since it is the most serious of the three. Reporting UNSTABLE gives a false impression to the user because it hides the fact that a more serious failure occurred in one of the downstream jobs, simply because that failure occurred after a less serious failure in a different downstream job (which is irrelevant to the end user). So far, I've been able to work around this by setting propagate: false and adding some hacky logic like this to my pipeline: 

 

parallel buildSteps

def allNotBuilt = true
def seenUnstable = false
def seenFailure = false
buildResults.each { jobName, jobResult ->
  if (jobResult.result != 'NOT_BUILT') {
allNotBuilt = false
if (jobResult.result == 'UNSTABLE') {
  seenUnstable = true
}
if (jobResult.result == 'FAILURE' || jobResult.result == 'ABORTED') {
  seenFailure = true
}
  }
}
if (!allNotBuilt) {
  if (seenUnstable && !seenFailure) {
currentBuild.result = 'UNSTABLE'
  } else if (seenFailure) {
currentBuild.result = 'FAILURE'
  }
} else {
  currentBuild.result = 'NOT_BUILT'
}
 

 This type of logic is gross. Ideally, I think Pipeline would natively support this use case, perhaps through some new type of functionality in the parallel step that examines the result in each branch and propagates the "worst" one to the overall build result of the upstream job. What do you think? (Note that I'm interested in helping to implement this, if we want to go in this direction.)  
 

   

[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2019-07-12 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick updated  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-49073  
 
 
  build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
Change By: 
 Jesse Glick  
 
 
Status: 
 In Review Fixed but Unreleased  
 
 
Resolution: 
 Fixed  
 
 
Released As: 
 2.10  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.9083.1562953800492%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2019-06-03 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick commented on  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
 As designed, except that the main build should be set to UNSTABLE as well.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.19674.1559577600355%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2019-06-03 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick updated  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-49073  
 
 
  build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
Change By: 
 Jesse Glick  
 
 
Status: 
 In  Progress  Review  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.19664.1559577541588%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2019-06-03 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick assigned an issue to Jesse Glick  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-49073  
 
 
  build job propagate true propagates FAIL when state is UNSTABLE   
 

  
 
 
 
 

 
Change By: 
 Jesse Glick  
 
 
Assignee: 
 Jesse Glick  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.19643.1559576760767%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49073) build job propagate true propagates FAIL when state is UNSTABLE

2019-06-03 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick started work on  JENKINS-49073  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
Change By: 
 Jesse Glick  
 
 
Status: 
 Open In Progress  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.187899.1516619705000.19649.1559576760844%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.