Repository navigation
Description
Problem
The maintenance window of dan-petty/homelab (README.md, "Maintenance Window", step 1) starts a node step only when no work runs: no active Job, no running Workflow, no Argo CD sync or rollout, no runner pod. The roadmap Service starts its stage, implement and fix Jobs in namespace devops without a pause, so that check rarely passes.
On 2026-11-27 an agent waited from 16:07 to 18:38 UTC to run dan-petty/homelab#558 (a cordon and a k3s-agent restart of three agent nodes, then a k3s restart of the server). In that time the check never passed: stage Jobs of dan-petty/homelab#522, #4566, dan-petty/homelab#292 and #7318 followed each other (deadline 3 h each), and a rag-ingest Workflow ran. No command of devops-cli stops the Service from starting new Jobs: devops ai quiesce sets a flag and stops nothing.
Proposed remedy
A Service setting or command that stops the start of new Jobs and Workflows, lets the running ones end, and starts them again after the window, with the state visible in the Service status. The window then runs: pause, wait for quiet, step, resume. A pause that is still on after a set time ends by itself, so a failed window does not stop the roadmap.
Acceptance
- One command (or setting) pauses the start of new Service Jobs and Workflows; a running Job ends normally; a second command resumes.
devops roadmapstatus (or the Service status) shows the pause and its end time.- A test fails on the base for each of: no new Job starts while paused; work starts again after the resume or after the end time.
- The homelab README "Maintenance Window" names the pause and the resume as steps.
Alternatives check of 2026-11-27: partly.
Tool: kubernetes-sigs/kueue (https://github.com/kubernetes-sigs/kueue), Apache-2.0, last activity 2026-11-27, maintained.
Reason: Kueue's ClusterQueue stopPolicy Hold stops new Jobs while running Jobs finish and None resumes, but it does not pause Workflows, expire automatically, or show in the Service status.
Covers:
- Stops admission of new Jobs with ClusterQueue stopPolicy Hold
- Lets running Jobs finish instead of evicting them
- Resumes admission when stopPolicy returns to None
- ClusterQueue status marks inactive admission
Lacks:
- No pause for Argo Workflows
- No automatic expiry or end time
- No devops roadmap or Service pause status
- Service Jobs must be submitted through Kueue queues
Proposed design
Problem statement
The maintenance window of dan-petty/homelab runs a node step only when no roadmap work runs. The roadmap Service starts new runner Jobs at any time, so the window waits for hours. A pause command stops new runner Jobs, lets running Jobs end, resumes, and ends by itself at a set time. The Service status shows the pause.
Acceptance criteria
Requirement: Pause records the end time
devops roadmap pause --until <time> SHALL write the pause key in the shared Valkey state with the end time and a TTL that ends at that time.
Scenario: Pause writes the key with a TTL
- WHEN
devops roadmap pause --until 2026-11-27T18:00:00Zruns against a fake Valkey client - THEN the key
roadmap:pauseholds2026-11-27T18:00:00Zand its TTL is the number of seconds from now to that time
Requirement: Pause requires an end time
devops roadmap pause SHALL refuse a call with no --until time and exit with a usage error.
Scenario: Pause without end time is refused
- WHEN
devops roadmap pauseruns with no--untiloption - THEN the command exits with code 2 and prints a usage error that names
--until
Requirement: Service poll creates no Job while paused
The Service poll MUST create no new runner Job while a pause is in force.
Scenario: Paused poll creates no Job
- WHEN the Service
_pollmethod runs with a pause in force and a due roadmap job - THEN the poll calls no
job_launcher.launchand logs the pause end time
Requirement: Running Job ends normally
The pause command and the Service poll MUST NOT delete or evict a runner Job that already runs.
Scenario: Running Job keeps its result
- WHEN a pause is set while a runner Job runs
- THEN the pause command and the Service poll make no Kubernetes delete or evict call for that Job
Requirement: Resume clears the pause
devops roadmap resume SHALL delete the pause key, so that the next Service poll creates a runner Job.
Scenario: Resume clears the key
- WHEN a pause is in force and
devops roadmap resumeruns against a fake Valkey client - THEN the pause key is gone and the next Service poll calls
job_launcher.launch
Requirement: Pause ends by itself
A pause MUST end at its end time when no command runs.
Scenario: Expired pause starts work
- WHEN the end time of the pause has passed and the Service poll runs
- THEN the pause key has expired and the poll calls
job_launcher.launch
Requirement: Service status shows the pause
The Service status route GET /api/v1/status SHALL include the pause and its end time when a pause is in force.
Scenario: Status response includes the pause
- WHEN
GET /api/v1/statusruns while a pause is in force - THEN the JSON response holds
pause.untilwith the end time in UTC
Existing Tool Considered
kubernetes-sigs/kueue (https://github.com/kubernetes-sigs/kueue), verdict partly. The alternatives check in the issue body lists what the tool covers and lacks. The proposal does not adopt Kueue. Each Service Job would need a Kueue queue. Kueue does not pause Workflows, expire automatically, or show in the Service status. The pause does what Kueue lacks. It uses a Valkey key with a TTL for expiry. It gates the Service poll before job_launcher.launch. It adds the pause to the Service status route. The Workflow pause is deferred to a new issue that waits on #4566. Cost to build the pause instead: about 70k tokens to build, keep and fix the code, and about 2 days elapsed.
Key questions
- Which component starts the work of the Service while the sweep does not exist?: The Service poll in
src/devops_cli/server/service.pystarts the work. Its_tick_loopand_pollmethods calljob_launcher.launchto create a runner Job. The pause gate belongs in that poll, before the launch. The future sweep from feat(roadmap): run the reconcile sweep on a cluster schedule #4574 must call the same gate. [sources: src/devops_cli/server/service.py:997-1035, src/devops_cli/roadmap/job_launcher.py:111, CONTEXT.md] - Where does the pause state live?: The pause state lives in the shared Valkey state as one key with the end time and a TTL that ends at that time. The Service poll reads the key and creates no runner Job while it is present. (best practice) [sources: CONTEXT.md, k8s/devops/roadmap-service/deployment.yaml]
- Chosen: Valkey key with a TTL. The Service already reads the shared Valkey state, and the TTL ends the pause with no second writer.
- Rejected: Kueue ClusterQueue stopPolicy Hold. It covers Jobs only, has no end time and shows nothing in the Service status.
- Rejected: Suspend field of the Service CronJobs. It stops a schedule only, sets no end time, and the Service creates a Job for an item itself.
- Rejected: A file in the configuration. Each replica reads its own copy, and a file has no expiry.
- Which work does the pause stop?: The pause stops the start of new runner Jobs only. The Service poll creates no Job, and the pause deletes no running Job. A running Job ends with its own result. The pause stops the Service poll only. A person's manual command still starts a Job. The Workflow submission path does not exist yet, so this issue defers the Workflow pause to a new issue that waits on feat(k8s): let Argo Workflows run roadmap pods in devops #4566. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/job_launcher.py:11-12, src/devops_cli/server/service.py:997-1035]
- Chosen: Stop new runner Jobs only. A maintenance window needs the running Job to end by itself, and a cancel loses the work of that Job.
- Rejected: Stop new Jobs and cancel running Jobs. A cancel loses the work of a Job and leaves a half-written branch.
- Rejected: Stop the poll of the Service. The poll reconciles the state of each item, so the pause holds only the creation of a Job (ADR 0017).
- How does the pause end?: The end time is required:
--until <time>sets it, and the TTL of the key ends the pause with no command. A pause with no end time is refused. (best practice) [sources: CONTEXT.md]- Chosen: Required end time, held by a TTL. The pause ends at the time that the person names, and a failed window cannot stop the roadmap.
- Rejected: Default duration of 3 hours. A forgotten pause then stops the roadmap for the length of a stage deadline.
- Rejected: A reaper sweep that deletes an expired key. It adds a second writer and code, where the TTL already ends the pause.
- Does the pause reuse the flag of
devops ai quiesce?: No.devops ai quiescesets a flag that stops no Job. The pause is a separate key, so a change of the AI quiesce flag changes no roadmap work. (best practice) [sources: docs/CLI_REFERENCE.md, CONTEXT.md]- Chosen: A separate pause key. One key has one meaning, and a caller of quiesce never stops a roadmap Job.
- Rejected: Reuse the quiesce flag. It names AI calls, and its meaning would change for each caller.
- How does a person see the pause?: The Service status route
GET /api/v1/statusincludes the pause and its end time in UTC.devops roadmap statusdoes not exist, and this issue does not create it. The Service status is the status that the window step reads. (best practice) [sources: src/devops_cli/server/routes/status.py:41, docs/ROADMAP_WORKFLOW.md]- Chosen: Add the pause to the Service status route. The route already exists, and the issue body accepts the Service status as the place to show the pause.
- Rejected: Create
devops roadmap status. It adds a new command and its tests, where the Service status route already serves the window step. - Rejected: Only the log of the Service. A person must see the pause and its end time in the window step.
- What happens to the pause of Argo Workflow submission?: This issue defers it. The Service has no queued Argo Workflow path:
job_launcher.pysays a WorkflowLauncher takes its place after feat(k8s): let Argo Workflows run roadmap pods in devops #4566, andsubmit_workflowhas one caller,devops argo workflows submit. The new issue waits on feat(k8s): let Argo Workflows run roadmap pods in devops #4566. [sources: src/devops_cli/roadmap/job_launcher.py:11-12, src/devops_cli/argo/crd.py:381, src/devops_cli/commands/argo.py:730]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 27, 2026
Both stop the Service from starting new work, but #5967 triggers on gateway health while this candidate triggers on a manual maintenance-window pause with auto-resume.devops-cli-service commentedon Nov 27, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (10)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.
dan-petty commentedon Nov 29, 2026
Returning
#7454toNew: this item cannot be built as written because multiple prerequisites named in its requirements, scenarios, and key questions do not exist onmain(DependenciessaysNone).Observed evidence on
mainand GitHub:No cluster sweep exists yet (
Requirement: No unit of work starts while paused):CONTEXT.md:157-159documents:Until #4574 merges, the poll of the Service does this work.#4574(feat(roadmap): run the reconcile sweep on a cluster schedule) is stillOPEN, and the related ADR 0021 Valkey shared-state items#4563,#4564, and#4565are alsoOPEN.src/devops_cli/server/service.py:997-1035still runs_tick_loop/_poll.No Service Argo Workflow submission or queue exists (
Requirement: Workflow submission stops):src/devops_cli/roadmap/job_launcher.py:11-12documents:A WorkflowLauncher takes this place after the engine step (#4566).#4566(feat(k8s): let Argo Workflows run roadmap pods in devops) is stillOPEN.submit_workflow(src/devops_cli/argo/crd.py:381) has only one caller acrosssrc/devops_cli/:src/devops_cli/commands/argo.py:730(devops argo workflows submit). Todayimplement,fix-checks,infra-plan, andstagelaunch Kubernetes Jobs viajob_launcher.launch(src/devops_cli/roadmap/job_launcher.py:111), and the Service has no queued Workflow path.No
devops roadmap statuscommand exists (Requirement: Status shows the pause):src/devops_cli/commands/roadmap.py:62-82registers nostatussubcommand (onlysrc/devops_cli/server/routes/status.py:41exists for/api/v1/status). Key Question 6 assumesdevops roadmap statusalready exists and adds "One line indevops roadmap status."Per
AGENTS.mdRule 2, I wrote no compensating code for the missing sweep (#4574) or Workflow queue (#4566). Either add dependencies (#4566,#4574) or update#7454to target the currentjob_launcher/ServiceManagerpoll path and specify creatingdevops roadmap status.devops-cli-service commentedon Nov 29, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.
feat(roadmap): add Service maintenance pause window commands and gate (…
test(roadmap): avoid type-ignore comments in pause tests (#7454)
chore(main): release 0.258.0 (#7846)
devops-cli-service commentedon Nov 29, 2026
Released in v0.258.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.258.0
devops-cli-service commentedon Nov 30, 2026
Live since 2026-11-30 00:51 UTC