Skip to content

feat(roadmap): start the runner Job from implement --item - #2959

Merged
dan-petty merged 9 commits into
mainfrom
feat/2913-implement-outside-runner
Oct 31, 2026
Merged

dan-petty merged 9 commits into
mainfrom
feat/2913-implement-outside-runner

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

devops roadmap implement --item <n> --confirm now starts the runner Job when it runs outside a runner pod. Before, it refused and a person had to type a long devops k8s run-job command.

What changes:

  • The command makes the Job with the same code as devops k8s run-job --template runner (start_job). It follows the log and exits with the exit code of the container. --no-wait prints the name of the Job. --context chooses the cluster.
  • It refuses before it makes the Job: a claimed Item, an Item that is not Ready or Planned, a closed issue, a repository that is not owner/name, and a repository with a runner Job that has not ended. With --confirm it also refuses --source, --filter, --limit and a missing --item, and it names the run-job command.
  • --dry-run --item <n> makes no request and prints the Job. It ignores the options that need the runner.
  • The runner Job and its pod carry the label implement-repo, which the Service already uses as its lock. The label is a digest of the lower-case repository name. run-job and the Service make no Job while a Job with that label has not ended. The lock is best effort, and the documents say so.
  • A token request for a repository that the App does not cover now fails with an error that names the repository.
  • A dot segment (. or ..) is no longer valid in the token repository.

The step still runs only in the pod. The OpenSpec change is archived in the last commit.

Closes #2913

…run ignore runner options (#2913)

Hash the casefolded repository for the Job label, so every spelling of a name has one lock. Check --repo before any read. Refuse a dot segment in the token repository. A dry run no longer refuses --limit, --filter and --source.
…ory the App lacks (#2913)

The Service lists the runner Jobs again after its plan and before it creates one. A token request for a repository that the installation lacks now names the repository in the error.
Name the test files that changed, state that the lock is best effort, and add the scenarios for the repository check and the dry run options.
@dan-petty dan-petty added type/feature Type feature: a new function scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Oct 31, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test results

Full uv run devops ci on the branch (rebased on origin/main): all checks pass except one known local failure. The test check ran 4m 7s (247 s). The whole run took 4m 19s.

The known failure is tests/commands/test_scan_outcomes_and_gating.py::test_scan_report_skips_named_scanners. The devcontainer has kube-linter on PATH. The test passes on GitHub. This is issue #2165.

Fail-to-pass

uv run devops ci fail-to-pass --base origin/main: 45 tests fail on the base and pass on the branch (45 failed and 70 passed in tests/commands/k8s/test_k8s_run_job.py, tests/github/test_github_app_identity.py, tests/roadmap/test_roadmap_implement_outside.py and tests/roadmap/test_roadmap_implement_submit.py; 0 errored).

Review findings fixed

  • Dry run with --limit, --filter or --source (two findings): the refusal now applies only with --confirm. A dry run ignores these options.
  • The lock was case sensitive: repository_label now hashes the lower-case name. The fake kubectl now filters Jobs by the -l selector, so the tests prove the lock.
  • The lock was not atomic: the Service lists the Jobs again after its plan and before its create. The spec, the design and k8s/README.md say the lock is best effort. A hard lock needs a server object such as a Lease. That is a separate item.
  • --repo was read before it was validated: --repo is now checked before any read. The token repository refuses . and .. segments.
  • A repository that the App does not cover: the pod error now names the repository (HTTP 422 gives no other hint). A test covers it, and the proposal says the failure shows in the pod log.
  • The archived tasks and proposal named test files that this change does not touch: they now name the files that changed.

Findings not fixed

None.

@dan-petty
dan-petty marked this pull request as ready for review October 31, 2026 23:38
@dan-petty
dan-petty merged commit 7c59283 into main Oct 31, 2026
19 checks passed
@dan-petty
dan-petty deleted the feat/2913-implement-outside-runner branch October 31, 2026 23:42
dan-petty pushed a commit that referenced this pull request Nov 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.36.0](v0.35.0...v0.36.0)
(2026-11-01)


### Features

* **k8s:** add bootstrap-mattermost command
([#2945](#2945))
([#2955](#2955))
([66ed3bf](66ed3bf))
* **k8s:** add bootstrap-mattermost command for webhooks and secrets
([#2948](#2948))
([4b22158](4b22158))
* **roadmap:** add devops roadmap explain
([#2960](#2960))
([8bc5e39](8bc5e39)),
closes [#2911](#2911)
* **roadmap:** start the runner Job from implement --item
([#2959](#2959))
([7c59283](7c59283)),
closes [#2913](#2913)
* **telemetry:** preview requests in dry run for monitoring commands
([#2954](#2954))
([eea778d](eea778d))
* **vault:** preview requests in dry run for valkey and vault commands
([#2941](#2941))
([91a971e](91a971e)),
closes [#2253](#2253)


### Bug Fixes

* **telemetry:** shutdown test waits for events not timers
([#2961](#2961))
([369ed25](369ed25)),
closes [#2690](#2690)
* **tests:** test waits end on event or process exit
([#2952](#2952))
([df07ee9](df07ee9)),
closes [#2138](#2138)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(roadmap): devops roadmap implement outside the runner runs the runner Job

1 participant