OXYGENHUB

Flow scheduling: priorities (site, org, team, repo, pipeline), expedited runs, and fair share between repositories issue #244 closed: completed andymccall opened this · 3 comments

andymccall

Jobs are offered strictly in arrival order. On 2026-10-16 a 20-second OpenTofu plan for oxygenhub-gcp waited over an hour behind metalgear2 and bomberman94 builds of 13 minutes each.

Andy's cases (2026-10-16):

  • Break-fix: during an incident, the fix's pipeline (e.g. an oxygenhub-gcp apply) must go to the front, not wait behind a game's test suite.
  • Cost of waiting: an organisation gives a team of contractors higher priority than its support team, because idle contractors cost more than the jobs.

Proposal:

  • Priority levels, set at site, organisation, team, repository and pipeline level, the most specific winning: e.g. urgent, high, normal (default), low. Who may set each level follows the existing roles: site admins for the site, org owners for their org and teams, repo maintainers within what their org allows.
  • Expedite a run: a maintainer can raise one run to urgent with a reason, for an incident. It is recorded in the audit log and on the run page, and it lapses when the run ends.
  • Fair share within a level: among jobs of the same priority, take turns between repositories (round-robin, oldest first within each), so one repository's burst can't hold up the rest.
  • No pre-emption at first: a running job is never stopped for a more urgent one; the urgent one takes the next free slot that fits. Pre-emption can come later for runners that opt in.
  • Shown on the queue: each queued job shows its priority and why ("urgent: expedited by andy: GCP incident"), with the filters of issue #243.
  • Limits: an org's urgent share can be capped, so priority can't starve everyone else.

andymccall set labels feature ·

referenced by 2 changes on 16 Oct 2026

55673c650986 107eaba52c9d

andymccall

Done on 2026-10-17: fair share (ae0f1380) and levels with expediting (83d402f0): site, repository and per-run (expedite, audited, lapsing), organisation as a column the claim honours. Still to do here: the organisation's form (org settings, owners) and a per-organisation cap on urgent; pipeline-level priority needs a flow-core field (a follow-up).

closed by change 76f93eaefe45 ·

andymccall

Done in ae0f1380 (fair share), 83d402f0 (levels, expedite) and ac7e18b6 (organisation level, per-owner cap on expedited runs); deployed with run 335. Pipeline-level priority is not built: a pipeline.kdl setting would let any committer raise their own jobs, so it waits for a decision on who may set it.

andymccall closed ·

andymccall

Andy, 2026-10-17: pipeline-level priority may only lower a job's priority (e.g. low for nightly jobs), never raise it above the repository's level. To build; reopening.

andymccall reopened ·

closed by change 53a0fb2e4ac6 ·