deploy-cloudrun icon indicating copy to clipboard operation
deploy-cloudrun copied to clipboard

Implement `to_latest: true`

Open mkmik opened this issue 2 years ago • 1 comments

TL;DR

When using no_traffic: true once, it's hard to set the traffic

Docs for --no-traffic state:

After a deployment with this flag the LATEST revision will not receive traffic on future deployments

This can be worked around by adding another step that does:

run: gcloud run services update-traffic ${{service}} --region ${{region}} --to-latest

The current situation is suboptimal because:

  1. the user needs to duplicate the service and region parameters (or factor them out in variables) that are also used by the main deploy step
  2. it's hard to discover because the deploy-cloudrun page doesn't mention this issue of using --no-traffic

Detailed design

Expose a to_latest value that if true will cause the action to call update-traffic with the --to-latest flag, similarly how presence of the revision_traffic and tag_traffic values already do

Additional information

No response

mkmik avatar Sep 21 '23 11:09 mkmik

Could we please get a status update on the implementation progress of this detailed design?

wshobson avatar Jan 11 '24 16:01 wshobson

revision_traffic: 'LATEST=100'

sethvargo avatar Mar 28 '24 16:03 sethvargo