jenkinsci / jenkinsci/workflow-support-plugin

[JENKINS-27574] RunWrapper.setResult() should be force set

Open
#379 3 comments 0 reactions 0 assignees View on GitHub
component:workflow-support-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
23
Forks
75
PR merge metrics
No merged PRs in 30d

Description

A user feedback came in that he expected currentBuild.result=success to forcibly set the build result to success, even if there was some earlier failure marked, such as via catchError step.

This behaviour originates in Core's Run.setResult() to prevent plugins from inadvertently masking early failures, but if it's the user doing it, I can see why this could be confusing.

RunWrapper could do a force set of the result to avoid such a confusion. If the user shoots himself in a foot, he has only himself to blame anyway.

---
Originally reported by kohsuke, imported from: RunWrapper.setResult() should be force set


  • status: Open
  • priority: Major
  • component(s): workflow-support-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 4
  • imported: 20260601-173816

Raw content of original issue

A user feedback came in that he expected currentBuild.result=success to forcibly set the build result to success, even if there was some earlier failure marked, such as via catchError step.

This behaviour originates in Core's Run.setResult() to prevent plugins from inadvertently masking early failures, but if it's the user doing it, I can see why this could be confusing.

RunWrapper could do a force set of the result to avoid such a confusion. If the user shoots himself in a foot, he has only himself to blame anyway.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.