Skip to content

fix(recipes): report dependency errors consistently across deployers - #2993

Merged
mchmarny merged 5 commits into
NVIDIA:mainfrom
ezhang3333:fix/2477-missing-dependency-diagnostics
Oct 3, 2026
Merged

mchmarny merged 5 commits into
NVIDIA:mainfrom
ezhang3333:fix/2477-missing-dependency-diagnostics

Conversation

@ezhang3333

@ezhang3333 ezhang3333 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Missing component dependencies now produce specific errors instead of a false circular-dependency diagnosis. Recipe validation and ordering share the same rules and report each missing edge once, on its own line, together with any genuine cycle.

Bundle generation validates the effective dependency graph before writing output for every deployer, including the default Helm deployer. Declared disabled dependencies and components excluded by the supported bundle filter remain treated as provided externally. Disabled components' own dependencies are ignored consistently during recipe validation and ordering.

Fixes #2477

Validation: make qualify passes with Bash 5 on PATH and GOMAXPROCS=4 to avoid a pre-existing timing-test flake. This includes the full race suite (84.6% coverage), lint, 29 end-to-end tests, vulnerability and license checks, and SDK/REST compatibility. CLI reproductions additionally verify missing and combined missing/cycle errors for all five deployers, with no output created.

A component whose dependencyRefs name a component absent from the recipe
(typically a hand-trimmed recipe) failed dependency ordering with
"circular dependencies exist", because an undeclared dependency never
drains its dependent's in-degree and was indistinguishable from a cycle.

The shared dependency graph builder now rejects edges from enabled
components to undeclared components up front, naming every offending
component/dependency pair in recipe order. A traversal that still fails
to drain is therefore always a genuine cycle. Edges to declared-but-
disabled components remain satisfied externally, and the error code stays
ErrCodeInvalidRequest.

Fixes NVIDIA#2477

Signed-off-by: Ethan Zhang <ezhang3333@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ezhang3333
ezhang3333 marked this pull request as ready for review September 30, 2026 01:34
@ezhang3333
ezhang3333 requested a review from a team as a code owner September 30, 2026 01:34
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
🧰 Additional context used
📚 Code guidelines (2)
AGENTS.md — auto-discovered
.claude/CLAUDE.md — configured

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/aicr/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Enterprise
  • Run ID: 37a4e701-d748-4211-b7e0-4107ddccbacc
📥 Commits

Reviewing files that changed from the base of the PR and between 648478b and b8de9ac.

📒 Files selected for processing (2)
  • pkg/bundler/bundler.go
  • pkg/recipe/metadata.go

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.


📝 Walkthrough

Walkthrough

Dependency validation and topological traversals use a shared graph builder. They report missing dependencies and cycles as ErrCodeInvalidRequest errors. Missing dependencies are listed in recipe order, and errors include guidance to keep externally provided dependencies declared with enabled: false. Disabled components’ own missing dependencies are ignored. DefaultBundler.Make filters components and validates dependencies on the filtered recipe. Tests cover error consistency, deployer behavior, and preservation of the input recipe.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: lockwobr

Merge Risk: ⚪ Minimal · up to b8de9

No actionable issue remains from this review; the change is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: consistent dependency-error reporting across deployers.
Description check ✅ Passed The description explains the dependency-validation changes, their behavior across deployers, and the reported validation results.
Linked Issues check ✅ Passed PR #2993 meets #2477. pkg/recipe/metadata.go now distinguishes missing dependency edges from cycles and reports the dependent component and missing dependency. Validation and ordering share the same…
Out of Scope Changes check ✅ Passed The reviewed changes support #2477. The shared dependency-graph rules, bundle-time validation, and related tests implement consistent missing-dependency diagnostics and prevent misleading cycle errors…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

@github-actions

Copy link
Copy Markdown
Contributor

Recipe evidence check

No leaf overlays affected by this PR.

This gate is warning-only and never blocks merge.

Comment thread pkg/recipe/metadata.go Outdated
Comment thread pkg/recipe/metadata.go Outdated
Comment thread pkg/recipe/metadata.go
Comment thread pkg/recipe/metadata.go Outdated
Comment thread pkg/recipe/metadata.go Outdated
Comment thread pkg/recipe/metadata.go
Comment thread pkg/recipe/metadata.go Outdated
mchmarny
mchmarny previously approved these changes Sep 30, 2026

@mchmarny mchmarny left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Other than the issues identified by @lockwobr

@ezhang3333 ezhang3333 changed the title fix(recipes): report missing dependencies, not a false cycle fix(recipes): report dependency errors consistently across deployers Sep 30, 2026

@mchmarny mchmarny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve: no new findings against a8d81f1.

@mchmarny
mchmarny enabled auto-merge (squash) October 1, 2026 16:15
@ezhang3333

Copy link
Copy Markdown
Contributor Author

Enabled edit by maintainers

@mchmarny
mchmarny merged commit e158e52 into NVIDIA:main Oct 3, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A missing component dependency reports as a circular dependency

3 participants