Our team had outages because we deploy to Cloud Run using google-github-actions/deploy-cloudrun@v3 with the default no_traffic: false, which always redirects traffic to the new revision, even when that revision fails to become Ready (red in the Cloud Run UI).
Is there an option to migrate traffic only if the new revision reaches the Ready state?
As a workaround I was thinking of doing this:
- uses: google-github-actions/deploy-cloudrun@v3
with:
service: ...
image: ...
no_traffic: true # create revision but don't migrate traffic
- name: Migrate traffic only if revision is Ready
run: |
gcloud run services update-traffic ${{ inputs.service-name }} --to-latest
Thanks!
Our team had outages because we deploy to Cloud Run using
google-github-actions/deploy-cloudrun@v3with the defaultno_traffic: false, which always redirects traffic to the new revision, even when that revision fails to become Ready (red in the Cloud Run UI).Is there an option to migrate traffic only if the new revision reaches the Ready state?
As a workaround I was thinking of doing this:
Thanks!