Skip to content

ci(scheduled): run the three nightly steps as one Python call each (GEN-005, #2822) - #2824

Merged
zackees merged 2 commits into
masterfrom
infra/2822-scheduled-python
Oct 28, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/2822-scheduled-python

Conversation

@zackees

@zackees zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member

The three multi-line run: steps in .github/workflows/scheduled.yaml are one Python call each, so the path's GEN-005 exception is gone. Fixes #2822, Refs #962.

RED

68b3db384 adds ci/test_scheduled_steps.py, which fails on the tree it was committed to (module absent, the three shell blocks still in place, the ci.toml exception still there) — uv run python -m unittest ci/test_scheduled_steps.py -> FAILED (failures=15, errors=1):

ERROR: test_same_commit_already_ran (CheckNightlyRunsTest)   FileNotFoundError: ci/scheduled_steps.py
FAIL: test_nightly_checks_are_one_call (upload-language-files)   '' != 'run: uv run --no-project --script ${{ github.workspace }}/ci/scheduled_steps.py check-nightly-runs'
FAIL: test_no_block_run_step_left   'run: |' is in the workflow
FAIL: test_no_gen_005_exception_left   [{'rule': 'GEN-005', 'path': '.github/workflows/scheduled.yaml', ...}] != []

ci/test_nightly_failure_issue.py's test_reuses_an_open_issue_instead_of_piling_up was the other red: it pinned gh issue list --state open in the workflow, which the port moves into the module.

GREEN

7c867f574:

  • ci/scheduled_steps.py, two subcommands, each one step's argv and exit status:
    • check-nightly-runs — the Check Nightly Runs step both upload-language-files (bash) and steam-upload (zsh) carry: gh run list --workflow scheduled.yaml --limit 2 --json headSha --jq '.[1].headSha' (the second entry is the run before this one, since the first is the active run), then GITHUB_SHA compared with it. Equal means this commit already ran the nightly -> passed=false; otherwise passed=true and, as the bash copy wrote it, lastNightly=<sha>. Both go to $GITHUB_OUTPUT. The zsh copy omitted lastNightly, which only the bash job's check-changes step reads, so one subcommand serves both jobs.
    • report-nightly-failure — the same title, the same body from SHA/RUN_URL, the same gh issue list --state open --search 'in:title "<title>"' lookup, then gh issue comment on the open issue or gh issue create when there is none. GH_TOKEN/GH_REPO stay in the step's env:.
  • scheduled.yaml — each run: is one uv run --no-project --script ${{ github.workspace }}/ci/scheduled_steps.py <step> line.
  • report-nightly-failure gains actions/checkout (it had none, and the module lives in the repo — the same miss infra: the Sanitizers "Select passes" job runs ci/sanitizers_step.py with no checkout (master weekly red) #2797 caught on the sanitizers pick step) plus the pinned astral-sh/setup-uv, and the contents: read the checkout needs.
  • upload-language-files and steam-upload gain the pinned setup-uv step; steam-upload drops its zsh default, since no shell step is left.
  • ci.toml: the path's GEN-005 [[exceptions]] block is deleted. ci/test_nightly_failure_issue.py now asserts the one-line step and the module's argv words, so the behaviour it pinned is still pinned.

Verification

  • uv run python -m unittest ci/test_scheduled_steps.py -> OK (14 tests) on GREEN.
  • uv run python -m unittest ci/test_nightly_failure_issue.py -> OK (3 tests) on GREEN.
  • ./lint -> ok (48.7s), the full ci self-test lane included.

Build tooling only: no docs/features.md line.

Not verified here: upload-language-files and steam-upload are upstream-only (github.repository_owner == 'obsproject'), and report-nightly-failure runs only after a failed scheduled build, so the first real proof is the next scheduled run. The stub gh in the tests is the local evidence, as in the sibling ports (#2792, #2780, #2816).

git diff origin/master --stat shows the five intended files and no plugins/obs-websocket pointer change.

…2822)

`ci/scheduled_steps.py` carries them:

- `check-nightly-runs` is the `Check Nightly Runs` step in both
  `upload-language-files` (bash) and `steam-upload` (zsh): the same
  `gh run list --workflow scheduled.yaml --limit 2 --json headSha` argv,
  the `GITHUB_SHA` comparison, and `passed` (plus `lastNightly`, which
  only the bash copy wrote) in `$GITHUB_OUTPUT`.
- `report-nightly-failure` is the issue the failed nightly opens or
  updates: the same title and body, the same `gh issue list --search`
  lookup, then `gh issue comment` or `gh issue create`.

`report-nightly-failure` gains the `actions/checkout` and pinned
`setup-uv` steps the module needs (it had no checkout at all), with the
`contents: read` its grant now requires. `steam-upload` drops its `zsh`
default: no shell step is left. The path's GEN-005 exception goes.

Refs #2822, #962.
@zackees
zackees added this pull request to the merge queue Oct 28, 2026
@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator.

  • ./lint clean (48.7 s, the full ci self-test lane included); uv run python -m unittest ci/test_scheduled_steps.py and ci/test_nightly_failure_issue.py OK.
  • PR CI green, CI Gate ✅ SUCCESS.
  • Queued: gh pr merge 2824 says "already queued to merge".
  • No local-gate stamp: the change selects no Rust/C lane, so ./unittest covers nothing here and the stamp would only ask CI to skip jobs that did not run anyway.

git diff origin/master --stat: .github/workflows/scheduled.yaml, ci.toml, ci/scheduled_steps.py, ci/test_scheduled_steps.py, ci/test_nightly_failure_issue.py. No plugins/obs-websocket pointer change.

Merged via the queue into master with commit 6908c9d Oct 28, 2026
34 checks passed
@zackees
zackees deleted the infra/2822-scheduled-python branch October 28, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

infra: port scheduled.yaml's three block run: steps to Python (GEN-005, #962)

1 participant