Skip to content

Let needs reach other stages: same stage first, then every other stage - #49

Merged
ndbroadbent merged 2 commits into
mainfrom
providers/stage-needs
Dec 4, 2026
Merged

ndbroadbent merged 2 commits into
mainfrom
providers/stage-needs

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

CircleCI parity item (d). Replaces #2.

With stage_prefix on, needs: [build] matched only build instances in the job's own stage. An approval job in a review stage, gating the builds of every region, failed with "no matching job instance exists". #2 fixed that by matching every stage, but then us_deploy would need eu_build too, so a region's deploy waits on, and fails with, every other region.

What changed

resolve_need in src/orchestrator/dag.rs replaces the inline matching loop:

  • an exact instance id wins (needs: [us_build]);
  • otherwise, with stage prefixing, a job takes the instances in its own stage when there are any;
  • if there are none, it takes every instance (the approval case);
  • without stage prefixing, it takes every instance, as before.

The docs' needs section in jobs.md and STATUS's loader line describe the rule.

Testing


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@ndbroadbent
ndbroadbent merged commit 9dd2ddb into main Dec 4, 2026
9 checks passed
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