-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Don't hang builds on BuildManager internal errors #5917
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
Changes from all commits
ab339d7
4dd56eb
564dd95
04273cc
fb4f36c
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 |
---|---|---|
|
@@ -2184,20 +2184,13 @@ private void OnThreadException(Exception e) | |
continue; | ||
} | ||
|
||
submission.CompleteLogging(false); | ||
ladipro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// Attach the exception to this submission if it does not already have an exception associated with it | ||
if (submission.BuildResult?.Exception == null) | ||
if (!submission.IsCompleted && submission.BuildResult != null && submission.BuildResult.Exception == null) | ||
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. Doesn't 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. If submission.BuildResult is null, submission.BuildResult?.Exception is null; (I ran this.) 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. With value type fields, one can write something like 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. You're right; it's the null-to-bool comparison that saves the former case which doesn't apply here. |
||
{ | ||
if (submission.BuildResult == null) | ||
{ | ||
submission.BuildResult = new BuildResult(submission.BuildRequest, e); | ||
} | ||
else | ||
{ | ||
submission.BuildResult.Exception = _threadException.SourceException; | ||
} | ||
submission.BuildResult.Exception = e; | ||
} | ||
submission.CompleteLogging(waitForLoggingThread: false); | ||
submission.CompleteResults(new BuildResult(submission.BuildRequest, e)); | ||
ladipro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
CheckSubmissionCompletenessAndRemove(submission); | ||
} | ||
|
@@ -2211,17 +2204,11 @@ private void OnThreadException(Exception e) | |
} | ||
|
||
// Attach the exception to this submission if it does not already have an exception associated with it | ||
if (submission.BuildResult?.Exception == null) | ||
if (!submission.IsCompleted && submission.BuildResult != null && submission.BuildResult.Exception == null) | ||
{ | ||
if (submission.BuildResult == null) | ||
{ | ||
submission.BuildResult = new GraphBuildResult(submission.SubmissionId, e); | ||
} | ||
else | ||
{ | ||
submission.BuildResult.Exception = _threadException.SourceException; | ||
} | ||
submission.BuildResult.Exception = e; | ||
ladipro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
submission.CompleteResults(submission.BuildResult ?? new GraphBuildResult(submission.SubmissionId, e)); | ||
|
||
CheckSubmissionCompletenessAndRemove(submission); | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.