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
Fix more subtle durability issues #223
Changes from 4 commits
2338f88
ee259e9
7c4faa9
cc61b6f
40dd2c4
e173bca
6069196
dde404b
7b9ebe0
e0f0025
646b1d2
06e56f2
8d1b7f5
3cbc60c
3fa7b8e
6ffcf33
a1083fc
2d3a219
12d6c8e
85e99f1
2ec83cc
d4eb956
9c9e958
a87587a
adc109f
fc93844
c7f44a7
7567a0a
297d820
b51d1ba
2516111
474f325
46cd988
5e16362
d824047
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -794,11 +794,7 @@ public void evaluate() throws Throwable { | |
|
||
private static void assertBuildNotHung(@Nonnull RestartableJenkinsRule story, @Nonnull WorkflowRun run, int timeOutMillis) throws Exception { | ||
if (run.isBuilding()) { | ||
try { | ||
story.j.waitUntilNoActivityUpTo(timeOutMillis); | ||
} catch (AssertionError ase) { // Allows attaching a debugger here | ||
throw new AssertionError("Build hung: " + run, ase); | ||
} | ||
story.j.waitUntilNoActivityUpTo(timeOutMillis); | ||
} | ||
} | ||
|
||
|
@@ -877,7 +873,7 @@ public void evaluate() throws Throwable { | |
@Override | ||
public void evaluate() throws Throwable { | ||
WorkflowRun run = story.j.jenkins.getItemByFullName(jobName, WorkflowJob.class).getLastBuild(); | ||
if (run == null) { | ||
if (run == null) { // Build killed so early the Run did not get to persist | ||
return; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this expected? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Happened in testing -- if the fuzzer kills things too early the Run may not even have had time to be created yet (rare but happens). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably deserves a comment to that effect. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (resolved) |
||
} | ||
if (run.getExecution() != null) { | ||
|
@@ -925,7 +921,7 @@ public void evaluate() throws Throwable { | |
@Override | ||
public void evaluate() throws Throwable { | ||
WorkflowRun run = story.j.jenkins.getItemByFullName(jobName, WorkflowJob.class).getLastBuild(); | ||
if (run == null) { | ||
if (run == null) { // Build killed so early the Run did not get to persist | ||
return; | ||
} | ||
if (run.getExecution() != null) { | ||
|
@@ -983,7 +979,7 @@ public void evaluate() throws Throwable { | |
@Override | ||
public void evaluate() throws Throwable { | ||
WorkflowRun run = story.j.jenkins.getItemByFullName(jobName, WorkflowJob.class).getLastBuild(); | ||
if (run == null) { | ||
if (run == null) { // Build killed so early the Run did not get to persist | ||
return; | ||
} | ||
if (run.getExecution() != null) { | ||
|
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.
Certainly sounds like it should be a warning to me, but maybe I am missing something?