feat(nvca): gate helm model caching behind a default-off feature flag (3.2) - #1336
Merged
balajinvda merged 1 commit intoAug 28, 2026
Conversation
… (3.2) Backport of #1332 to the nvca 3.2 release line. Helm model caching was gated only by the broad CachingSupport flag, so a cluster could not enable caching support while keeping the Helm model-cache path off, and the path could not be turned off on its own. Add a HelmModelCaching feature flag, default off, as a sub-gate of CachingSupport. SelectHelmCacheBackend now returns HelmCacheBackendNone unless both are enabled, which covers the durable path (no ModelCacheRequest in makeStorageRequests) and the ephemeral path (no per-pod model-cache-init container injection), since both branch on the backend it selects. Default off means existing clusters see no behavior change until the flag is added to their feature gate list. Re-applied by hand rather than cherry-picked: this branch predates the modelCacheStorageClass parameter and the Samba block-class check on main, so SelectHelmCacheBackend has a different signature here and main's TestSelectHelmCacheBackend_SambaClassLookupError does not exist. Relates to #1331 Co-Authored-By: Balaji Ganesan <bganesan@nvidia.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
sbaum1994
approved these changes
Aug 28, 2026
balajinvda
merged commit Aug 28, 2026
903b1ae
into
release-src/compute-plane-services/nvca/v3.2
12 checks passed
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.
Why
Backport of #1332 to the nvca 3.2 release line.
Helm model caching is gated only by
CachingSupport, a broad shared gate.There is no way to enable caching support on a cluster while keeping the Helm
model-cache path off, and no way to turn that path off on its own when it
misbehaves on a cluster.
What changed
Adds a
HelmModelCachingfeature flag, default off, as a sub-gate ofCachingSupport.storage.SelectHelmCacheBackendreturnsHelmCacheBackendNoneunless both flags are enabled.SelectHelmCacheBackendis the single choke point: it is called once perreconcile in
internal/miniservice/reconcile.go, and its result drives bothcaching branches.
makeStorageRequestsonly creates aModelCacheRequestforthe NVMesh, SharedFS, and Samba backends, and the ephemeral
model-cache-initcontainer injection is gated on the Ephemeral backend. Returning
Nonedisables both, so no other call sites needed changes.
Default off means existing clusters see no behavior change until the flag is
added to their feature gate list.
Differences from the main PR
Re-applied by hand rather than cherry-picked. This branch predates two changes
that landed on main, so the merge commit does not apply cleanly:
SelectHelmCacheBackendon main takes amodelCacheStorageClassargument andits Samba fallback also requires the block class to exist. Here the signature
is unchanged, so the doc comment keeps this branch's wording.
TestSelectHelmCacheBackend_SambaClassLookupErrordoes not exist on thisbranch, so it needed no flag update.
The gate itself, the flag declaration, and all new tests are identical to
#1332.
Customer Release Notes
Helm model caching is now controlled by a dedicated
HelmModelCachingfeatureflag, disabled by default, in addition to the existing
CachingSupportflag.Enable both to use the Helm model cache.
Plan Summary
Not applicable.
Usage
Add the flag to the cluster's feature gate list alongside
CachingSupport:Testing
go build ./...is clean andgo test ./pkg/storage/... ./pkg/featureflag/... ./internal/miniservice/...passes on this branch.gofmt -lreports nothing for the five changed files. Two other files on this branch (pkg/nvca/backendk8scache_test.go,internal/miniservice/status_byoo_test.go) are flagged bygofmtbut are pre-existing and untouched here.Tests carried over from #1332:
TestHelmModelCachingFeatureFlag: asserts the declared default is off andreaches
Enabled(), covers the+/-parse round trip, and assertsCachingSupportalone does not imply the sub-gate. Globals are restored witht.Cleanup.TestSelectHelmCacheBackend: two cases withnvcf-sc-30present so theassertion is about the gate rather than a missing storage class, one for each
flag off alone.
TestMakeStorageRequests_BackendHandling: aHelmCacheBackendNonecase witha valid cache spec, asserting no
ModelCacheRequestis emitted.QA: not required. Behavior is unchanged for any cluster that does not set the
new flag.
Notes
Per the nvca
AGENTS.md,release-x.ybranches take bugfixes only. This is afeatby commit type but is behavior-neutral by default, so it is beingbackported deliberately rather than by that convention.
Issues
Relates to #1331
Related Pull Requests
Dependencies
None