Skip to content
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

Do not warn when triggered job is a success #375

Merged
merged 5 commits into from
May 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Do not warn when triggered job is a success
I keep having log messages such as:

  WARNING: [hudson.plugins.parameterizedtrigger.TriggerBuilder perform]
  Attempting to use the result of unfinished build <name of job> #1234

The message was introduced in #161 by 06d8f19 but in #148 / 02ee6ea,
mapBuildResult() was made to return `null` by default (eg on SUCCESS).

The resut is the warning is always triggered when the triggered build
succeeds.

Fixes https://phabricator.wikimedia.org/T336782
  • Loading branch information
hashar committed Apr 10, 2024
commit 57171a72c032e2240d996436e29ee80a7be7c0b5
Original file line number Diff line number Diff line change
@@ -187,11 +187,8 @@
if (buildStepResult
&& config.getBlock().mapBuildStepResult(completedRun.getResult())) {
Result r = config.getBlock().mapBuildResult(completedRun.getResult());
if (r != null) {
if (r != null) { // The blocking job is not a success

Check warning on line 190 in src/main/java/hudson/plugins/parameterizedtrigger/TriggerBuilder.java

ci.jenkins.io / Code Coverage

Partially covered line

Line 190 is only partially covered, one branch is missing
build.setResult(r);
} else {
LOGGER.warning("Attempting to use the result of unfinished build "
+ completedRun.toString());
}
} else {
buildStepResult = false;