Skip to content

wrangler versions commands are tricky to automate because of IDs #11528

@theoephraim

Description

@theoephraim

Describe the solution

The current iterations of the wrangler versions commands seem really geared towards interactive usage only. If I want to do a new deployment with a secret, I must do the 3 step dance:

  1. wrangler versions upload
  2. wrangler versions secret put
  3. wrangler versions deploy

Step 2 allows passing no id, and it will use the latest version from step 1, so that's fine, although explicitly expressing "latest" might be nice.

Step 3 however requires I either select the version interactively or pass in an ID. Currently we must either extract the id from the output of step 2, or run wrangler versions list and extract the id, which is very awkward in bash. A few things could make this easier:

  • let me use latest as an alias for an id
  • allow using tags or an ID I generate to select a specific version instead of the CF generated id
  • if --yes option is used with no version id, assume the user means latest (similar to other commands)
  • add flags that make the output simpler, or even write to a file, so its easier to get ids without needing sed/awk or involving JS

Sidenote - allowing me to deploy with secrets attached in one step would let me avoid this altogether.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions