deploy-cloudrun
deploy-cloudrun copied to clipboard
Add ability to force latest revision
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
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)
Hi @aurecchia
Yes - that's correct, and that's what gcloud does too. --to-latest
is just syntactic sugar.
should be close the issue then?