Skip to content

Implement to_latest: true #466

@mkmik

Description

@mkmik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions