Skip to content

UN-3636 [FIX] Stop re-running cross-tier deps in every tier leg#2192

Closed
chandrasekharan-zipstack wants to merge 1 commit into
mainfrom
fix/rig-tier-deps-once
Closed

UN-3636 [FIX] Stop re-running cross-tier deps in every tier leg#2192
chandrasekharan-zipstack wants to merge 1 commit into
mainfrom
fix/rig-tier-deps-once

Conversation

@chandrasekharan-zipstack

Copy link
Copy Markdown
Contributor

What

Bound the rig's depends_on expansion to the requested tier when --tier is passed.

Why

integration-workflow-execution and e2e-smoke both declare depends_on: [unit-sdk1, unit-workers]. Because --tier expanded deps transitively with no tier bound, those two unit groups ran three times per CI run — once in the unit leg, again in the integration leg, again in the e2e leg.

Measured on run 29891886572 (main):

group unit leg integration leg e2e leg
unit-sdk1 21s 27s 27s
unit-workers 37s 51s 51s

≈136s of duplicate execution per run. On the cloud CI runner (custom-k8s-runner, ~2 xdist workers) the same duplication costs ~350s.

Changes

  • tests/rig/selection.py: with --tier, drop dep-expanded groups outside that tier. Explicitly named groups are never dropped.
  • tests/rig/tests/test_selection.py: +3 tests — cross-tier dep not pulled in, explicit request survives the filter, expansion unchanged without a tier filter.

Safety

  • Intra-tier deps still expand and topo-order (e2e-smokee2e-login).
  • Gating is unaffected: blocked_by intersects with groups that failed in the same run, so a dep that wasn't run simply doesn't gate — and its own tier leg gates it.
  • tests.rig validate OK — 18 groups, 16 critical paths. Full rig suite: 74 passed, 1 skipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RnLaN45ShBbcCXWZkqCThz

`--tier X` expanded each selected group's `depends_on` transitively, with
no tier bound. `integration-workflow-execution` and `e2e-smoke` both
declare `depends_on: [unit-sdk1, unit-workers]`, so those two unit groups
ran again in the integration leg and a third time in the e2e leg.

Tiers run as separate CI legs and the unit leg already covers them, so
dep expansion is now bounded to the requested tier. Explicitly named
groups are never dropped, and intra-tier deps (e2e-smoke -> e2e-login)
still expand and order as before. Unrun deps do not weaken gating:
`blocked_by` intersects with groups that failed in the same run.

Measured on the last main run: ~88s of unit-workers and ~48s of
unit-sdk1 re-executed per run. On the cloud CI runner the same
duplication costs ~350s.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnLaN45ShBbcCXWZkqCThz
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f3a693c1-b09d-4faf-b8f9-8c7b9d9860b6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/rig-tier-deps-once

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@chandrasekharan-zipstack

Copy link
Copy Markdown
Contributor Author

Folding these changes into #2188 instead of carrying a second rig PR — the cross-tier dep fix now rides on feat/rig-extra-manifests (commit 793b32f).

@chandrasekharan-zipstack
chandrasekharan-zipstack deleted the fix/rig-tier-deps-once branch July 22, 2026 10:38
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