-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add documentation to k6 exit codes definitions #3200
Conversation
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.
Great stuff ❤️ Thanks for doing this 🙇
To be more precise, one possible improvement could be to explicitly name k6's REST API
in the places where it's mentioned. What do you think?
I'm sorry, I'm not sure to understand what you're suggesting. What changes do you have in mind? 🙇🏻 |
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.
@oleiade I've added direct suggestion feel free to accept or drop them
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.
Save for a couple of cases like ExternalAbort
, most of these comments seem redundant to me, as they repeat in prose what is already self-explained by the constant names. But if you and others find this helpful, I'm not against it.
@imiric they might seem redundant, but in fact, such comments also help go documentation properly parse and put such constants into the proper place. E.g. right now the section is empty https://pkg.go.dev/go.k6.io/[email protected]/errext/exitcodes#pkg-constants For sure the consts themself, are still presented and self-explanatory, but they also provide a better UX with a bit of cost. |
I agree that they might come up as redundant, but they're actually the result of me struggling to match k6 exit codes to their meaning "easily". I'd still like to merge them, and eventually even improve them 👍 |
Co-authored-by: Oleg Bespalov <[email protected]>
Co-authored-by: Oleg Bespalov <[email protected]>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3200 +/- ##
==========================================
+ Coverage 72.85% 73.13% +0.27%
==========================================
Files 256 256
Lines 19804 19890 +86
==========================================
+ Hits 14429 14546 +117
+ Misses 4474 4414 -60
- Partials 901 930 +29
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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 have the same opinion as @imiric, but I guess if others find it useful -let's do it.
Co-authored-by: Oleg Bespalov <[email protected]>
What?
This Pull Request adds Godoc documentation comment to k6 exit codes.
I've added my context, but if reviewers have more about specific exit codes they wish to add, that would be the perfect opportunity.
Why?
Having recently been in the situation of interpreting the status code (on-call) for debugging purposes, I found that in some instances, the reason and context for each status code could have been more straightforward. Hence, I added documentation to each of them, albeit probably not complete and not having as much context as possible.
Checklist
make ci-like-lint
) and all checks pass.make tests
) and all tests pass.Related PR(s)/Issue(s)