Repository navigation
feat(recipes): functional kueue with default quota CRs - #1686
Conversation
Recipe evidence check
No leaf overlays affected by this PR. This gate is warning-only and never blocks merge. |
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds Estimated code review effort: 3 (Moderate) | ~25 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
mchmarny
left a comment
There was a problem hiding this comment.
Solid work making kueue functional in place — the quota-CR trio with hook-weight ordering, the trimmed integrations pin with its maintenance note, and the honest upgrade/uninstall caveats in the catalog are all the right shape, and the live Kind smoke (end-to-end Job admission through the default queue) is convincing. I verified the ApplyRegistryDefaults timing: hydration-time fill with clone semantics, serialized into saved recipes, so the saved-recipe → bundle path works.
Three medium comments (none blocking today since nothing references kueue yet): coordination with #1687's manifestsUseChartCRDs so the first helmfile-bundled reference doesn't hit the #1666 fresh-cluster diff failure, the health check's coupling to override-able default CR names, and a load-time guard for registry manifestFiles on Kustomize components. Three nits (opt-out doc, unrelated test reformatting, flavor-toleration scheduling note).
CI: the KWOK Summary failure is an infra flake — Tier 1: aks-inference (flux-oci) hit the 15-min job timeout and was cancelled (same class as seen on #1687); everything else is green. The branch is also mergeable_state: dirty — needs a rebase onto main before merge.
ab99b03 to
bc89a73
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/recipe/components_test.go`:
- Around line 1171-1187: Update the registry manifest validation test to
explicitly locate the Kueue component, assert it exists, and verify its expected
quota manifest paths are present and readable/non-empty. Replace the generic
checked counter and “at least Kueue’s quota CRs” sentinel with Kueue-specific
assertions in the test surrounding registry.Components and ManifestFiles.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 445d2cde-b5e2-4e95-a381-1474f991e1f2
📒 Files selected for processing (13)
docs/contributor/component.mddocs/user/component-catalog.mddocs/user/container-images.mdpkg/recipe/components.gopkg/recipe/components_test.gopkg/recipe/metadata.gopkg/recipe/metadata_test.gorecipes/checks/kueue/health-check.yamlrecipes/components/kueue/manifests/cluster-queue.yamlrecipes/components/kueue/manifests/local-queue.yamlrecipes/components/kueue/manifests/resource-flavor.yamlrecipes/components/kueue/values.yamlrecipes/registry.yaml
bc89a73 to
570da26
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/user/component-catalog.md`:
- Line 37: Update the kueue entry’s uninstall note to scope the manual cleanup
caveat specifically to direct/raw helm uninstall; clarify that the supported
AICR undeploy.sh flow removes rendered templates before invoking helm uninstall,
so users of that flow do not need to delete the hook-created CRs manually.
In `@pkg/recipe/components_test.go`:
- Around line 1228-1236: Update the failure assertions in the
GetComponentRegistryFor test to type-assert the returned error as
StructuredError and verify its Code equals ErrCodeInvalidRequest, following the
repository’s existing structured-error test pattern while retaining the current
message checks.
In `@pkg/recipe/metadata.go`:
- Around line 216-222: Apply the ManifestFiles registry default in
ApplyRegistryDefaults only when ref.ComponentType is ComponentTypeHelm, while
retaining the empty-ref and config.ManifestFiles checks and clone behavior. Add
a regression test proving an explicit Kustomize ref does not inherit Helm
manifest defaults or fail coherence validation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 6bc9a22b-b0c1-4b5a-bfd6-9ef12e93a428
📒 Files selected for processing (13)
docs/contributor/component.mddocs/user/component-catalog.mddocs/user/container-images.mdpkg/recipe/components.gopkg/recipe/components_test.gopkg/recipe/metadata.gopkg/recipe/metadata_test.gorecipes/checks/kueue/health-check.yamlrecipes/components/kueue/manifests/cluster-queue.yamlrecipes/components/kueue/manifests/local-queue.yamlrecipes/components/kueue/manifests/resource-flavor.yamlrecipes/components/kueue/values.yamlrecipes/registry.yaml
mchmarny
left a comment
There was a problem hiding this comment.
That PR is in good shape now, @ArangoGutierrez, I approved, though at least one of the non-blocking CodeRabbit items may be worth closing in this or follow-up PR.
Kueue was registered in the component registry but referenced by zero overlays and shipped no queue or quota CRs, so a deployed Kueue admitted nothing out of the box. - Add registry-level manifestFiles defaults to ComponentConfig: a component can now ship default manifests wherever a recipe references it; ref-declared (overlay/mixin) lists take precedence. No opt-out: an empty ref-declared list is indistinguishable from absent — declare a replacement list to suppress the defaults. - Fail closed at registry load when a Kustomize-typed component declares manifestFiles: validateComponentRef rejects the combination per-ref, so a registry-level mistake would otherwise surface at resolution time in every consumer at once. - Mark kueue manifestsUseChartCRDs: the quota CRs instantiate CRDs the chart itself installs, so the injected kueue-post wrapper needs the helm-diff REST-mapper bypass (NVIDIA#914/NVIDIA#929 pattern, added in NVIDIA#1687). - Bump kueue chart 0.17.1 -> 0.18.2 and ship default quota CRs (ResourceFlavor with GPU-taint toleration, ClusterQueue with admission-neutral quotas, LocalQueue default/default) as post-install hooks ordered by dependency. - Pin managerConfig to the chart 0.18.2 default with integrations.frameworks trimmed to batch/job, JobSet, TrainJob - drops the default-on pod/deployment/statefulset webhook interception surface. - Health check now asserts the quota CRs reconcile to Active (assert-only, read-only allowlist compliant); documented coupling to the default CR names for overlays overriding manifestFiles. - Docs: registry field reference, catalog entry incl. upgrade/uninstall caveats and health-check coupling, BOM regen. Review fixes (PR NVIDIA#1686 non-blocking review): mark manifestsUseChartCRDs on kueue per NVIDIA#1687 coordination; fail closed at registry load when a Kustomize-typed component declares manifestFiles; assert the load-time guard returns ErrCodeInvalidRequest in its test; health-check, catalog, and godoc coupling notes for manifestFiles overrides; single-default-flavor toleration trade-off note. Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
95ede5f to
1b84c6b
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
pkg/recipe/metadata.go (1)
216-222: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winGate manifest defaults on Helm refs.
ApplyRegistryDefaultspreserves an explicitref.Type, but Line 220 injectsconfig.ManifestFilesregardless of that type. A Kustomize ref backed by a Helm registry config can therefore inherit Helm-only manifests and later fail coherence validation. The registry-load guard does not cover this override case.Proposed fix
- if len(ref.ManifestFiles) == 0 && len(config.ManifestFiles) > 0 { + if ref.Type == ComponentTypeHelm && + len(ref.ManifestFiles) == 0 && len(config.ManifestFiles) > 0 { ref.ManifestFiles = slices.Clone(config.ManifestFiles) }Add a regression case with
ref.Type == ComponentTypeKustomizeand non-empty registry defaults.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/recipe/metadata.go` around lines 216 - 222, Gate the ManifestFiles defaulting in ApplyRegistryDefaults so it only runs when ref.Type is ComponentTypeHelm (or when the type is otherwise resolved as Helm), preventing Kustomize refs from inheriting Helm registry manifests. Preserve the clone behavior, and add a regression test covering an explicit ComponentTypeKustomize ref with non-empty registry ManifestFiles.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/recipe/metadata_test.go`:
- Around line 2090-2155: Refactor
TestComponentRefApplyRegistryDefaults_ManifestFiles so the manifest-default
behavior cases use a table-driven test covering registry defaults applied,
ref-declared files preserved, and no registry defaults remaining empty. Keep the
separate slice-aliasing assertion as its own subtest if needed, reusing the
existing ApplyRegistryDefaults setup and assertions for each table case.
---
Duplicate comments:
In `@pkg/recipe/metadata.go`:
- Around line 216-222: Gate the ManifestFiles defaulting in
ApplyRegistryDefaults so it only runs when ref.Type is ComponentTypeHelm (or
when the type is otherwise resolved as Helm), preventing Kustomize refs from
inheriting Helm registry manifests. Preserve the clone behavior, and add a
regression test covering an explicit ComponentTypeKustomize ref with non-empty
registry ManifestFiles.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: f19659c5-ace1-41c5-b6b3-2807e9517352
📒 Files selected for processing (13)
docs/contributor/component.mddocs/user/component-catalog.mddocs/user/container-images.mdpkg/recipe/components.gopkg/recipe/components_test.gopkg/recipe/metadata.gopkg/recipe/metadata_test.gorecipes/checks/kueue/health-check.yamlrecipes/components/kueue/manifests/cluster-queue.yamlrecipes/components/kueue/manifests/local-queue.yamlrecipes/components/kueue/manifests/resource-flavor.yamlrecipes/components/kueue/values.yamlrecipes/registry.yaml
Kueue was registered in the component registry but referenced by zero overlays and shipped no queue or quota CRs, so a deployed Kueue admitted nothing out of the box. - Add registry-level manifestFiles defaults to ComponentConfig: a component can now ship default manifests wherever a recipe references it; ref-declared (overlay/mixin) lists take precedence. No opt-out: an empty ref-declared list is indistinguishable from absent — declare a replacement list to suppress the defaults. - Fail closed at registry load when a Kustomize-typed component declares manifestFiles: validateComponentRef rejects the combination per-ref, so a registry-level mistake would otherwise surface at resolution time in every consumer at once. - Mark kueue manifestsUseChartCRDs: the quota CRs instantiate CRDs the chart itself installs, so the injected kueue-post wrapper needs the helm-diff REST-mapper bypass (NVIDIA#914/NVIDIA#929 pattern, added in NVIDIA#1687). - Bump kueue chart 0.17.1 -> 0.18.2 and ship default quota CRs (ResourceFlavor with GPU-taint toleration, ClusterQueue with admission-neutral quotas, LocalQueue default/default) as post-install hooks ordered by dependency. - Pin managerConfig to the chart 0.18.2 default with integrations.frameworks trimmed to batch/job, JobSet, TrainJob - drops the default-on pod/deployment/statefulset webhook interception surface. - Health check now asserts the quota CRs reconcile to Active (assert-only, read-only allowlist compliant); documented coupling to the default CR names for overlays overriding manifestFiles. - Docs: registry field reference, catalog entry incl. upgrade/uninstall caveats and health-check coupling, BOM regen. Review fixes (PR NVIDIA#1686 non-blocking review): mark manifestsUseChartCRDs on kueue per NVIDIA#1687 coordination; fail closed at registry load when a Kustomize-typed component declares manifestFiles; assert the load-time guard returns ErrCodeInvalidRequest in its test; health-check, catalog, and godoc coupling notes for manifestFiles overrides; single-default-flavor toleration trade-off note. Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
1b84c6b to
6d7ed35
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@recipes/checks/kueue/health-check.yaml`:
- Around line 17-22: Update the health-check description comment to remove the
unsupported “webhook admitting” claim, while retaining the existing controller
readiness and quota-resource reconciliation coverage.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 21190588-20ed-471e-9b03-d394332d9f7d
📒 Files selected for processing (13)
docs/contributor/component.mddocs/user/component-catalog.mddocs/user/container-images.mdpkg/recipe/components.gopkg/recipe/components_test.gopkg/recipe/metadata.gopkg/recipe/metadata_test.gorecipes/checks/kueue/health-check.yamlrecipes/components/kueue/manifests/cluster-queue.yamlrecipes/components/kueue/manifests/local-queue.yamlrecipes/components/kueue/manifests/resource-flavor.yamlrecipes/components/kueue/values.yamlrecipes/registry.yaml
Kueue was registered in the component registry but referenced by zero overlays and shipped no queue or quota CRs, so a deployed Kueue admitted nothing out of the box. - Add registry-level manifestFiles defaults to ComponentConfig: a component can now ship default manifests wherever a recipe references it; ref-declared (overlay/mixin) lists take precedence. No opt-out: an empty ref-declared list is indistinguishable from absent — declare a replacement list to suppress the defaults. - Fail closed at registry load when a Kustomize-typed component declares manifestFiles: validateComponentRef rejects the combination per-ref, so a registry-level mistake would otherwise surface at resolution time in every consumer at once. - Mark kueue manifestsUseChartCRDs: the quota CRs instantiate CRDs the chart itself installs, so the injected kueue-post wrapper needs the helm-diff REST-mapper bypass (NVIDIA#914/NVIDIA#929 pattern, added in NVIDIA#1687). - Bump kueue chart 0.17.1 -> 0.18.2 and ship default quota CRs (ResourceFlavor with GPU-taint toleration, ClusterQueue with admission-neutral quotas, LocalQueue default/default) as post-install hooks ordered by dependency. - Pin managerConfig to the chart 0.18.2 default with integrations.frameworks trimmed to batch/job, JobSet, TrainJob - drops the default-on pod/deployment/statefulset webhook interception surface. - Health check now asserts the quota CRs reconcile to Active (assert-only, read-only allowlist compliant); documented coupling to the default CR names for overlays overriding manifestFiles. - Docs: registry field reference, catalog entry incl. upgrade/uninstall caveats and health-check coupling, BOM regen. Review fixes (PR NVIDIA#1686 non-blocking review): mark manifestsUseChartCRDs on kueue per NVIDIA#1687 coordination; fail closed at registry load when a Kustomize-typed component declares manifestFiles; assert the load-time guard returns ErrCodeInvalidRequest in its test; health-check, catalog, and godoc coupling notes for manifestFiles overrides; single-default-flavor toleration trade-off note. Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
6d7ed35 to
5fa2784
Compare
mchmarny
left a comment
There was a problem hiding this comment.
Makes kueue functional in place: chart bump to 0.18.2, default quota CRs via the new registry-level manifestFiles mechanism, trimmed integrations pin, and a health check that proves reconciliation (quota CRs Active) rather than just pod liveness. Reviewed the full diff: the ApplyRegistryDefaults clone-fill avoids slice aliasing and is covered by a dedicated mutation test, the Kustomize+manifestFiles combination fails closed at registry load with the error code asserted via stderrors.Is, the kueue-specific regression sentinel pins the exact quota CR paths, and the health-check/manifestFiles coupling plus upgrade-wedge and toleration trade-offs are all documented where an integrator will look. All prior review threads resolved, CI fully green, BOM and docs updated in-PR. No blockers.
Summary
Makes the kueue component functional in place: chart 0.17.1 → 0.18.2, default ResourceFlavor/ClusterQueue/LocalQueue quota CRs shipped via new registry-level
manifestFilesdefaults, an explicit trimmed integrations pin, and a health check that proves Kueue actually reconciles.Motivation / Context
Kueue is registered in the component registry, health-checked, and BOM'd — but referenced by zero overlays/mixins and ships no queue/quota CRs, so a deployed Kueue admits nothing out of the box (a "ghost component"). This PR fixes the component itself; composing it into recipes (a
platform-batchmixin + standalone JobSet component) is a deliberate follow-up.Fixes: N/A
Related: N/A
Type of Change
Component(s) Affected
pkg/recipe)docs/,examples/)Implementation Notes
manifestFilesdefaults (ComponentConfig+ApplyRegistryDefaultsclone-fill): a component can ship default manifests wherever a recipe references it; ref-declared (overlay/mixin) lists take precedence, no merge. Applied post-merge in hydration, so overlay composition is unaffected.helm.sh/hookpost-install/post-upgrade annotations (weights 1/5/10 encode ResourceFlavor→ClusterQueue→LocalQueue ordering) — required byTestManifestHelmHooksRequiredfor custom-apiVersion manifests. Upgrade semantics (delete-and-recreate can wedge on Kueue'sresource-in-usefinalizer; tuned quotas reset) are documented in the component catalog.controllerManagerConfigYamlenables pod/deployment/statefulset/ray/etc. webhook interception; the pinned copy is byte-identical to the 0.18.2 default exceptintegrations.frameworkstrimmed tobatch/job,jobset.x-k8s.io/jobset,trainer.kubeflow.org/trainjob.Active=Truevia JMESPath condition projections, ResourceFlavor existence.Testing
pkg/recipe: 87.4% → 87.5% (+0.1%); newApplyRegistryDefaultsbranch at 100%.helm installwith the pinned values (rc=0), the three CRs admitted by the webhook, ClusterQueue+LocalQueueActive=True,make check-health COMPONENT=kueuerc=0 (including the new quota-CR step), and akueue.x-k8s.io/queue-name-labeled Job went QuotaReserved→Admitted→Finished end-to-end.Risk Assessment
Rollout notes: Component is referenced by zero overlays today, so no deployed recipe changes behavior. The new registry field is additive with precedence preserved. Upgrade/uninstall caveats for the hook-shipped CRs are documented in
docs/user/component-catalog.md.Checklist
make testwith-race)make lint)git commit -S)