Skip to content
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

Include k6-api status PATCH with info on how to stop test. Resolve #162. #371

Merged
merged 9 commits into from
Aug 11, 2021

Conversation

Griatch
Copy link
Contributor

@Griatch Griatch commented Aug 10, 2021

Include the k6-api PATCH endpoint, with an example of how to use it to stop the running test via the API. Resolve #162.

@Griatch Griatch requested review from ppcano and simskij August 10, 2021 12:45
@github-actions
Copy link
Contributor

There's a version of the docs published here:

https://mdr-ci.staging.k6.io/docs/refs/pull/371/merge

It will be deleted automatically in 30 days.

Copy link
Contributor

@imiric imiric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things should be changed, but I'm wondering why we have hideFromSidebar: true for this documentation? @ppcano

We don't link it from anywhere else AFAICT, and the only way to get to this page is via the search (or web search), so I think we should link it in the left sidebar.

Comment on lines 593 to 605
```bash
curl -X PATCH \
http://localhost:6565/v1/status \
-H 'Content-Type': application/json' \
-d '{
"data": {
"type": "status",
"id": "default",
"attributes": {
"stopped": true
}
}
}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some unbalanced quotes here (there shouldn't be an end quote after Content-Type), and the alignment is not quite right. Maybe also use two space indent as in the other examples?

See how it's rendered on https://mdr-ci.staging.k6.io/docs/refs/pull/371/merge/es/misc/k6-rest-api/#modify-setup .

Copy link
Contributor Author

@Griatch Griatch Aug 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I honestly couldn't find this thing in the generated docs and the staging version doesn't have a search, so I planned to keep searching tomorrow. I agree this must definitely be in the sidebar too.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few internal links on particular features

https://k6.io/docs/using-k6/scenarios/executors/externally-controlled/
https://k6.io/docs/testing-guides/running-large-tests/

We removed it on purpose because the REST API might be deprecated. I think a k6 core team suggested this.

Related issue #367

@@ -6,8 +6,8 @@ hideFromSidebar: true
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these changes in the Spanish translated files? You should also do them in the /en/ version, but shouldn't this file be translated @ppcano?

Copy link
Contributor Author

@Griatch Griatch Aug 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was my original mistake - I can't find any of this 'naturally' in the docs, so I went with the markdown file I first found without noticing that it was under the es/ folder - and since it's not translated I didn't notice that until a while after a I committed. I already copied this to the english version (I'll update both with your suggestions).

@Griatch
Copy link
Contributor Author

Griatch commented Aug 10, 2021

@imiric I pushed the changes you suggested. Thanks for the review! I don't think the 'preview' is building on updates though.

@ppcano The spanish page is untranslated, so I just copied my changes verbatim to it. I also removed the hideFromSideBar from the header since this page is literally impossible to find if you don't know its name otherwise - please confirm that though.
Also - once approved, I'll squash the commits before this is ready to merge.

@Griatch Griatch requested a review from imiric August 10, 2021 22:09
@ppcano ppcano merged commit 0794044 into master Aug 11, 2021
ppcano added a commit that referenced this pull request Aug 12, 2021
* master:
  fix: resolved eslint warnings (#373)
  Include k6-api status PATCH with info on how to stop test. Resolve #162. (#371)
  Adding Grafana Cloud to the Integration list
@Griatch Griatch deleted the fix/issue162 branch August 12, 2021 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use the rest API to stop the test
3 participants