Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to test a fully-managed Cloud Run revision before sending traffic to it?

I use Google's Cloud Run (fully managed) to run an app that I'm building. When I deploy a new revision, I'd like to be able to verify that various health checks are ok before I start sending it traffic, but I haven't been able to find a URL for individual (traffic-less) revisions. Is there anything similar to what I'm looking for?

like image 720
Pete K Avatar asked Oct 20 '25 10:10

Pete K


1 Answers

This is possible using "Revision tags", a feature currently in alpha:

By creating a tag latest that always point to the latets revision, you will be able to access it under the URL https://latest---<SERVICE>-<HASH>.a.run.app.

To do so, use this command:

gcloud alpha run services update-traffic --update-tags latest=LATEST

When deploying, make sure to not migrate traffic to the new revision with:

gcloud run deploy --image ... --no-traffic

After testing the newly created revision, send 10% of the traffic traffic to it with

gcloud alpha run services update-traffic --to-tags latest=10
like image 159
Steren Avatar answered Oct 26 '25 09:10

Steren



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!