-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
make sure status code error code is propogated to devloopEndEvent #4468
make sure status code error code is propogated to devloopEndEvent #4468
Conversation
Testing on cloud code samples,
Events:
|
Readiness Healthcheck Test
|
Codecov Report
@@ Coverage Diff @@
## master #4468 +/- ##
==========================================
+ Coverage 72.26% 72.33% +0.06%
==========================================
Files 331 332 +1
Lines 12863 12929 +66
==========================================
+ Hits 9296 9352 +56
- Misses 2975 2981 +6
- Partials 592 596 +4
Continue to review full report at Codecov.
|
return proto.StatusCode_STATUSCHECK_SUCCESS | ||
} | ||
|
||
func (d *Deployment) WithPodStatuses(scs []proto.StatusCode) *Deployment { |
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.
This seems like a test function that shouldn't be here?
@@ -195,12 +206,15 @@ func statusCheckEventSucceeded() { | |||
}) | |||
} | |||
|
|||
func statusCheckEventFailed(err error) { | |||
aiErr := sErrors.ActionableErr(sErrors.StatusCheck, err) | |||
func statusCheckEventFailed(err error, errCode proto.StatusCode) { |
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.
This ordering is inconsistent with StatusCheckEventEnded()
@@ -299,8 +319,22 @@ func DevLoopFailedWithErrorCode(i int, statusCode proto.StatusCode, err error) { | |||
|
|||
// DevLoopFailed notifies that a dev loop has failed in a given phase | |||
func DevLoopFailedInPhase(iteration int, phase sErrors.Phase, err error) { |
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.
We really need to improve this. I think we should be aiming to generate the StatusCode at the error-raising time so that we're not guessing.
ba07b17
to
f1a9f52
Compare
Last commit removes spurious empty logs output that results from no log out or output with a trailing newline:
|
Also avoid spurious empty lines in log output Co-authored-by: Brian de Alwis <bdealwis@google.com>
Also avoid spurious empty lines in log output Co-authored-by: Brian de Alwis <bdealwis@google.com>
As discovered when testing, the
DevLoopEndEvent
consumed by IDEs do not contain the failure seen in deploy phase.In this PR,
StatusCode
toBiuldState
,DeployState
andStatusCheckState
deploy.StatusCheck
to report first deployment with a pod error asStatusCheck.ErrorCode
.( in future, maybe we should create this as an array. One or more distinct error code can happen for multi-service deployments, e.g.
ImagePullErr
for "foo" deployment andPodUnhealthy
for "bar" deployment)DevLoopFailedInPhase
now consumes the newly addedStatusCode
.Other small changes:
diag.validator.Pod
to only fetch events when unknown error code is read.