Skip to content

Better Wrangler config diff #10235

@penalosa

Description

@penalosa

Describe the solution

For internal context, see https://wiki.cfdata.org/pages/viewpage.action?pageId=1187489699

When using both Wrangler and the dash to update a Worker, it's easy to get into situations where there's a potential conflict. Today, Wrangler warns about those cases in interactive mode, but it doesn't provide much information about why there's a diff.

Image

We should:

  1. Display a rich diff of what the actual config differences are (instead of just a warning that differences exist), so that the user has the opportunity to review. We can re-use the init --from-dash codepaths here that can already construct a representation of a Worker's remote state as Wrangler config.
  2. If the user chooses not to deploy, we should offer to update their local wrangler.json with the remote changes (this will only work for json config files).
  3. We should implement an opt-in "strict-mode" that fails deploys with config conflicts in non-interactice mode if a --force flag isn't provided. i.e. a user would use wrangler deploy --strict as their deploy command.

Sub-issues

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions