Repository navigation
feat: add execution_result to /v1/status API - #6388
Conversation
| body, err := io.ReadAll(resp.Body) | ||
| require.NoError(t, err) | ||
| assert.Equal(t, int64(exitcodes.ScriptAborted), | ||
| gjson.GetBytes(body, "data.attributes.execution_result.exit_code").Int()) |
There was a problem hiding this comment.
JSON testing is here to avoid importing v1 package for just 1 test. LMK if you're OK with the import instead.
32517de to
2888dd1
Compare
|
Hello! Marking this as ready for review. This PR was tested on k6-operator use case with the help of this PR grafana/k6-operator#901 The script contained deliberate There is no inter-dependency between PRs: they can be merged in any order. This PR in k6 CLI just unlocks a better UX. |
|
Can you please rebase this on latest master (we had a bunch of updates in recent days an I do not know if you are on top of it) and ten fix the lint issues. |
2888dd1 to
1945db7
Compare
|
@mstoykov done 👍 |
mstoykov
left a comment
There was a problem hiding this comment.
LGTM! thank you for the contribution
What?
Adding a new field to HTTP status API, to have early access to expected exit code value. Esp. valuable in
--lingermode.Why?
Full context is in this issue:
grafana/k6-operator#796 (comment)
Checklist
make check) and all pass.make checkhas failures, but they are pre-existing to this change.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)