Skip to content

Commit fe3af35

Browse files
Deprecate 'wrangler cloudchamber apply' in favor of 'wrangler deploy' (#12216)
1 parent 7a116ba commit fe3af35

3 files changed

Lines changed: 35 additions & 2 deletions

File tree

.changeset/fuzzy-items-listen.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+
Deprecate 'wrangler cloudchamber apply' in favor of 'wrangler deploy'

packages/wrangler/src/__tests__/cloudchamber/apply.test.ts

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function mockModifyApplication(
8585
describe("cloudchamber apply", () => {
8686
const { setIsTTY } = useMockIsTTY();
8787
const std = mockCLIOutput();
88-
mockConsoleMethods();
88+
const console = mockConsoleMethods();
8989

9090
mockAccountId();
9191
mockApiToken();
@@ -96,6 +96,30 @@ describe("cloudchamber apply", () => {
9696
msw.resetHandlers();
9797
});
9898

99+
test("should show deprecation warning when running cloudchamber apply", async () => {
100+
setIsTTY(false);
101+
mockGetApplications([]);
102+
mockCreateApplication({ id: "test-abc" });
103+
104+
await writeWranglerConfig({
105+
name: "test-container",
106+
containers: [
107+
{
108+
name: "test-app",
109+
class_name: "TestDurableObject",
110+
image: "registry.cloudflare.com/test:latest",
111+
instances: 1,
112+
},
113+
],
114+
});
115+
116+
await runWrangler("cloudchamber apply");
117+
118+
expect(console.warn).toContain("deprecated");
119+
expect(console.warn).toContain("wrangler deploy");
120+
expect(console.warn).toContain("next major version");
121+
});
122+
99123
test("can apply a simple application", async () => {
100124
setIsTTY(false);
101125
writeWranglerConfig({

packages/wrangler/src/cloudchamber/apply.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,11 @@ export const cloudchamberApplyCommand = createCommand({
678678
description: "Apply the changes in the container applications to deploy",
679679
status: "alpha",
680680
owner: "Product: Cloudchamber",
681-
hidden: false,
681+
hidden: true,
682+
deprecated: true,
683+
deprecatedMessage:
684+
"`wrangler cloudchamber apply` is deprecated and will be removed in the next major version.\n" +
685+
"Please use `wrangler deploy` instead.",
682686
},
683687
args: {
684688
"skip-defaults": {

0 commit comments

Comments
 (0)