- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1k
add information about dashboard configuration differences on deploys #10314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0c5051d
              ff392c0
              62226d8
              90bf0a2
              9f9cff0
              a51ffa4
              45bab70
              6a7369d
              87c184a
              62f5eb8
              6d428fe
              eb144a7
              28b5f80
              9a8c828
              f87f4e2
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| "wrangler": minor | ||
| --- | ||
|  | ||
| Show possible local vs. dashboard diff information on deploys | ||
|  | ||
| When re-deploying a Worker using `wrangler deploy`, if the configuration has been modified in the Cloudflare dashboard, the local configuration will overwrite the remote one. This can lead to unexpected results for users. To address this, currently `wrangler deploy` warns users about potential configuration overrides (without presenting them) and prompts them to confirm whether they want to proceed. | ||
|  | ||
| The changes here improve the above flow in the following way: | ||
|  | ||
| - If the local changes only add new configurations (without modifying or removing existing ones), the deployment proceeds automatically without warnings or prompts, as these changes are non-destructive and safe. | ||
| - If the local changes modify or remove existing configurations, `wrangler deploy` now displays a git-like diff showing the differences between the dashboard and local configurations. This allows users to review and understand the impact of their changes before confirming the deployment. | 
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -198,7 +198,6 @@ describe("cloudchamber apply", () => { | |
| │ ... | ||
| │ | ||
| │ instance_type = \\"dev\\" | ||
| │ | ||
| │ [containers.constraints] | ||
| │ - tier = 3 | ||
| │ + tier = 2 | ||
|  | @@ -588,27 +587,21 @@ describe("cloudchamber apply", () => { | |
| │ ... | ||
| │ | ||
| │ value = \\"value\\" | ||
| │ | ||
| │ [[containers.configuration.labels]] | ||
| │ + name = \\"name-1\\" | ||
| │ + value = \\"value-1\\" | ||
| │ + | ||
| │ + [[containers.configuration.labels]] | ||
| │ + | ||
| │ name = \\"name-2\\" | ||
| │ value = \\"value-2\\" | ||
| │ | ||
| │ ... | ||
| │ | ||
| │ type = \\"env\\" | ||
| │ | ||
| │ [[containers.configuration.secrets]] | ||
| │ - name = \\"MY_SECRET_1\\" | ||
| │ - secret = \\"SECRET_NAME_1\\" | ||
| │ - type = \\"env\\" | ||
| │ - | ||
| │ - [[containers.configuration.secrets]] | ||
| │ - | ||
| │ name = \\"MY_SECRET_2\\" | ||
| │ secret = \\"SECRET_NAME_2\\" | ||
| │ type = \\"env\\" | ||
|  | @@ -1004,11 +997,8 @@ describe("cloudchamber apply", () => { | |
| │ | ||
| │ image = \\"docker.io/beep:boop\\" | ||
| │ instance_type = \\"dev\\" | ||
| │ | ||
| │ + [containers.configuration.observability.logs] | ||
| │ + enabled = true | ||
| │ + | ||
| │ + | ||
| │ [containers.constraints] | ||
| │ tier = 1 | ||
| │ | ||
|  | @@ -1074,11 +1064,8 @@ describe("cloudchamber apply", () => { | |
| │ | ||
| │ image = \\"docker.io/beep:boop\\" | ||
| │ instance_type = \\"dev\\" | ||
| │ | ||
| │ + [containers.configuration.observability.logs] | ||
| │ + enabled = true | ||
| │ + | ||
| │ + | ||
| │ [containers.constraints] | ||
| │ tier = 1 | ||
| │ | ||
|  | @@ -1148,11 +1135,9 @@ describe("cloudchamber apply", () => { | |
| ├ EDIT my-container-app | ||
| │ | ||
| │ instance_type = \\"dev\\" | ||
| │ | ||
| │ [containers.configuration.observability.logs] | ||
| │ - enabled = true | ||
| │ + enabled = false | ||
| │ | ||
| │ [containers.constraints] | ||
| │ tier = 1 | ||
| │ | ||
|  | @@ -1222,11 +1207,9 @@ describe("cloudchamber apply", () => { | |
| ├ EDIT my-container-app | ||
| │ | ||
| │ instance_type = \\"dev\\" | ||
| │ | ||
| │ [containers.configuration.observability.logs] | ||
| │ - enabled = true | ||
| │ + enabled = false | ||
| │ | ||
| │ [containers.constraints] | ||
| │ tier = 1 | ||
| │ | ||
|  | @@ -1295,11 +1278,9 @@ describe("cloudchamber apply", () => { | |
| ├ EDIT my-container-app | ||
| │ | ||
| │ instance_type = \\"dev\\" | ||
| │ | ||
| │ [containers.configuration.observability.logs] | ||
| │ - enabled = true | ||
| │ + enabled = false | ||
| │ | ||
| │ [containers.constraints] | ||
| │ tier = 1 | ||
| │ | ||
|  | @@ -1371,11 +1352,9 @@ describe("cloudchamber apply", () => { | |
| ├ EDIT my-container-app | ||
| │ | ||
| │ instance_type = \\"dev\\" | ||
| │ | ||
| │ [containers.configuration.observability.logs] | ||
| │ - enabled = true | ||
| │ + enabled = false | ||
| │ | ||
| │ [containers.constraints] | ||
| │ tier = 1 | ||
| │ | ||
|  | @@ -1726,12 +1705,10 @@ describe("cloudchamber apply", () => { | |
| │ + instances = 4 | ||
| │ name = \\"my-container-app\\" | ||
| │ scheduling_policy = \\"regional\\" | ||
| │ | ||
| │ [containers.configuration] | ||
| │ image = \\"docker.io/beep:boop\\" | ||
| │ - instance_type = \\"dev\\" | ||
| │ + instance_type = \\"standard\\" | ||
| │ | ||
| │ [containers.constraints] | ||
| │ - tier = 3 | ||
| │ + tier = 2 | ||
|  | @@ -1807,21 +1784,17 @@ describe("cloudchamber apply", () => { | |
| │ + instances = 4 | ||
| │ name = \\"my-container-app\\" | ||
| │ scheduling_policy = \\"regional\\" | ||
| │ | ||
| │ [containers.configuration] | ||
| │ image = \\"docker.io/beep:boop\\" | ||
| │ memory = \\"256MB\\" | ||
| │ - memory_mib = 256 | ||
| │ + memory_mib = 1_024 | ||
| │ | ||
| │ - vcpu = 0.0625 | ||
| │ + vcpu = 1 | ||
| │ | ||
| │ [containers.configuration.disk] | ||
| │ size = \\"2GB\\" | ||
| │ - size_mb = 2_000 | ||
| │ + size_mb = 6_000 | ||
| │ | ||
| │ [containers.constraints] | ||
| │ - tier = 3 | ||
| │ + tier = 2 | ||
|  | @@ -1892,12 +1865,10 @@ describe("cloudchamber apply", () => { | |
| │ + instances = 4 | ||
| │ name = \\"my-container-app\\" | ||
| │ scheduling_policy = \\"regional\\" | ||
| │ | ||
| │ [containers.configuration] | ||
| │ image = \\"docker.io/beep:boop\\" | ||
| │ - instance_type = \\"basic\\" | ||
| │ + instance_type = \\"dev\\" | ||
| │ | ||
| │ [containers.constraints] | ||
| │ - tier = 3 | ||
| │ + tier = 2 | ||
|  | @@ -2026,10 +1997,9 @@ describe("cloudchamber apply", () => { | |
| ├ EDIT my-container-app | ||
| │ | ||
| │ [containers.configuration] | ||
| │ image = \\"${registry}/some-account-id/hello:1.0\\" | ||
| │ image = \\"registry.cloudflare.com/some-account-id/hello:1.0\\" | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this intended? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes it is intentional, I don't think that using string interpolation in an inline snapshot is correct at all I can understand the intent but I do not think that it is a correct use of inline snapshots (updating the snapshot will always change this line) I think that if we do want to use the  Assuming that the Cloudflare registry address is very stable I thought that here it would be correct to inline the value. @emily-shen do you have some context regarding this by any chance? 🙂 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PS: I just checked and saw that we do have the registry address like this here: https://github.com/cloudflare/workers-sdk/blob/2e5b8802b3d9b9b8ff0d44c6b7a5d80e64f92313/packages/wrangler/src/__tests__/containers/deploy.test.ts#L1324c There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah its fine. strictly speaking registry comes from an env var so there is also a cloudchamber registry url, but i don't think it really matters in this test here. | ||
| │ - instance_type = \\"dev\\" | ||
| │ + instance_type = \\"standard\\" | ||
| │ | ||
| │ [containers.constraints] | ||
| │ - tier = 3 | ||
| │ + tier = 2 | ||
|  | ||
Uh oh!
There was an error while loading. Please reload this page.