fix(chart): disable model cache when modelCache.enabled is false#801
Open
eleboucher wants to merge 1 commit into
Open
fix(chart): disable model cache when modelCache.enabled is false#801eleboucher wants to merge 1 commit into
eleboucher wants to merge 1 commit into
Conversation
8fea714 to
b3b54c1
Compare
Signed-off-by: Erwan Leboucher <erwanleboucher@gmail.com>
b3b54c1 to
a1dc134
Compare
Contributor
Author
|
Btw you shouldn't put the github actions to run unless you approve it, to prevent from cache poisoning and attacker getting your secrets |
Member
|
Thanks for this contribution! Good callout with actions. I set up the initial policy when the project was smaller that I had to approve actions for new contributors but allow it for returning ones. Now that the project has grown, it's worth revisiting that. Appreciate your callout on this. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Problem
Setting
modelCache.enabled: falsedoes not actually disable the model cache. The operator's--model-cache-pathflag defaults to/models(cmd/main.go), and caching is gated on that path being non-empty:internal/controller/inferenceservice_controller.go:model.Status.CacheKey != "" && r.ModelCachePath != ""internal/controller/deployment_builder.go:useCache := model.Status.CacheKey != "" && r.ModelCachePath != ""The chart only emits the
--model-cache-*flags whenenabled: true, so when disabled the operator falls back to the non-empty/modelsdefault and keeps provisioning + mounting the cache (a shared 100Gi PVC) anyway.Fix
Emit an explicit empty
--model-cache-path=in the disabled branch so the controller'spath != ""gate evaluates false and caching is actually off.Test
Added a helm-unittest regression case to
tests/model-cache_test.yamlasserting that withmodelCache.enabled: falsethe deployment passes--model-cache-path=(empty), no--model-cache-path=/models, and no/modelsvolume mount. Full suite passes (10/10).