-
Notifications
You must be signed in to change notification settings - Fork 170
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: treat Failed as error during test init #291
Conversation
Signed-off-by: Jorge Turrado <[email protected]>
is there a way to distinguish Test Errors ( for instance the ones from thresholds ) from Errors due to not being able to launch K6? I think it would give more insights for troubleshooting. |
I think that we can add another state like |
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.
It's been awhile so the PR will need to be rebased. But I've left comments to simplify the update :)
Thanks again!
case "Failed": | ||
// the init job has failed | ||
returnErr = errors.New("init job has failed") | ||
log.Error(returnErr, "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.
I think the if
check for "Failed" phase over here would be sufficient. And return of error as you did. So smth like:
case "Failed": | |
// the init job has failed | |
returnErr = errors.New("init job has failed") | |
log.Error(returnErr, "error:") | |
if initializerPhase == "Failed" { | |
// the initializer job has failed | |
returnErr = errors.New("initializer job has failed") | |
log.Error(returnErr, "error:") | |
} |
Please use "initializer" so as to distinguish from "init container".
k6.Status.Stage = "error" | ||
if _, err := r.UpdateStatus(ctx, k6, log); err != nil { | ||
return ctrl.Result{}, err | ||
} |
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 should now go a bit later in logic, over here:
k6-operator/controllers/k6_initialize.go
Line 65 in 568d40e
Also, the change of Status is done via k6.GetStatus().Stage = ...
for the moment.
Hello. |
Since there is no movement, we have created a new one here. |
Closing this due to PR #401 being merged. |
Fixes #290