Skip to content

Commit f534c0d

Browse files
authored
set default for rollout_active_grace_period (#10407)
* default rollout_active_grace_period to 0 * changeset
1 parent d304055 commit f534c0d

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

.changeset/hungry-falcons-brush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
default `containers.rollout_active_grace_period` to 0

packages/containers-shared/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export type SharedContainerConfig = {
6565
rollout_step_percentage: number;
6666
/** if undefined in config, defaults to "full_auto" */
6767
rollout_kind: "full_auto" | "full_manual" | "none";
68-
rollout_active_grace_period?: number;
68+
rollout_active_grace_period: number;
6969
constraints: {
7070
regions?: string[];
7171
cities?: string[];

packages/wrangler/src/__tests__/containers/deploy.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ describe("wrangler deploy with containers", () => {
119119
│ scheduling_policy = \\"default\\"
120120
│ instances = 0
121121
│ max_instances = 10
122+
│ rollout_active_grace_period = 0
122123
123124
│ [containers.configuration]
124125
│ image = \\"registry.cloudflare.com/some-account-id/my-container:Galaxy\\"
@@ -279,6 +280,7 @@ describe("wrangler deploy with containers", () => {
279280
│ scheduling_policy = \\"default\\"
280281
│ instances = 0
281282
│ max_instances = 10
283+
│ rollout_active_grace_period = 0
282284
283285
│ [containers.configuration]
284286
│ image = \\"docker.io/hello:world\\"
@@ -367,6 +369,7 @@ describe("wrangler deploy with containers", () => {
367369
│ scheduling_policy = \\"default\\"
368370
│ instances = 0
369371
│ max_instances = 10
372+
│ rollout_active_grace_period = 0
370373
371374
│ [containers.configuration]
372375
│ image = \\"docker.io/hello:world\\"
@@ -674,6 +677,7 @@ describe("wrangler deploy with containers", () => {
674677
version: 1,
675678
account_id: "1",
676679
scheduling_policy: SchedulingPolicy.DEFAULT,
680+
rollout_active_grace_period: 0,
677681
configuration: {
678682
image: "registry.cloudflare.com/some-account-id/my-container:old",
679683
disk: {
@@ -725,6 +729,7 @@ describe("wrangler deploy with containers", () => {
725729
│ - max_instances = 2
726730
│ + max_instances = 10
727731
│ name = \\"my-container\\"
732+
│ rollout_active_grace_period = 0
728733
│ scheduling_policy = \\"default\\"
729734
│ [containers.configuration]
730735
│ - image = \\"registry.cloudflare.com/some-account-id/my-container:old\\"
@@ -748,6 +753,7 @@ describe("wrangler deploy with containers", () => {
748753
│ scheduling_policy = \\"default\\"
749754
│ instances = 0
750755
│ max_instances = 3
756+
│ rollout_active_grace_period = 0
751757
752758
│ [containers.configuration]
753759
│ image = \\"docker.io/hello:world\\"
@@ -784,6 +790,7 @@ describe("wrangler deploy with containers", () => {
784790
version: 1,
785791
account_id: "1",
786792
scheduling_policy: SchedulingPolicy.DEFAULT,
793+
rollout_active_grace_period: 0,
787794
configuration: {
788795
image: "registry.cloudflare.com/some-account-id/my-container:Galaxy",
789796
disk: {
@@ -846,6 +853,7 @@ describe("wrangler deploy with containers", () => {
846853
version: 1,
847854
account_id: "1",
848855
scheduling_policy: SchedulingPolicy.DEFAULT,
856+
rollout_active_grace_period: 0,
849857
configuration: {
850858
image: "docker.io/hello:world",
851859
disk: {
@@ -1298,6 +1306,7 @@ describe("wrangler deploy with containers", () => {
12981306
│ scheduling_policy = \\"default\\"
12991307
│ instances = 0
13001308
│ max_instances = 10
1309+
│ rollout_active_grace_period = 0
13011310
13021311
│ [containers.configuration]
13031312
│ image = \\"registry.cloudflare.com/some-account-id/hello:1.0\\"

packages/wrangler/src/containers/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const getNormalizedContainerOptions = async (
7474
},
7575
rollout_step_percentage: container.rollout_step_percentage ?? 25,
7676
rollout_kind: container.rollout_kind ?? "full_auto",
77-
rollout_active_grace_period: container.rollout_active_grace_period,
77+
rollout_active_grace_period: container.rollout_active_grace_period ?? 0,
7878
observability: {
7979
logs_enabled:
8080
config.observability?.logs?.enabled ??

0 commit comments

Comments
 (0)