[Bugfix] fix spec/label/annotation changes can't trigger redownload#552
Open
pallasathena92 wants to merge 1 commit intomainfrom
Open
[Bugfix] fix spec/label/annotation changes can't trigger redownload#552pallasathena92 wants to merge 1 commit intomainfrom
pallasathena92 wants to merge 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request simplifies the model download logic by replacing shouldDownloadModelInUpdateEvent with shouldDownloadModel and removing the deprecated function. The review feedback identifies that this change introduces redundancy in the update logic for both BaseModel and ClusterBaseModel, potentially resulting in duplicate download tasks when the download policy is modified.
321047e to
8e1db1d
Compare
heymrbox
approved these changes
Apr 3, 2026
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.
What this PR does
Replaces
shouldDownloadModelInUpdateEvent(which used defaultDecision=false) withshouldDownloadModel(which uses defaultDecision=true). When a model has spec/label/annotation changes AND has no NodeSelector or NodeAffinity, it will now triggergenerateDownloadOverrideTask.Why we need it
What
shouldDownloadModelCommondoes:The key difference:
shouldDownloadModelpasses defaultDecision = true → "yes, download unless something explicitly rejects it"shouldDownloadModelInUpdateEventpasses defaultDecision = false → "no, don't download unless... nothing can make it true"With this function, we can't trigger model redownload whtn the model has spec/label/annotation changes.
What changes:
policyChangedcheck inupdateClusterBaseModelandupdateBaseModelto check if downloadPolicy update need to trigger downloadOverrideTaskisToDownloadOverrideDueToDownloadPolicyBasedOnBMis scoped to HuggingFace only. will refactor this when we support download policy in all storageType.ignoreDownloadPolicywhen spec/label/annotation changes check.How to test
Checklist
make testpasses locally