Skip to content

ci: reduce queue runner demand while preserving complete Tier 2 coverage - #3917

Merged
zackees merged 2 commits into
masterfrom
infra/merge-queue-linux-headroom
Nov 7, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/merge-queue-linux-headroom

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Reduce Linux hosted-runner demand on PRs and merge groups from six Tier 2 test runners to two, running the complete OFF and ON CTest registry once each. Retain the existing six partitions on master pushes, nightly, manual and release callers. No test assertions, C tests, public headers, aggregate-gate code or ruleset settings change.

Refs #2072 and #930. Requested deliverable: leave this PR unmerged; no auto-merge or enqueue.

Decision

Choose compact scheduling over dropping OFF/serial coverage: all existing assertions remain on the queue path. all clears every part/shard/CPU partition selector, and CTest still honors RUN_SERIAL. Keep the standard Fast Gate and Tier 2 build/export checks. PRs use the same compact layout to reduce shared demand and validate the queue path before admission. Scheduling logic lives in ci/tier2_matrix.py; YAML only consumes its JSON output. Scheduling-policy edits invalidate both attestation and lane proofs.

Same-head PR attestation is insufficient for a synthetic merge tree; existing trusted input-keyed lane proofs already implement safe reuse. A timeout increase would hide the measured allocation bottleneck, so retain the 60-minute intent and reduce fan-out first.

Measurement: approximately 24 hours

Fetched 90 master merge-group runs using gh api 'repos/obs-rust/obs-studio/actions/runs?event=merge_group&created=%3E%3D2026-11-06T16%3A20%3A00Z&per_page=100', then /actions/runs/<id>/jobs?per_page=100 for each. The latest collected run was created 2026-11-07 16:27:07Z. All runs are attempt 1; no pagination was needed (90 runs; at most 41 jobs/run).

Compute queue = job.started_at − job.created_at, runtime = job.completed_at − job.started_at, only for jobs that acquired a runner. Dependency wait is excluded. Summary includes completed allocated jobs, including failures/cancellations; pending/unallocated jobs have unknown durations, not zero. The local CSV preserves 1,056 non-skipped records; raw dumps remain untracked per #2686. API collection is non-atomic, so top-level run conclusions can lag the per-job snapshot.

Job Completed allocated jobs Queue median / max (s) Runtime median / max (s)
CI Mode 🛂 89 90 / 882 24 / 29
Event Data 🔎 88 85 / 1268 16 / 24
Rust Tier 2 Linux 🐧 (build) 53 57 / 1046 307 / 653
Fast Gate ⚡ 85 17 / 1089 313 / 482
Rust Tier 2 Linux 🐧 (tests ON) 48 125.5 / 1381 217 / 242
Rust Tier 2 Linux 🐧 (tests ON, serial-1-of-2) 48 55.5 / 1922 148 / 182
Rust Tier 2 Linux 🐧 (tests OFF, serial-1-of-2) 48 108 / 2093 149.5 / 168
Rust Tier 2 Linux 🐧 (tests OFF, serial-2-of-2) 48 183 / 1698 142.5 / 171
Rust Tier 2 Linux 🐧 (tests ON, serial-2-of-2) 48 173 / 1976 142 / 157
Rust Tier 2 Linux 🐧 (tests OFF) 48 91 / 1531 215 / 275
CI Gate ✅ 86 16 / 928 14 / 23
Cache Janitor 🧹 81 5 / 1699 13 / 33
Qt Frontend Linux 🐧 9 19 / 1037 205 / 308
Cross Compile 🧰 (mac-arm64,win-x64) 17 3 / 150 180 / 209
Rust Cross Lint 🦀 (aarch64-apple-darwin) 8 3 / 518 293 / 331
Rust Cross Lint 🦀 (x86_64-pc-windows-msvc) 8 3 / 663 324.5 / 356
Rust Cross Lane Proof 🧾 2 38.5 / 75 4 / 5

All eight quoted queue/runtime pairs are independently confirmed, plus the
remaining Tier 2 partition:

Job Queue seconds Runtime seconds
Tier 2 OFF serial-1-of-2 2093 158
Tier 2 ON serial-2-of-2 1976 144
Tier 2 OFF serial-2-of-2 1698 149
Tier 2 OFF suite 1531 235
Tier 2 build 417 293
Fast Gate 152 411
Tier 2 ON suite 48 223
Tier 2 ON serial-1-of-2 215 139
CI Gate 177 11

The coordinator's quoted queue/runtime numbers are all confirmed exactly. Six test variants dominate the per-entry Tier 2 fan-out. The broader claim that every entry is close to ejection is not supported across the whole day: many earlier jobs waited only 2–5 seconds. Severe recent allocation delays are real; other Linux orchestration jobs also waited.

Before/after expectation

Scope Before Proposed
Tier 2 test allocations per PR/merge group 6 2
Tier 2 allocations including build 7 3
Test allocations at queue depth 5 30 10
Allocations including builds at depth 5 35 15
Required CTest coverage complete OFF + ON, partitioned complete OFF + ON, unfiltered

The example's six partitions consumed 1,048 runner-seconds; the longest took 235 s. A complete suite will take longer per runner because serial tests run there too. Four fewer allocations/setups/downloads per entry should reduce demand, but these observations do not predict a specific future queue delay or guarantee a hard wall-time bound. Measure the first post-rollout queue/main/nightly runs before claiming a measured speedup.

