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

Add force option to POST /jobs/jobId/_stop and POST /ex/exId/_stop endpoints #3491

Merged
merged 11 commits into from
Dec 12, 2023

Conversation

busma13
Copy link
Contributor

@busma13 busma13 commented Dec 8, 2023

This PR adds a force option to the POST /jobs/{jobId}/_stop and POST /ex/{exId}/_stop endpoints

  • include force='true' as a request parameter to forcefully stop all jobs, deployments, replicaSets and pods labeled with the execution ID in the url or the execution ID associated with the jobID in the url.
  • This overrides the default behavior of not allowing a job with a status of 'completed', 'stopped', 'rejected', 'failed', 'terminated', or 'stopping' to be stopped.
  • Endpoint documentation updated.
  • Adds a test for deleting with force set to true.
  • Modifies delete job, service, and deployment tests to expect the complete response, not the response.body.

Ref: #2670

@busma13 busma13 requested a review from godber December 8, 2023 20:03
@busma13 busma13 marked this pull request as draft December 8, 2023 21:33
Adjust delete tests to return whole request, not just body.
- Add `pods` option to `delete` function
- Remove loop through pods in `jobs` force
- Add calls to `delete(<name> 'pods')` when using force
@busma13 busma13 marked this pull request as ready for review December 11, 2023 22:37
@godber
Copy link
Member

godber commented Dec 12, 2023

I'm going to merge this, no need to add the comments, perhaps in a later PR. Note, I've bumped the Teraslice version to v0.89.0 so I can make a release.

@godber godber merged commit f0b27a7 into master Dec 12, 2023
39 checks passed
@godber godber deleted the force-stop-option branch December 12, 2023 22: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.

2 participants