ci: run heavy CI jobs on PRs only when opted in via label
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Read .github/workflows/main.yml, especially ci-gate, its heavy matrix jobs, and the existing label lookup in .github/actions/check-label. First confirm the prerequisite merge queue is required on master, then check the workflow’s pull_request.types and event handling. Done means the fast subset and label-gated heavy jobs match the proposed behavior, with full CI still running for merge_group and nightly schedules; the label name and several policy questions remain open.
Written by the indexing model from the issue text.
Description
Every push to every open PR currently runs the full CI workflow. One full run is ~16.6 runner-hours (unit matrix, itest tranches, windows itest, cross-compilation). Most of those runs happen while a PR is still iterating and nobody is reading the results yet.
Proposal: new PRs get only a fast subset of CI by default. The heavy jobs run once a maintainer or the author opts in with a label.
Why a label
GitHub's built-in skip ([skip ci] and friends) is per commit and driven by the commit message. It can't be toggled per PR or by a reviewer, so the switch has to live in main.yml.
Proposed behavior
| PR state | Jobs |
|---|---|
Draft, or ready without run-ci |
Fast subset. This is what drafts already run today: static checks, lint, commit checks, release notes, dependency pins, non-race unit tests and basic itests. Skipped: cross-compilation, unit-race, full/windows/macOS itests, backwards-compat. |
Ready for review and labeled run-ci |
Full workflow |
merge_group |
Full workflow, always (labels aren't visible here) |
Nightly schedule on master |
Full workflow |
The label name is TBD. An alternative is the inverse, a skip-heavy-ci label on top of a full-by-default policy. That saves less, but it's less surprising for contributors.
Implementation sketch
Most of the plumbing exists:
ci-gatealready computes adocs-onlyoutput that heavy jobs consume. Extend it, or add a sibling output (heavy), to cover "PR event, not draft, and hasrun-ci". Use the live label lookup that.github/actions/check-labelalready does, so a re-run picks up a label added after the run started.- Heavy matrix jobs must keep the matrix instantiated and skip at the step level, as they do for
docs-onlytoday. Otherwise the per-leg required check names are never reported. - Add
labeled(and probablyunlabeled) topull_request.types, so applying the label starts a run. The existing concurrency group cancels the stale run. - Non-PR events (
merge_group,schedule,workflow_dispatch) always setheavy=true.
Hard prerequisite: required merge queue
Skipped required checks count as passing. Without a required merge queue, this label would effectively let a PR merge without the heavy CI ever running. This must only land after the merge queue is required on master; see the discussion on #11421. With the queue required, merge_group runs ignore PR labels and stay the real gate. The label then only controls how much pre-queue feedback a PR gets.
Open questions
- Who may apply the label? Labels need triage permission, so external contributors depend on a maintainer, which is probably what we want for cost. Should the author be able to request it via a comment command?
- Should the label persist across pushes (simplest), or be removed on
synchronizeso each heavy run is a deliberate request? - Are any fast-subset jobs worth promoting to heavy, or the reverse (e.g.
unit-race)?
- Dominant language
- Go
- Stars
- 8.2k
- Forks
- 2.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 103
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lightningnetwork/lnd
-
funding: failure logs print `<nil>` error and zero channel IDPossibly taken @litbot-9000 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
lightningnetwork/lnd#11676 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 85/100
lightningnetwork/lnd#11674 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lightningnetwork/lnd#11672 ·
Maintainers usually reply within 1 day
-
test flake
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
lightningnetwork/lnd#11663 · 1 comment ·
Maintainers usually reply within 1 day
-
[flake]: lnwallet/test/bitcoind.TestLightningWalletBitcoindRPCPolling/spend_unconfirmed_outputsOpentest flake
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
lightningnetwork/lnd#11642 · 1 comment ·
Maintainers usually reply within 1 day
All issues in lightningnetwork/lnd
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
containers/gvisor-tap-vsock#796 ·
Maintainers usually reply within 2 days
-
external needs:triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
celestiaorg/celestia-node#5448 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
[Bug]: Azure SAS signing uses local time instead of UTC, shifting validity window on non-UTC hostsPossibly taken @huanghaoyuanhhy claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
zilliztech/milvus-backup#1418 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
projectdiscovery/nuclei#8423 ·
Maintainers usually reply within 1 day