Add ExecutionStatusMarkedAsFailed #5423
Open
+21
−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.
SHOULD ONLY BE MERGED AFTER https://github.com/grafana/k6-cloud-testcoordinator/pull/373
What?
This PR adds a new status to mark the end of a test:
ExecutionStatusMarkedAsFailedthat should be set whenexecution.test.fail()is called in the test.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)
Tests availabel here: https://github.com/grafana/k6-cloud-integration-tests/pull/137
Part of https://github.com/grafana/k6-cloud/issues/4022