-
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
HTTP API route for aborting execution #1352
Comments
hmm... that could work, though you shouldn't add a plain |
Including a new `stop` cmd to trigger it via the HTTP API. Closes grafana#1352.
Great, that seems to work as expected... |
I run load tests on a remote instance(s) with no SSH access. If a test goes awry, i'd like to be able to terminate it as quickly as possible and shutting down the instance can sometimes take several seconds/minutes. The HTTP API is great for pausing/resuming tests quickly - it would be nice and tidy if i could also abort a test in the same way (which in my case leads to the output being saved and the instance terminated).
Suggested Solution (optional)
I see the various
context
s in play, but no easy path to cancel the parent created in the run cmd from the http API. The existing OS interrupt/term signal handling is graceful enough, but forcing a signal back into the process from the API feels wrong, and (i think) lacks some support on Windows.Would simply adding a bool to the Engine struct and testing for it at the end of the
select
in Engine.Run() (https://github.com/loadimpact/k6/blob/new-schedulers/core/engine.go#L222) be an option you'd consider?If so, any suggestions for the HTTP route (ie; adding to the
/status
PATCH, or a new route/different verb?)The text was updated successfully, but these errors were encountered: