Repository navigation
Force classic SCP for GCP deployment copies - #189
Merged
Merged
Conversation
📝 WalkthroughWalkthroughChangesGCP SCP wrapper adoption
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant DeploymentScript
participant gcloud-scp.sh
participant gcloud
DeploymentScript->>gcloud-scp.sh: Pass transfer arguments
gcloud-scp.sh->>gcloud: Run compute scp with --scp-flag=-O
gcloud-->>gcloud-scp.sh: Return transfer status
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cmd/subrouter/deploy_scripts_test.go (1)
30-35: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winRun the wrapper as production runs it.
Deployment scripts invoke
gcloud-scp.shdirectly. This test invokesbash wrapper, so it does not verify the executable bit or the shebang. Invokewrapperdirectly.Proposed test adjustment
command := exec.Command( - mustLookPath(t, "bash"), wrapper, fakeGcloud, + wrapper, fakeGcloud,🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cmd/subrouter/deploy_scripts_test.go` around lines 30 - 35, Update the command construction in the deployment script test to execute wrapper directly instead of invoking it through the bash executable. Preserve the existing arguments, environment setup, and output/error assertions so the test exercises the wrapper’s executable permission and shebang.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@cmd/subrouter/deploy_scripts_test.go`:
- Around line 30-35: Update the command construction in the deployment script
test to execute wrapper directly instead of invoking it through the bash
executable. Preserve the existing arguments, environment setup, and output/error
assertions so the test exercises the wrapper’s executable permission and
shebang.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1e98bf86-12b9-4164-ae29-aafbe3b3c9cd
📒 Files selected for processing (11)
cmd/subrouter/deploy_scripts_test.godeploy/gcp/create-subrouter-vm.shdeploy/gcp/deploy-live-upgrade.shdeploy/gcp/finalize-legacy-retirement.shdeploy/gcp/finalize-slot-retirement.shdeploy/gcp/gcloud-scp.shdeploy/gcp/migrate-to-front-slots.shdeploy/gcp/normalize-staging-predecessor.shdeploy/gcp/publish-subrouter.shdeploy/gcp/rollback-slot.shdeploy/gcp/switch-front-migration.sh
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
Why
The default SFTP transport stalled for roughly four minutes during the v0.1.72 staging golden run. The same copy with
--scp-flag=-Ocompleted in about three seconds. The stall pushed the held Codex HTTP request past its five-minute application timeout before listener handoff.Verification
go test ./...Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Force classic SCP for all GCP deployment copies via a
gcloud-scp.shwrapper, with a fallback for olderscpclients. This prevents SFTP stalls that caused multi-minute delays and timeouts.deploy/gcp/gcloud-scp.shthat probesscp -Osupport and passes--scp-flag=-Oonly when supported.gcloud/scp, asserting legacy mode when available and argument preservation.Written for commit 3377306. Summary will update on new commits.
Summary by CodeRabbit
Improvements
Tests