Repository navigation
ci(nightly): trigger from a nightly PR label - #2645
Merged
Merged
Conversation
The nightly workflow only ran on cron, on workflow_dispatch, and on PRs/pushes that touched `Cargo.toml`/`Cargo.lock`/`rust-toolchain.toml`/ `nightly.yaml`. Iterating on fixes for nightly-only failures (e.g. the nix-flake sandbox tests on #2642) meant either waiting for the cron run or invoking `gh workflow run --ref <branch>` by hand and watching the run page. Add a `nightly` label as the iteration knob. Drop the `paths` filter on the `pull_request` trigger and gate every job on a single `gate` job whose `if:` runs only when the event isn't a PR or the PR carries the `nightly` label. `synchronize` re-runs while the label remains attached, so subsequent pushes get checked without re-labelling. The cron run still catches drift that isn't commit-correlated, and the push-to-main path filter still catches Cargo-affecting changes after merge — so the only behaviour change is "PRs touching Cargo.toml no longer auto-trigger nightly". The label can be added in those cases when desired. Label created on the repo (`nightly`, light blue). Co-Authored-By: Claude <noreply@anthropic.com>
worktrunk-bot
approved these changes
May 8, 2026
Restore the auto-trigger on dependency/toolchain-affecting PR diffs that the previous commit dropped. The `gate` job now ORs the `nightly` label against a path check (`gh pr view --json files`), and downstream jobs gate on `needs.gate.outputs.run == 'true'`. Drops the requirement to label every Cargo bump manually while keeping the label as the iteration knob for fixes that don't touch those paths (nix-flake sandbox tests, etc.). Co-Authored-By: Claude <noreply@anthropic.com>
worktrunk-bot
left a comment
Collaborator
There was a problem hiding this comment.
One issue: the else branch's diagnostic has unescaped backticks inside a double-quoted string, so bash treats them as a command substitution running nightly. Result: stderr emits nightly: command not found and the printed line silently drops the word — run=false (no label, no cargo-affecting paths). The GITHUB_OUTPUT write is unaffected (gating still works), it's just a logged-output bug.
Inline suggestion below.
…literal Backticks inside `"..."` open a command substitution, so the else-branch diagnostic ran `nightly` and dropped the word from the printed message (plus a `nightly: command not found` to stderr). Single-quote the message so it renders verbatim. The `GITHUB_OUTPUT` write was unaffected — gating still worked, this was a logged-output-only bug. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace the bespoke `gh pr view --json files | grep` shell with the standard `dorny/paths-filter@v3` action — declarative pattern list, glob-aware (`**/Cargo.toml` now covers workspace member manifests), no shell parsing, no auth wiring. Mirror the `**/Cargo.toml` glob into the `push` paths trigger so both sites stay aligned. Mirrors the pattern in the prql repo's tests.yaml. Co-Authored-By: Claude <noreply@anthropic.com>
worktrunk-bot
approved these changes
May 8, 2026
2 tasks done
max-sixty
added a commit
that referenced
this pull request
May 8, 2026
## Summary Comment out the `nix-flake` job in the nightly workflow. The cron-driven run keeps creating tracking issues from a known cluster of sandbox-specific failures (bare `wt_command()` inheriting CWD, `target/debug` vs `target/release` snapshot hardcoding) that need real fixes, not noise. The `nightly` PR-label trigger added in #2645 still works — a follow-up PR will re-enable the job locally on its own branch and iterate on fixes under the label, without blocking the cron from passing in the meantime. ## Test plan - [x] YAML still parses; remaining jobs unchanged - [x] `create-issue-on-nightly-failure.needs` no longer references the disabled job 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a
nightlyPR label as an iteration knob for nightly-only failures on top of the existing path-based auto-trigger — both work.The nightly workflow now runs on PR events when either:
**/Cargo.toml,Cargo.lock,rust-toolchain.toml, or.github/workflows/nightly.yaml(existing behaviour, preserved), ornightlylabel (new — for fixes that don't touch those paths, like the nix-flake sandbox suite).A single
gatejob decides viadorny/paths-filter@v3; downstream jobs gate onneeds.gate.outputs.run == 'true'. Cron,workflow_dispatch, and main-push paths-trigger pass through unchanged. The pattern mirrors prql'stests.yamlrulesjob.The
nightlylabel has been created on the repo.Test plan
python -c 'import yaml; yaml.safe_load(...)').gate.outputs.run == 'false', downstream skipped (this PR exercises that path until labelled).nightlylabel:gatereruns,outputs.run == 'true', downstream runs.Cargo.tomlwithout label:gatedetects path change,outputs.run == 'true'.🤖 Generated with Claude Code