Add API endpoints to pause/unpause new job submissions#1872
Conversation
Co-authored-by: vcastellm <47026+vcastellm@users.noreply.github.com>
Co-authored-by: vcastellm <47026+vcastellm@users.noreply.github.com>
Co-authored-by: vcastellm <47026+vcastellm@users.noreply.github.com>
Fixed in commit 46aee24. Changed TestAPIPauseUnpause to use port 8097 instead of 8096, which was already in use by TestAPIGetNonExistentJobReturnsNotFound. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot there's still a collision with the port used in |
Co-authored-by: vcastellm <47026+vcastellm@users.noreply.github.com>
Fixed in commit 1904b79. Changed TestAPIPauseUnpause to use port 8102 (previously collided with TestAPIJobCreateUpdateValidationBadSchedule which uses port 8097). Verified port 8102 is not used by any other test or postJob call. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1872 +/- ##
==========================================
+ Coverage 31.68% 33.11% +1.43%
==========================================
Files 76 76
Lines 6937 7129 +192
==========================================
+ Hits 2198 2361 +163
- Misses 4436 4460 +24
- Partials 303 308 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Proposed changes
Implements temporary pause control for new job submissions. When paused, the system rejects job creation/update requests with HTTP 503 while existing jobs continue executing.
API Changes:
GET /v1/pause- Returns current pause statusPOST /v1/pause- Pauses new job submissionsPOST /v1/unpause- Resumes new job submissionsImplementation:
AgentusingpauseNewJobsbool withpauseMumutexjobCreateOrUpdateHandlerreturns 503 when pausedTestAPIPauseUnpause(using port 8102 to avoid conflicts)Usage:
Addresses operator needs for maintenance windows and rolling updates without stopping the scheduler or existing executions.
Types of changes
What types of changes does your code introduce?
Put an
xin the boxes that applyOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.