fix(gcp): remove unsupported --include flags from gcloud storage rsync#799
Open
arniechops wants to merge 14 commits intomainfrom
Open
fix(gcp): remove unsupported --include flags from gcloud storage rsync#799arniechops wants to merge 14 commits intomainfrom
arniechops wants to merge 14 commits intomainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gcloud storage rsync only supports --exclude (Python regex), not --include. The --include flags caused rsync to fail on GCP model weight downloads. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
model-engine/model_engine_server/domain/use_cases/llm_model_endpoint_use_cases.py
Outdated
Show resolved
Hide resolved
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lilyz-ai
approved these changes
Apr 6, 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.
Summary
gcloud storage rsynconly supports--exclude(Python regex), not--include--includeflags caused model weight downloads to fail on GCP with:unrecognized arguments: --include=*.model--includeflags and kept only--exclude="optimizer.*"since all other files in the checkpoint bucket are neededTest plan
🤖 Generated with Claude Code
Greptile Summary
This PR fixes a GCP model weight download failure by replacing unsupported
--includeflags with the supported--exclude-only approach ingcloud storage rsync. The previous code passed multiple--include="*.model",--include="*.json", etc. flags thatgcloud storage rsyncdoes not recognise, causing hard failures withunrecognized arguments.Key changes:
--includeallowlist with an--excludedenylist inload_model_weights_sub_commands_gcsoptimizer.*files are always excluded (Python regex, consistent withgcloud storage rsyncsemantics).pyfiles are excluded via--exclude=".*\\.py$"whentrust_remote_code=False, preserving the security guard that prevents arbitrary code from being pulled to the podtrust_remote_code=True, only optimizer files are excluded —.pyfiles are downloaded as intended--exclude-only command construction for bothtrust_remote_codepathsThe
trust_remote_codesecurity boundary raised in a previous review thread has been fully addressed by the conditional--exclude=".*\\.py$"logic.Confidence Score: 5/5
Safe to merge — the fix is minimal, targeted, and correct with no remaining blocking issues.
All P1 concerns from prior review threads have been addressed. The trust_remote_code security boundary is preserved. Both code paths are covered by updated unit tests. No new logic issues introduced.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[load_model_weights_sub_commands_gcs] --> B[Install gcloud CLI via curl] B --> C["excludes = ['--exclude=\"optimizer.*\"'] Always exclude optimizer files"] C --> D{trust_remote_code?} D -- False --> E["Append '--exclude=\".*\\.py$\"' Block .py files from download"] D -- True --> F[No additional excludes .py files allowed] E --> G[file_selection_str = join excludes] F --> G G --> H["gcloud storage rsync -r {excludes} gs://bucket/checkpoint → dest_folder"]Greploops — Automatically fix all review issues by running
/greploopsin Claude Code. It iterates: fix, push, re-review, repeat until 5/5 confidence.Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal.
Reviews (3): Last reviewed commit: "fix(tests): update GCS unit tests to mat..." | Re-trigger Greptile