Skip to content

feat(roadmap): pause Argo Workflow submission when the Service queue exists #7820

Backlog

Description

@devops-cli-service

Split from #7454.

ProblemThe maintenance window needs to stop new Argo Workflows. The Service has no queued Argo Workflow path today. src/devops_cli/roadmap/job_launcher.py:11-12 says a WorkflowLauncher takes its place after #4566. submit_workflow in src/devops_cli/argo/crd.py:381 has one caller, devops argo workflows submit in src/devops_cli/commands/argo.py:730.## Why deferredIssue #4566 builds the Service Argo Workflow queue. This issue cannot test a pause for a path that does not exist. This part waits on #4566.## Acceptance criteria- The Service MUST submit no new Argo Workflow while a pause is in force.- A queued Workflow MUST stay queued while a pause is in force.- devops roadmap resume SHALL let the next Service poll submit the queued Workflow.- A test MUST fail on the base for each case: no new Workflow starts while paused, and work starts again after the resume or after the end time.

Proposed design

Problem statement

The maintenance window must stop new Argo Workflows from the roadmap Service. The Service has no pause on its Workflow path today. This change reads a pause key in Valkey before each Service submission, keeps a queued Workflow queued, and releases it on devops roadmap resume or when the key TTL ends. It waits on #4566, which builds the Service Workflow queue.

Acceptance criteria

Requirement: Paused launcher submits no Workflow

The Service launcher MUST submit no Argo Workflow while a pause key is in force.

Scenario: Pause in force at a new Workflow

  • WHEN the pause key is present and the Service launcher takes a new Workflow
  • THEN the launcher returns a paused result, leaves the Workflow in the queue and calls its submit seam zero times.

Requirement: Paused poll keeps the queued Workflow

A queued Workflow MUST stay queued while a pause key is in force.

Scenario: Poll with one queued Workflow

  • WHEN the roadmap poll runs while the pause key is present and one Workflow waits in the queue
  • THEN the poll leaves the Workflow in the queue, calls the submit seam zero times and the queue depth stays one.

Requirement: Resume clears the pause

devops roadmap resume SHALL delete the pause key and set the roadmap due mark.

Scenario: Resume with a pause in force

  • WHEN devops roadmap resume runs while the pause key is present
  • THEN the command deletes the pause key and sets the due mark of the roadmap row in the store.

Requirement: Resume releases the queued Workflow

The Service poll SHALL submit the queued Workflow after a resume.

Scenario: Poll after a resume

  • WHEN the pause key is absent after a resume and one Workflow waits in the queue
  • THEN the poll submits the Workflow and removes it from the queue.

Requirement: End time ends the pause

The pause SHALL end at its end time without a manual resume.

Scenario: Pause TTL expires

  • WHEN the pause TTL passes and the next poll runs
  • THEN the store holds no pause key, the poll submits the queued Workflow and removes it from the queue.

Existing Tool Considered

No alternatives check has run. No open, maintained tool covers a pause of the Service's own Workflow queue. Argo Workflows suspends a Workflow after it creates it. It cannot hold a submission before creation. Valkey holds the pause, and it is no launcher. Build the pause in the Service launcher. Cost: about 1,500 tokens to build, 500 tokens to keep and fix, and about 2 hours elapsed.

Key questions

  • Which queue holds the Service Argo Workflow?: The Service Workflow queue that feat(k8s): let Argo Workflows run roadmap pods in devops #4566 builds. job_launcher.py says a WorkflowLauncher takes the place of the Job launcher after the engine step (feat(k8s): let Argo Workflows run roadmap pods in devops #4566). ADR 0008 makes Argo Workflows the engine of the queued work. [sources: src/devops_cli/roadmap/job_launcher.py]
  • Where does the Service keep the pause state?: In Valkey, the shared state store of the Service (ADR 0021). One key per repository holds the pause. Its TTL is the end time. ADR 0022 gives the key name from the repository reference. (best practice) [sources: CONTEXT.md]
    • Chosen: Valkey key with a TTL. ADR 0021 makes Valkey the shared state of the Service. The store ends the pause at the end time.
    • Rejected: GitHub label on the issue. A label is slow and rate-limited. It is no runtime state of the Service.
    • Rejected: Local file in the pod. A pod has no shared disk. Each lane reads a different pause.
  • Where does the Service enforce the pause?: In the Service launcher, before it calls submit_workflow. The CLI command devops argo workflows submit keeps its current behavior. (best practice) [sources: src/devops_cli/roadmap/job_launcher.py, src/devops_cli/argo/crd.py:381, src/devops_cli/commands/argo.py:730]
    • Chosen: Service launcher before the submit call. The issue limits the pause to the Service. The launcher covers each Service submission.
    • Rejected: Inside submit_workflow. It would block the manual CLI command and change an unrelated path.
    • Rejected: In each command caller. A check in the launcher covers each Service submission. A caller check can miss one.
  • Should a manual devops argo workflows submit stop during a pause?: No. The pause covers the Service queue only. A person can still submit a Workflow by hand during the maintenance window. (best practice) [sources: src/devops_cli/commands/argo.py:730, src/devops_cli/argo/crd.py:381]
    • Chosen: Service only. The issue names the Service. The manual command is an operator escape hatch.
    • Rejected: All submissions. It removes the operator path and expands the issue beyond the Service.
    • Rejected: Manual with an override flag. It adds a flag with no requirement and no test need.
  • How does a resume release queued work before the end time?: devops roadmap resume deletes the pause key and sets the due mark of the roadmap row. The next sweep reads the due mark and the poll submits the queued Workflow. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/job_launcher.py]
    • Chosen: Delete the key and set the due mark. The due mark makes the next sweep due at once, without a wait for the interval (ADR 0021).
    • Rejected: Delete the key only. The next submission waits for the next interval. The resume has no immediate effect.
    • Rejected: Submit from the resume command. It puts queue work in a command path and gives the queue a second poll owner.
  • How does the pause end at its end time?: The pause key carries a TTL equal to the end time. The store deletes the key when the TTL ends. The next poll sees no pause. A test uses a fake clock to check the boundary. (best practice) [sources: CONTEXT.md]
    • Chosen: Valkey TTL on the pause key. The store expires the key with no extra job. A fake clock can test the boundary.
    • Rejected: A timestamp value that code checks. It needs a cleanup job or a manual delete. It can leave a stale pause.
    • Rejected: A scheduled job clears the pause. It adds a job for a state that the store can expire.
  • How does each pause test fail on the base commit?: Each test drives the launcher with a fake pause store and a fake submit seam. The base after feat(k8s): let Argo Workflows run roadmap pods in devops #4566 has no pause check. The paused phase calls the seam. The assertion of zero calls fails. AGENTS.md rule 4 puts the test first. [sources: src/devops_cli/roadmap/job_launcher.py, AGENTS.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4566

Activity

  1. added
    type/feature
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/medium
    priority/p2-medium
    on Nov 29, 2026
  2. devops-cli-service commented on Nov 29, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.

  3. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions