Skip to content

Migrate traffic only if the new revision is ready #597

@RomainGoussault

Description

@RomainGoussault

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions