Skip to content

Incorrect diff when local configuration differs from remote configuration #12074

@maxwellpeterson

Description

@maxwellpeterson

What versions & operating system are you using?

npx envinfo --system --npmPackages '{wrangler,create-cloudflare,miniflare,@cloudflare/*}' --binaries

  System:
    OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
    Memory: 6.78 GB / 31.02 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 22.12.0 - /home/mpeterson/.nvm/versions/node/v22.12.0/bin/node
    Yarn: 1.22.22 - /home/mpeterson/.nvm/versions/node/v22.12.0/bin/yarn
    npm: 10.9.0 - /home/mpeterson/.nvm/versions/node/v22.12.0/bin/npm
    bun: 1.3.6 - /home/mpeterson/.bun/bin/bun
  npmPackages:
    @cloudflare/workers-types: ^4.20241127.0 => 4.20260123.0
    wrangler: ^4.60.0 => 4.60.0

Please provide a link to a minimal reproduction

https://github.com/maxwellpeterson/sfplvinyl.com

Describe the Bug

When running npx wrangler@latest deploy, I get a warning about my local config being different from my remote config. The diff for kv_namespaces incorrectly shows one binding being added and one binding being removed, but they are the same binding. The only difference between them is that the id and binding properties appear in a different order, which should not show up in the diff.

npx wrangler@latest deploy
Need to install the following packages:
wrangler@4.60.0
Ok to proceed? (y) y
 
 
Cloudflare collects anonymous telemetry about your usage of Wrangler. Learn more at https://github.com/cloudflare/workers-sdk/tree/main/packages/wrangler/telemetry.md
 
 ⛅️ wrangler 4.60.0
───────────────────
✔ Select an account › Personal Projects
▲ [WARNING] The local configuration being used (generated from your local configuration file) differs from the remote configuration of your Worker set via the Cloudflare Dashboard:
 
   {
  +  assets: {
  +  }
     routes: [
  -    {
  -      pattern: "sfplvinyl.com"
  -      zone_name: "sfplvinyl.com"
  -      custom_domain: true
  -    }
     ]
     workflows: [
       {
  +      class_name: "RefreshCatalog"
       }
     ]
     kv_namespaces: [
  +    {
  +      binding: "SESSION"
  +      id: "0752632c63d948a89b94da6fdf13cc29"
  +    }
       ...
  -    {
  -      id: "0752632c63d948a89b94da6fdf13cc29"
  -      binding: "SESSION"
  -    }
     ]
     observability: {
  -    enabled: false
  +    enabled: true
       traces: {
  -      enabled: true
  +      enabled: false
       }
     }
   }
 
 
  Deploying the Worker will override the remote configuration with your local one.
 
 
✔ Would you like to continue? … no

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions