Repository navigation
fix(deploy): specify --cpu=2 for backend-sync to support 6Gi/8Gi memory (#21668) - #21671
Conversation
|
The whole file was converted to CRLF, so the diff rewrites 1,267 lines for a one-line change ( |
|
Hi @undivisible, thanks for pointing that out! LF line endings have been restored across the entire file. The diff is now strictly the single line addition ( |
BasedHardware#21668 raised backend-sync memory to 6-8Gi; Cloud Run requires >=2 CPU for 8Gi, and the 1-CPU deploy was rejected outright (dev auto-deploy run 38792031889). The contract test still asserted --cpu=2 must stay off sync; carve it out and pin it present instead.
|
Static-contract failure fixed on this branch (commit b0ef8f0): |
Payout & Contribution Claim Details
|
|
Hi @josancamon19 @kodjima33 @Git-on-my-level, following up on the bounty claim for this merged P0 deploy fix (#21671). Could you please check on the disbursement to PayPal: \[email protected]? Thank you for your support! |
Summary
Fixes #21668: Resolves main CI deploy failure:
ERROR: (gcloud.run.deploy) spec.template.spec.containers[0].resources.limits.memory: Invalid value specified for container memory. For 1.0 CPU, memory must be between 128Mi and 4Gi inclusive.Root Cause
Google Cloud Run enforces strict CPU-to-memory allocation constraints:
128Miand4Giinclusive.512Miand8Giinclusive.In
.github/actions/deploy-backend-stack/action.yml(deploy-backend-sync),--memory=${{ inputs.backend_sync_memory }}configures memory to8Gi(or6Gi), but did not declare--cpu=2. Cloud Run defaulted container CPU to1.0, causing Google Cloud Run to reject the revision deployment duringgcloud run deploy.Solution
Explicitly specify
--cpu=2indeploy-backend-syncwithin.github/actions/deploy-backend-stack/action.yml, aligning with the existing--cpu=2flags used bysync-backfill-lifecycle(which also runs with--memory=8Gi) anddeploy-backend-integration. This permits both6Giand8Gimemory allocations to be deployed without error.Failure-Class
Failure-Class: none
Cloud Run now rejects backend-sync deploys that request 8Gi on 1 CPU (limit for 1 CPU is 4Gi); #21668's 8Gi made every backend-stack deploy fail hard at backend-sync (dev run 38792031889). This PR adds the required
--cpu=2, and the static contract test pins it on sync.