Hard proof obligations

  • Required context preserved continuously: ruleset 25065309 was only read. It remains active with sole required CI Gate ✅ (integration 15368), ALLGREEN/SQUASH, max build/merge 5/5, timeout 60 minutes. No ruleset API write, migration window or payload is needed.
  • Real failing aggregate gate: merge-group run 42382595386, Tier 2 ON job 128435760394 failed and CI Gate job 128436702367 failed. Logs show both Check Job Results exiting 1 and Check Run Jobs reporting that Tier 2 ON did not succeed. .github/workflows/ci.yml and ci/gate_jobs.py have zero diff: no new aggregate gate is being trusted without a failure observation.
  • Heavy partitions really execute: master-push run 42383307878 ran and passed all six test jobs: OFF suite/serial-1/serial-2 = 128440506750 / 128440506732 / 128440506729; ON suite/serial-1/serial-2 = 128440506686 / 128440506722 / 128440506662. Nightly/release-gate run 42387055731 also ran and passed all six: ON serial-2/suite/serial-1 = 128458403074 / 128458403076 / 128458403085; OFF serial-1/suite/serial-2 = 128458403082 / 128458403116 / 128458403119. They are retained for push/schedule/full release, with event-selection tests. This is historical execution proof; post-merge execution cannot be observed while honoring the requested unmerged deliverable. No tests are deferred, only parallel scheduling.

Validation

  • RED 5f6f07910: PYTHONPATH=ci uv run --no-project python -m unittest ci/test_tier2_matrix.py fails because the scheduling helper does not exist.
  • GREEN: 52 focused Tier 2 matrix, runtime, fan-out, cache-retention, compile-overlap and aggregate-gate checks passed.
  • Read-only clud-review: clean (one reviewer); independently checked all measured CSV statistics and the complete-registry execution path.
  • OBS_CTEST_JOBS=8 uvx --from git+https://github.com/zackees/ci.yml@a1917ce76598904ce515cd7eec83450c317ea6f2 ci-lint local-gate run was run before pushing and failed. Export parity passed (1,767 identical symbols), but the full C-reference run took 311.64 seconds and reported six failures out of 759 tests: test_deinterlace_2x_field_order_60i_into_60, test_pulse_stream_restart, test_ws_monitor_only, test_group_hide_transition_audio, test_pulse_monitor_samples, and test_scene_item_crop. ON execution was not reached after OFF failed. This is a local coverage result, not a hosted before/after speedup benchmark. The inherited SOLDR_PORCELAIN=1 also broke lint’s Cargo-metadata inventory parser; SOLDR_PORCELAIN=0 restores valid metadata, and SOLDR_PORCELAIN=0 ./lint subsequently passed in 201.3 seconds (including all Python self-tests, Rust formatting, Clippy and Dylint). No attestation is claimed. Rust-test/cross were not run after the heavy-lane failure. These local failures remain visible; no test/header changes, retries masking a failure, or skip exemptions were added.
  • Optional whole-tree ci-lint precheck --local --event pull_request --json reports 40 existing violations in untouched files (for example vcam/welcome/release workflows and existing shell/native paths); no violation names a changed file. No unrelated policy suppressions were added.

Decision and reproducible evidence: docs/ci-tier2-queue-capacity.md.

Hosted PR CI: run 42393538817 is pending; this proposal is not yet a demonstrated hosted speedup. The PR remains draft with auto-merge off.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Hosted red adjudicated: PRE-EXISTING master oracle-link breakage. Master push run 42393067345 has exact head 5653407. Job 128470923706 failed with the same five undefined obs_encoder_get_codec/type/id/type_data/caps symbols (log lines 602, 606, 610, 614, 618), then obs-util (lib test) failed at line 623. https://github.com/obs-rust/obs-studio/actions/runs/42393067345/job/128470923706

Separate live breakage: #3918, fix PR #3919. No unrelated Rust/C fix is being added here. Local six-test adjudication is still pending: the task requires a separate clean master worktree but also explicitly prohibits creating another checkout; clarification requested. Fresh local gate is running on locally rebased af1bad1; lint has reproduced inherited SOLDR_PORCELAIN=1 metadata parser failure (workspace_members). No attestation claimed, no push or enqueue, ruleset untouched.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Local gate completed on rebased af1bad1: FAILED after 528s, no lane passed, no Local-Gate attestation. Identical command: OBS_CTEST_JOBS=8 uvx --from git+https://github.com/zackees/ci.yml@a1917ce76598904ce515cd7eec83450c317ea6f2 ci-lint local-gate run. Inherited SOLDR_PORCELAIN=1 reproduced lint KeyError workspace_members. OFF C-reference: 7/763 failed, 301.03s: test_deinterlace_2x_field_order_50i_into_50, test_deinterlace_2x_field_order_50i_into_60, test_deinterlace_2x_field_order_50i_into_30, test_pipewire_screencast_resume, test_pulse_stream_restart, test_vlc_audio_pacing, test_vlc_playlist_gap. ON and later lanes not reached.

This is NOT proof of pre-existing local failures or a scheduling regression: unmodified-master comparison remains required. Blocked on conflicting task constraints: separate clean worktree required, creation of another checkout prohibited; permission/path question pending. No push, ready, enqueue, ruleset write, or unrelated code changes. Raw local log: /tmp/pr3917-rebased-local-gate.log. Hosted exact-base evidence is in the preceding comment.

@zackees
zackees force-pushed the infra/merge-queue-linux-headroom branch from 0c0c390 to af1bad1 Compare November 7, 2026 17:58
@zackees
zackees marked this pull request as ready for review November 7, 2026 17:58
@zackees
zackees added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 7, 2026
@zackees
zackees force-pushed the infra/merge-queue-linux-headroom branch from af1bad1 to a324464 Compare November 7, 2026 18:51
@zackees
zackees enabled auto-merge November 7, 2026 18:51
@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit 726a028 Nov 7, 2026
39 checks passed
@zackees
zackees deleted the infra/merge-queue-linux-headroom branch November 7, 2026 20:16
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to Done in obs-rust Multiview Nov 7, 2026
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.

1 participant