Skip to content

Conversation

@kenzoengineer
Copy link
Member

While our cloud build trigger automatically builds on container on push to main, it doesn't automatically push the change to cloudrun.

After this gets merged, we can reconfigure the trigger to read from cloudbuild.yaml instead of our dockerfile

@kenzoengineer kenzoengineer requested a review from a team as a code owner September 8, 2025 21:56
@armenzg
Copy link
Member

armenzg commented Jan 6, 2026

@sentry review

Comment on lines +19 to +27
args:
- run
- deploy
- --region
- $_DEPLOY_REGION
- --project
- $_DEPLOY_PROJECT
- --image=$_REPO_URL/$_CONTAINER_NAME:latest
- $_SERVICE_NAME
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The gcloud run deploy command in cloudbuild.yaml has the $_SERVICE_NAME argument in the wrong position. It should be placed immediately after deploy.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The gcloud run deploy command requires the service name as a positional argument immediately following deploy. In the current cloudbuild.yaml, the $_SERVICE_NAME argument is placed at the end of the command, after all the flags like --region and --image. This incorrect ordering will cause the gcloud command to fail with a syntax error, which will break the CI/CD pipeline and prevent the Cloud Run service from being deployed.

💡 Suggested Fix

Reorder the arguments for the gcloud run deploy command in cloudbuild.yaml. The $_SERVICE_NAME positional argument should be moved to be immediately after the deploy argument and before any flags like --region or --project.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: cloudbuild.yaml#L19-L27

Potential issue: The `gcloud run deploy` command requires the service name as a
positional argument immediately following `deploy`. In the current `cloudbuild.yaml`,
the `$_SERVICE_NAME` argument is placed at the end of the command, after all the flags
like `--region` and `--image`. This incorrect ordering will cause the `gcloud` command
to fail with a syntax error, which will break the CI/CD pipeline and prevent the Cloud
Run service from being deployed.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8236718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants