Skip to content
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

Remove --experimental-versions (and related flags) as it is now GA #7456

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 17 additions & 29 deletions packages/wrangler/e2e/versions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {

it("should upload 1st Worker version", async () => {
const upload = await helper.run(
`wrangler versions upload --message "Upload via e2e test" --tag "e2e-upload" --x-versions`
`wrangler versions upload --message "Upload via e2e test" --tag "e2e-upload"`
);

versionId1 = matchVersionId(upload.stdout);
Expand All @@ -74,7 +74,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {
});

it("should list 1 version", async () => {
const list = await helper.run(`wrangler versions list --x-versions`);
const list = await helper.run(`wrangler versions list`);

expect(normalize(list.stdout)).toMatchInlineSnapshot(`
"Version ID: 00000000-0000-0000-0000-000000000000
Expand All @@ -97,7 +97,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {

it("should deploy 1st Worker version", async () => {
const deploy = await helper.run(
`wrangler versions deploy ${versionId1}@100% --message "Deploy via e2e test" --yes --x-versions`
`wrangler versions deploy ${versionId1}@100% --message "Deploy via e2e test" --yes`
);

expect(normalize(deploy.stdout)).toMatchInlineSnapshot(`
Expand Down Expand Up @@ -137,7 +137,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {
});

it("should list 1 deployment", async () => {
const list = await helper.run(`wrangler deployments list --x-versions`);
const list = await helper.run(`wrangler deployments list`);

expect(normalize(list.stdout)).toMatchInlineSnapshot(`
"Created: TIMESTAMP
Expand Down Expand Up @@ -172,7 +172,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {
});

const upload = await helper.run(
`wrangler versions upload --message "Upload AGAIN via e2e test" --tag "e2e-upload-AGAIN" --x-versions`
`wrangler versions upload --message "Upload AGAIN via e2e test" --tag "e2e-upload-AGAIN"`
);

versionId2 = matchVersionId(upload.stdout);
Expand All @@ -188,9 +188,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {
Changes to triggers (routes, custom domains, cron schedules, etc) must be applied with the command wrangler triggers deploy"
`);

const versionsList = await helper.run(
`wrangler versions list --x-versions`
);
const versionsList = await helper.run(`wrangler versions list`);

expect(normalize(versionsList.stdout)).toMatchInlineSnapshot(`
"Version ID: 00000000-0000-0000-0000-000000000000
Expand Down Expand Up @@ -219,12 +217,10 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {

it("should deploy 2nd Worker version", async () => {
const deploy = await helper.run(
`wrangler versions deploy ${versionId2}@100% --message "Deploy AGAIN via e2e test" --yes --x-versions`
`wrangler versions deploy ${versionId2}@100% --message "Deploy AGAIN via e2e test" --yes`
);

const deploymentsList = await helper.run(
`wrangler deployments list --x-versions`
);
const deploymentsList = await helper.run(`wrangler deployments list`);

expect(normalize(deploy.stdout)).toMatchInlineSnapshot(`
"╭ Deploy Worker Versions by splitting traffic between multiple versions
Expand Down Expand Up @@ -296,16 +292,12 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {

it("should rollback to implicit Worker version (1st version)", async () => {
const rollback = await helper.run(
`wrangler rollback --message "Rollback via e2e test" --yes --x-versions`
`wrangler rollback --message "Rollback via e2e test" --yes`
);

const versionsList = await helper.run(
`wrangler versions list --x-versions`
);
const versionsList = await helper.run(`wrangler versions list`);

const deploymentsList = await helper.run(
`wrangler deployments list --x-versions`
);
const deploymentsList = await helper.run(`wrangler deployments list`);

expect(normalize(rollback.stdout)).toMatchInlineSnapshot(`
"├ Fetching latest deployment
Expand Down Expand Up @@ -410,16 +402,12 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {

it("should rollback to specific Worker version (0th version)", async () => {
const rollback = await helper.run(
`wrangler rollback ${versionId0} --message "Rollback to old version" --yes --x-versions`
`wrangler rollback ${versionId0} --message "Rollback to old version" --yes`
);

const versionsList = await helper.run(
`wrangler versions list --x-versions`
);
const versionsList = await helper.run(`wrangler versions list`);

const deploymentsList = await helper.run(
`wrangler deployments list --x-versions`
);
const deploymentsList = await helper.run(`wrangler deployments list`);

expect(normalize(rollback.stdout)).toMatchInlineSnapshot(`
"├ Fetching latest deployment
Expand Down Expand Up @@ -551,7 +539,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {
});

const upload = await helper.run(
`wrangler versions upload --legacy-assets='./public' --x-versions`
`wrangler versions upload --legacy-assets='./public'`
);

expect(normalize(upload.output)).toMatchInlineSnapshot(`
Expand Down Expand Up @@ -587,7 +575,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {
`,
});

const upload = await helper.run(`wrangler versions upload --x-versions`);
const upload = await helper.run(`wrangler versions upload`);

expect(normalize(upload.output)).toMatchInlineSnapshot(`
"▲ [WARNING] 🚧 \`wrangler versions upload\` is an open-beta command. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose
Expand Down Expand Up @@ -616,7 +604,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {
});

const upload = await helper.run(
`wrangler versions upload --message "Upload via e2e test" --tag "e2e-upload-assets" --x-versions`
`wrangler versions upload --message "Upload via e2e test" --tag "e2e-upload-assets"`
);

expect(normalize(upload.stdout)).toMatchInlineSnapshot(`
Expand Down
36 changes: 14 additions & 22 deletions packages/wrangler/src/__tests__/deployments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe("deployments", () => {
it("should log deployments", async () => {
writeWranglerConfig();

await runWrangler("deployments list --no-x-versions");
await runWrangler("deployments list");
expect(std.out).toMatchInlineSnapshot(`
"
Version ID: Constitution-Class-tag:test-name
Expand Down Expand Up @@ -108,9 +108,7 @@ describe("deployments", () => {
});

it("should log deployments for script with passed in name option", async () => {
await runWrangler(
"deployments list --name something-else --no-x-versions"
);
await runWrangler("deployments list --name something-else");
expect(std.out).toMatchInlineSnapshot(`
"
Version ID: Constitution-Class-tag:something-else
Expand Down Expand Up @@ -141,15 +139,15 @@ describe("deployments", () => {

it("should error on missing script name", async () => {
await expect(
runWrangler("deployments list --no-x-versions")
runWrangler("deployments list")
).rejects.toMatchInlineSnapshot(
`[Error: Required Worker name missing. Please specify the Worker name in your Wrangler configuration file, or pass it as an argument with \`--name\`]`
);
});
});

describe("deployment view", () => {
it("should error with no --no-x-versions flag", async () => {
it("should error with no flag", async () => {
writeWranglerConfig();

await expect(
Expand All @@ -162,7 +160,7 @@ describe("deployments", () => {
it("should log deployment details", async () => {
writeWranglerConfig();

await runWrangler("deployments view 1701-E --no-x-versions");
await runWrangler("deployments view 1701-E");

expect(std.out).toMatchInlineSnapshot(`
"
Expand All @@ -183,7 +181,7 @@ describe("deployments", () => {
it("should log deployment details with bindings", async () => {
writeWranglerConfig();

await runWrangler("deployments view bindings-tag --no-x-versions");
await runWrangler("deployments view bindings-tag");

expect(std.out).toMatchInlineSnapshot(`
"
Expand All @@ -207,7 +205,7 @@ describe("deployments", () => {
it("should automatically log latest deployment details", async () => {
writeWranglerConfig();

await runWrangler("deployments view --no-x-versions");
await runWrangler("deployments view");

expect(std.out).toMatchInlineSnapshot(`
"
Expand Down Expand Up @@ -284,9 +282,7 @@ describe("deployments", () => {
});

writeWranglerConfig();
await runWrangler(
"rollback 3mEgaU1T-Intrepid-someThing-tag:test-name --no-x-versions"
);
await runWrangler("rollback 3mEgaU1T-Intrepid-someThing-tag:test-name");
expect(std.out).toMatchInlineSnapshot(`
"
Successfully rolled back to Deployment ID: 3mEgaU1T-Intrepid-someThing-tag:test-name
Expand All @@ -303,9 +299,7 @@ describe("deployments", () => {
});

writeWranglerConfig();
await runWrangler(
"rollback 3mEgaU1T-Intrpid-someThing-tag:test-name --no-x-versions"
);
await runWrangler("rollback 3mEgaU1T-Intrpid-someThing-tag:test-name");
expect(std.out).toMatchInlineSnapshot(`""`);

expect(requests.count).toEqual(0);
Expand All @@ -315,9 +309,7 @@ describe("deployments", () => {
setIsTTY(false);

writeWranglerConfig();
await runWrangler(
"rollback 3mEgaU1T-Intrepid-someThing-tag:test-name --no-x-versions"
);
await runWrangler("rollback 3mEgaU1T-Intrepid-someThing-tag:test-name");
expect(std.out).toMatchInlineSnapshot(`
"? This deployment 3mEgaU1T will immediately replace the current deployment and become the active deployment across all your deployed routes and domains. However, your local development environment will not be affected by this rollback. Note: Rolling back to a previous deployment will not rollback any of the bound resources (Durable Object, D1, R2, KV, etc).
🤖 Using fallback value in non-interactive context: yes
Expand All @@ -334,7 +326,7 @@ describe("deployments", () => {
it("should skip prompt automatically in rollback if message flag is provided", async () => {
writeWranglerConfig();
await runWrangler(
`rollback 3mEgaU1T-Intrepid-someThing-tag:test-name --message "test" --no-x-versions`
`rollback 3mEgaU1T-Intrepid-someThing-tag:test-name --message "test"`
);
expect(std.out).toMatchInlineSnapshot(`
"
Expand All @@ -348,7 +340,7 @@ describe("deployments", () => {
it("should skip prompt automatically in rollback with empty message", async () => {
writeWranglerConfig();
await runWrangler(
`rollback 3mEgaU1T-Intrepid-someThing-tag:test-name --message "test" --no-x-versions`
`rollback 3mEgaU1T-Intrepid-someThing-tag:test-name --message "test"`
);
expect(std.out).toMatchInlineSnapshot(`
"
Expand All @@ -371,7 +363,7 @@ describe("deployments", () => {
});

writeWranglerConfig();
await runWrangler("rollback --no-x-versions");
await runWrangler("rollback");
expect(std.out).toMatchInlineSnapshot(`
"
Successfully rolled back to Deployment ID: 3mEgaU1T-Intrepid-someThing-tag:test-name
Expand Down Expand Up @@ -400,7 +392,7 @@ describe("deployments", () => {
result: "",
});

await runWrangler("rollback --name something-else --no-x-versions");
await runWrangler("rollback --name something-else");
expect(std.out).toMatchInlineSnapshot(`
"
Successfully rolled back to Deployment ID: 3mEgaU1T-Intrepid-someThing-tag:something-else
Expand Down
10 changes: 2 additions & 8 deletions packages/wrangler/src/__tests__/metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,8 @@ describe("metrics", () => {
configFileType: "toml",
isCI: false,
isInteractive: true,
argsUsed: [
"j",
"search",
"xGradualRollouts",
"xJsonConfig",
"xVersions",
],
argsCombination: "j, search, xGradualRollouts, xJsonConfig, xVersions",
argsUsed: ["j", "search", "xJsonConfig"],
argsCombination: "j, search, xJsonConfig",
command: "wrangler docs",
args: {
xJsonConfig: true,
Expand Down
6 changes: 3 additions & 3 deletions packages/wrangler/src/__tests__/rollback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe("rollback", () => {
});

await runWrangler(
"rollback --name script-name --version-id rollback-version --x-versions"
"rollback --name script-name --version-id rollback-version"
);

// Unable to test stdout as the output has weird whitespace. Causing lint to fail with "no-irregular-whitespace"
Expand Down Expand Up @@ -188,7 +188,7 @@ describe("rollback", () => {
});

await runWrangler(
"rollback --name script-name --version-id rollback-version --x-versions"
"rollback --name script-name --version-id rollback-version"
);

// Unable to test stdout as the output has weird whitespace. Causing lint to fail with "no-irregular-whitespace"
Expand Down Expand Up @@ -228,7 +228,7 @@ describe("rollback", () => {
mockPostDeployment(true);

await runWrangler(
"rollback --name script-name --version-id rollback-version --x-versions"
"rollback --name script-name --version-id rollback-version"
);

// Unable to test stdout as the output has weird whitespace. Causing lint to fail with "no-irregular-whitespace"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("deployments list", () => {

describe("without wrangler.toml", () => {
test("fails with no args", async () => {
const result = runWrangler("deployments list --experimental-versions");
const result = runWrangler("deployments list");

await expect(result).rejects.toMatchInlineSnapshot(
`[Error: You need to provide a name of your worker. Either pass it as a cli arg with \`--name <name>\` or in your config file as \`name = "<name>"\`]`
Expand All @@ -32,9 +32,7 @@ describe("deployments list", () => {
});

test("prints deployments to stdout", async () => {
const result = runWrangler(
"deployments list --name test-name --experimental-versions"
);
const result = runWrangler("deployments list --name test-name");

await expect(result).resolves.toBeUndefined();

Expand Down Expand Up @@ -101,9 +99,7 @@ describe("deployments list", () => {
});

test("prints deployments to stdout as --json", async () => {
const result = runWrangler(
"deployments list --name test-name --json --experimental-versions"
);
const result = runWrangler("deployments list --name test-name --json");

await expect(result).resolves.toBeUndefined();

Expand Down Expand Up @@ -199,7 +195,7 @@ describe("deployments list", () => {
beforeEach(() => writeWranglerConfig());

test("prints deployments to stdout", async () => {
const result = runWrangler("deployments list --experimental-versions");
const result = runWrangler("deployments list");

await expect(result).resolves.toBeUndefined();

Expand Down Expand Up @@ -266,9 +262,7 @@ describe("deployments list", () => {
});

test("prints deployments to stdout as --json", async () => {
const result = runWrangler(
"deployments list --json --experimental-versions"
);
const result = runWrangler("deployments list --json");

await expect(result).resolves.toBeUndefined();

Expand Down
Loading
Loading