-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JENKINS-27284: Constrain build result severity #95
Conversation
This change adds a per-job setting to constrain the build result nastiness set by the plugin for problems that occur inside the plugin. That is, an S3 failure that would normally result in a FAILURE can be constrained to UNSTABLE or SUCCESS. This addresses JENKINS-27284 <https://issues.jenkins-ci.org/browse/JENKINS-27284> by providing a way to prevent S3 plugin failures from causing an otherwise successful build to be marked as having failed.
This supersedes #53 |
@@ -69,6 +70,7 @@ public S3BucketPublisher(String profileName, List<Entry> entries, List<MetadataP | |||
|
|||
this.dontWaitForConcurrentBuildCompletion = dontWaitForConcurrentBuildCompletion; | |||
this.consoleLogLevel = parseLevel(consoleLogLevel); | |||
this.pluginFailureResultConstraint = Result.fromString(pluginFailureResultConstraint); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly, default value for pluginFailureResultConstraint
would be null
(for users who just updated plugin). Please, adjust default value to keep backward compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jimilian How this latest commit?
@@ -236,9 +259,9 @@ public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath ws, @Nonnull Launc | |||
run.addAction(new S3ArtifactsAction(run, profile, artifacts)); | |||
run.addAction(new FingerprintAction(run, record)); | |||
} | |||
} catch (IOException e) { | |||
} catch (Exception e) { // Any failure in this plugin should be constrained according to config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to suppress InterruptedException
? It could break a lot of stuff. Because it would continue execution then it's not desired.
If build was interrupted by Jenkins (i.e. aborted from timeout plugin, executor was stopped from UI, etc.), it doesn't have chance to pass (at least I can't imagine such case).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about now?
Great. Thanks you! |
This change adds a per-job setting to constrain the build result
nastiness set by the plugin for problems that occur inside the plugin.
That is, an S3 failure that would normally result in a FAILURE can
be constrained to UNSTABLE or SUCCESS.
This addresses JENKINS-27284
https://issues.jenkins-ci.org/browse/JENKINS-27284 by providing a
way to prevent S3 plugin failures from causing an otherwise successful
build to be marked as having failed.