fix(gcp): remove unsupported --include flags from gcloud storage rsync#799
Merged
arniechops merged 15 commits intomainfrom Apr 13, 2026
Merged
fix(gcp): remove unsupported --include flags from gcloud storage rsync#799arniechops merged 15 commits intomainfrom
arniechops merged 15 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>
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 runtime error on GCP where
gcloud storage rsyncreceived unsupported--includeflags (unrecognized arguments: --include=*.model). The fix switches from an allowlist (--include) to a denylist (--exclude) approach using proper Python regex syntax, and preserves thetrust_remote_codesecurity guard by appending--exclude=".*\.py$"whentrust_remote_code=False.Confidence Score: 5/5
Safe to merge — fixes a real runtime crash with correct regex syntax and preserves the trust_remote_code security guard.
No P0/P1 findings. The fix directly addresses the root cause (unsupported --include flags), the trust_remote_code guard raised in prior review threads is now properly implemented via --exclude, regex patterns are syntactically correct for gcloud's Python re.search() semantics, and tests cover both trust_remote_code=True and False branches.
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] B --> C["Start excludes list:\n--exclude=\"optimizer.*\""] C --> D{trust_remote_code?} D -- False --> E["Append --exclude=\".*\\.py$\""] D -- True --> F[No additional excludes] E --> G["gcloud storage rsync -r\n{excludes} {src} {dest}"] F --> GReviews (4): Last reviewed commit: "Merge branch 'main' into arnavchopra/fix..." | Re-trigger Greptile