Skip to content

feat: require run.prioritise for runs above priority 0 - #1379

Closed
kvlonge wants to merge 2 commits into
mainfrom
feat/run-prioritise
Closed

kvlonge wants to merge 2 commits into
mainfrom
feat/run-prioritise

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Why

A run's priority decides which queued run is claimed first. Any person allowed to run a job or rerun could set any priority, and so move their run ahead of everyone else's. Moving ahead of the queue is now its own permission.

Changes

  • New action run.prioritise. A person's job run or rerun with a priority above 0 also needs it, on the same nodes as the run's other permissions. Priority 0 and negative priorities need nothing extra.
  • Only Admin grants it among built-in roles; project roles can grant it like any non-administrative action. It has no default role.
  • Behaviour change: Operators and Developers who launched job runs or reruns above priority 0 are now refused, with the usual denial and decision ID. The UI always launches at priority 0, so it is unaffected. Trusted local launches (sqb location, schedules) are unchanged.
  • The server docs, the UI's permission vocabulary and the generated client name the new action.

No DuckShop project case: this is a permission rule. The orchestration role matrix in DuckShop's edge-case area gains the expected outcome per built-in role.

Verification

  • test_person_sessions on SQLite and PostgreSQL: a priority-1 job run is refused for no role, Viewer, Operator and Developer and accepted for Admin, and the listed run keeps its priority.
  • svelte-check, vitest, make check-ci.

A run's priority decides which queued run is claimed first, and any person
allowed to run a job or rerun could set any priority. A person's job run
or rerun above priority 0 now also needs run.prioritise on the run's
nodes. Only Admin grants it among built-in roles, project roles may grant
it, and it has no default role. Priority 0 and below need nothing extra,
and trusted local launches are unchanged.
Only queueing a job run or a rerun above priority 0 needs run.prioritise.
Cancelling an urgent run keeps needing only run.cancel.
@kvlonge
kvlonge enabled auto-merge (squash) November 8, 2026 18:38

kvlonge commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Folded into the single combined sqlbuild PR (D625/D626), which the SQLBuild lane is assembling now and opens once #1377 lands. Branch kept.

@kvlonge kvlonge closed this Nov 8, 2026
auto-merge was automatically disabled November 8, 2026 21:16

Pull request was closed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant