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

Add ability to force latest revision

Open samos123 opened this issue 3 years ago • 2 comments

I manually changed traffic rules and afterwards the action won't automatically deploy new revisions to be the latest serving revision. The CLI has a command to automatically make latest the serving revision, it would be great if there was a parameter for the github action called force_latest that would force the latest revision to be the serving revisios by using this command:

gcloud run services update-traffic [[SERVICE] --to-latest

samos123 avatar Mar 26 '21 06:03 samos123

I was looking at the implementation, to add this feature, but from what I saw, think it should already be possible to manage the traffic of the latest revision, as far as I understand.

If either of the revision_traffic or tag_traffic options is set, the code builds a base command similar to the one suggested by @samos123. Then, in the documentation of gcloud it is stated that one can always refer to the latest revision with LATEST.

Setting revision_traffic to LATEST=100 should do the trick (though I have not checked it myself, yet)

aurecchia avatar May 25 '22 11:05 aurecchia

Hi @aurecchia

Yes - that's correct, and that's what gcloud does too. --to-latest is just syntactic sugar.

sethvargo avatar May 25 '22 12:05 sethvargo

should be close the issue then?

rubiagatra avatar Oct 29 '22 23:10 rubiagatra