Skip to content

Fix GCP Cloud Run Run Revision Errors

DodaTech Updated 2026-06-26 2 min read

When working with GCP Cloud Run, you may encounter a configuration error that prevents your deployment from working. This guide explains the most common mistake with run revision and shows the exact fix.

A Common Mistake

Deploying a new revision but not keeping the previous revision, making rollback impossible if the new revision has issues.

The incorrect command:

gcloud run deploy my-service --image=gcr.io/my-project/my-image:v2

Error output:

Deployed new revision.
The previous revision is automatically deleted because --no-traffic or revision retention is not configured. When v2 has a bug (500 errors for all requests), there is no previous revision to roll back to. The service is broken with no recovery path.

The Correct Approach

The right way to configure run revision in GCP Cloud Run:

gcloud run deploy my-service --image=gcr.io/my-project/my-image:v2 && gcloud run services describe my-service --region=us-central1 --format='value(status.traffic)'

Successful result:

Deployed.
Previous revision (my-service-00001-war) is retained. To roll back:
gcloud run services update-traffic my-service --to-revisions=my-service-00001-war=100
Rollback is immediate with zero downtime.

How to Prevent This

Set --no-traffic to deploy without serving traffic. Keep at least 1-2 old revisions. Use gcloud run revisions list to see all revisions. Set revision retention with --revision-suffix. Use traffic splitting for gradual rollouts. Always keep the previous revision until the new one is verified.

FAQ

Why does my run revision configuration fail in GCP Cloud Run?

Configuration failures in GCP Cloud Run usually stem from missing IAM permissions, incorrect parameter syntax, unfulfilled prerequisites, or incorrect API versions. Always run commands with --help first to verify parameter names and formats. Check Cloud Audit Logs for detailed error traces. The error message typically contains a link to the relevant documentation section.

How do I debug run revision issues in GCP Cloud Run?

Start by enabling Cloud Logging for your service. Use gcloud logging read to query error logs. For IAM issues, use the Policy Analyzer tool. For networking issues, use VPC flow logs. For function/run issues, check the container logs with gcloud logging tail. Always validate your configuration with dry-run flags before applying to production.

What are the best practices for run revision in GCP Cloud Run?

Use infrastructure-as-code for all configurations. Test changes in a non-production project first. Set up billing alerts. Enable Cloud Audit Logs. Follow least privilege for IAM. Review and update configurations regularly. Document manual changes for compliance audits. Monitor with dashboards and alerts.


Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro. Secure your cloud with DodaTech.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro