Skip to content

infra: port leaderboard.yml's three shell steps to Python and pin its runner (GEN-005 + RUN-001, #962) #2812

Closed

Description

@zackees

What

ci-lint precheck on origin/master (5fd1c516d, linter pin a1917ce7…) reports four approved
exceptions for one path
, .github/workflows/leaderboard.yml:

rule finding
GEN-005 jobs.update.steps[3] (Generate): 3 shell lines (cp … site/*, touch .nojekyll, uv run generate.py)
GEN-005 jobs.update.steps[5] (Render JPEG): 4 shell lines (playwright install + 3 render.py calls)
GEN-005 jobs.update.steps[6] (Commit to leaderboard branch): 6 lines with &&/$( ) control syntax
RUN-001 jobs.update.runs-on = 'ubuntu-latest' (a -latest label; the fleet label is ubuntu-24.04)

Header at that commit: 5 violation(s), 407 approved exception(s), 10 needs_review.

Why this is a clean unit

  • All four findings are one path, so clearing them deletes two [[exceptions]] blocks (GEN-005 and
    RUN-001) and takes 4 off the baseline: 407 -> 403 approved, violations unchanged.
  • It is this repo's own workflow, not upstream OBS zsh/PowerShell: the three steps are a plain command
    sequence. The only control syntax is one git diff --cached --quiet && { echo "no changes"; exit 0; }
    (step 3) and $(date -u +%FT%H:%MZ) in the commit message — both straightforward in Python.
  • The job already runs astral-sh/setup-uv (with the save-cache expression), so a one-line
    uv run --no-project ci/leaderboard.py <cmd> step needs no environment change.
  • Step indices stay stable (3 steps replaced 1:1), so no CACHE-001/CACHE-013 step-index churn.

Plan (one PR, infra/<issue>-leaderboard-python)

  1. RED: ci/test_leaderboard_python.py — the module is absent and the workflow still carries the
    multi-line run: blocks and runs-on: ubuntu-latest; every case fails on master.
  2. GREEN: ci/leaderboard.py with generate / render / commit subcommands, the three workflow
    steps become one line each (uv run --no-project ci/leaderboard.py …), runs-on: ubuntu-24.04,
    both ci.toml blocks deleted.
  3. ci/test_conversion_card.py pins the literal render.py data conversion.html conversion.jpg order
    in the workflow text; after the port it asserts the module's own argv order instead (the module is
    where the renders now live), and the measure-before-render ordering stays asserted on the workflow.

Acceptance

  • ci-lint precheck on the branch: 5 violation(s), 403 approved exception(s), 10 needs_review, with
    no leaderboard.yml line in the GEN-005 or RUN-001 sections and nothing else moving.
  • uv run ci/local_gate.py --only self-test green, including the repointed ci/test_conversion_card.py
    and the existing ci/test_leaderboard_schedule.py.
  • The leaderboard.yml schedule is untouched: cron: "17 */4 * * *", workflow_dispatch:, the
    concurrency group, and the fork guard (github.repository == 'obs-rust/obs-studio').

Refs #962.

Activity

  1. added
    infra
    on Oct 28, 2026
  2. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    Claiming: investigation — the four GEN-005/RUN-001 findings are already enumerated per step index in the issue body, so there is no open question; this is the port itself.

    Plan: RED ci/test_leaderboard_python.py (module absent, multi-line steps and ubuntu-latest still present), then GREEN ci/leaderboard.py + three one-line steps + ubuntu-24.04 + both ci.toml blocks deleted. One PR, infra/2812-leaderboard-python, this tick.

  3. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    /ready
    All four findings are one path and fully specified per step index in the body (steps[3], steps[5], steps[6], and the ubuntu-latest label), the change is CI-only with no product behaviour, and the one-line-per-step shape is the same GEN-005 recipe already merged for sanitizers.yaml (#2780) and the composite actions.

  4. added
    needs-investigation
    on Oct 28, 2026
  5. self-assigned this
    on Oct 28, 2026
  6. added
    ready
    and removed
    needs-investigation
    on Oct 28, 2026
  7. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    Claiming: the port (single PR, infra/2812-leaderboard-python).

    RED 0fdbdca32 (ci/test_leaderboard_python.py, 14 cases) fails on master: no ci/leaderboard.py, three multi-line run: blocks, runs-on: ubuntu-latest, and both ci.toml blocks still present (11 failures, 1 error).

  8. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    Port opened as #2818 (infra/2812-leaderboard-python).

    • RED 0fdbdca32: ci/test_leaderboard_python.py, 14 cases; on master 11 failures + 1 error (no module, three multi-line blocks, ubuntu-latest, both ci.toml blocks present).
    • GREEN a8ac9c0ed: ci/leaderboard.py (generate / render / commit) with the identical argv, the three steps one line each, runs-on: ubuntu-24.04, both ci.toml blocks deleted, ci/test_conversion_card.py repointed at the module's render order.
    • ci-lint precheck: master 5v/407a/10nr -> branch 5v/403a/10nr, no leaderboard.yml line left; self-test suite green (one host-load flake in test_tier2_serial_cpus.py, green on re-run).
  9. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    Handed off: #2818 is green and queued for merge.

    • PR CI CI Gate ✅ (run 40714943435): Fast Gate 3m50s, Format/checks 1m54s, Validate Data, CI Mode, Event Data all pass; no other job ran (a ci/-only change).
    • precheck on the branch: 5 violation(s), 403 approved exception(s), 10 needs_review vs master's 5v/407a — the four findings for this path are gone and no other rule moved.
    • The one local red, test_tier2_serial_cpus.py (elapsed 1.8267 vs the 1.8 s threshold), is a host-load timing flake in an untouched test; green on a clean re-run.

    Remaining for this path: nothing — the leaderboard branch run after merge is the end-to-end proof of the new steps.

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

Metadata

Metadata

Assignees

Labels

infraready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions