-
Notifications
You must be signed in to change notification settings - Fork 25
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 a handler to kill a query #1304
Add a handler to kill a query #1304
Conversation
In our testing with external parties, it became quite evident that bouncing helpers if query fails is far from having good experience for people who run the test. We need to have an ability to kill queries that failed on one or more helper and restart the runs. This change does exactly that - adding a `/query_id/kill` handler that will respond with immediately aborting the task that runs an IPA query.
Thanks for adding this!! It's going to be really helpful. Can you also add an example of how to run this. Also, (n00b qn) I am supposing we would get a query id whenever a query is run to call this API? |
good point! I've updated the overview section to show how to terminate a query. Please let me know if something is not clear |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1304 +/- ##
==========================================
+ Coverage 93.41% 93.50% +0.08%
==========================================
Files 208 208
Lines 33798 33690 -108
==========================================
- Hits 31574 31502 -72
+ Misses 2224 2188 -36 ☔ 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.
thank you! this is awesome.
it would be worthwhile to also add a subcommand to the report collector binary that calls this on all helpers in a network file, but I can take that as a work item in follow up.
Great idea, this can totally be a separate PR to keep things manageable |
In our testing with external parties, it became quite evident that bouncing helpers if query fails is far from having good experience for people who run the test. We need to have an ability to kill queries that failed on one or more helper and restart the runs.
This change does exactly that - adding a
/query_id/kill
handler that will respond with immediately aborting the task that runs an IPA query.How to terminate a query?
if helper address is
helper.com
, one can terminate a query by sending a POST request toFor local testing it can be done easily with
curl
if query is killed successfully, the following response is provided by the helper