Add ExecutionStatusMarkedAsFailed #5464
Open
+16
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
This PR adds a new status to mark the end of a test: ExecutionStatusMarkedAsFailed that should be set when
execution.test.fail()is called in the test. This is only creating the status so we can use it in the test-coordinator (see PR)Then, we'll be able to use it in another PR but this PR requires the changes in the test-coordinator to be merged and deployed first so it knows how to handle this new status.
Why?
This will allow to return a better status in the Cloud. For now, the associated k6-cloud-testcoordinator PR uses this to return
cloudapi.RunStatusAbortedUser(as if the test was interrupted withabort) but we could work with the cloud team next to introduce a new status.Note, that an alternative to this if we only want to focus on the short-term solution would be to use
ExecutionStatusInterruptedinstead. Then, we wouldn't need the PR in k6-cloud-testcoordinator to returncloudapi.RunStatusAbortedUser(as it's already the case whenExecutionStatusInterruptedis received).Checklist
make check) and all pass.Checklist: Documentation (only for k6 maintainers and if relevant)
Please do not merge this PR until the following items are filled out.
Related PR(s)/Issue(s)
Part of https://github.com/grafana/k6-cloud/issues/4022