From ccf40a27ecc03a5087c1be6489fe10112370b82a Mon Sep 17 00:00:00 2001 From: Cole MacKenzie Date: Wed, 30 Oct 2024 10:22:26 -0700 Subject: [PATCH] change references to pipeline id to name internal ticket: PIPE-124 --- .changeset/friendly-ears-breathe.md | 5 +++++ packages/wrangler/e2e/dev-with-resources.test.ts | 2 -- packages/wrangler/src/__tests__/deploy.test.ts | 6 +++--- packages/wrangler/src/__tests__/init.test.ts | 6 +++--- 4 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 .changeset/friendly-ears-breathe.md diff --git a/.changeset/friendly-ears-breathe.md b/.changeset/friendly-ears-breathe.md new file mode 100644 index 000000000000..ac39ed8e2869 --- /dev/null +++ b/.changeset/friendly-ears-breathe.md @@ -0,0 +1,5 @@ +--- +"wrangler": patch +--- + +Change Pipelines to use name instead of ID diff --git a/packages/wrangler/e2e/dev-with-resources.test.ts b/packages/wrangler/e2e/dev-with-resources.test.ts index 58ecc7d776b9..657cf447fc48 100644 --- a/packages/wrangler/e2e/dev-with-resources.test.ts +++ b/packages/wrangler/e2e/dev-with-resources.test.ts @@ -573,8 +573,6 @@ describe.sequential.each(RUNTIMES)("Bindings: $flags", ({ runtime, flags }) => { pipeline = "my-pipeline" `, "src/index.ts": dedent` - import { Pipeline } from "cloudflare:workers"; - export default { async fetch(request, env, ctx) { if (env.PIPELINE === undefined) { diff --git a/packages/wrangler/src/__tests__/deploy.test.ts b/packages/wrangler/src/__tests__/deploy.test.ts index c745a64ae2bd..2d96ce3dcef1 100644 --- a/packages/wrangler/src/__tests__/deploy.test.ts +++ b/packages/wrangler/src/__tests__/deploy.test.ts @@ -11239,7 +11239,7 @@ export default{ pipelines: [ { binding: "MY_PIPELINE", - pipeline: "0123456789ABCDEF0123456789ABCDEF", + pipeline: "my-pipeline", }, ], }); @@ -11250,7 +11250,7 @@ export default{ { type: "pipelines", name: "MY_PIPELINE", - id: "0123456789ABCDEF0123456789ABCDEF", + pipeline: "my-pipeline", }, ], }); @@ -11261,7 +11261,7 @@ export default{ Worker Startup Time: 100 ms Your worker has access to the following bindings: - Pipelines: - - MY_PIPELINE: 0123456789ABCDEF0123456789ABCDEF + - MY_PIPELINE: my-pipeline Uploaded test-name (TIMINGS) Deployed test-name triggers (TIMINGS) https://test-name.test-sub-domain.workers.dev diff --git a/packages/wrangler/src/__tests__/init.test.ts b/packages/wrangler/src/__tests__/init.test.ts index 13355376b5a9..ee015b75ed75 100644 --- a/packages/wrangler/src/__tests__/init.test.ts +++ b/packages/wrangler/src/__tests__/init.test.ts @@ -2445,7 +2445,7 @@ describe("init", () => { { type: "pipelines", name: "PIPELINE_BINDING", - id: "some-id", + pipeline: "some-name", }, { type: "mtls_certificate", @@ -2670,7 +2670,7 @@ describe("init", () => { pipelines: [ { binding: "PIPELINE_BINDING", - pipeline: "some-id", + pipeline: "some-name", }, ], queues: { @@ -3212,7 +3212,7 @@ describe("init", () => { [[pipelines]] binding = \\"PIPELINE_BINDING\\" - pipeline = \\"some-id\\" + pipeline = \\"some-name\\" [[mtls_certificates]] binding = \\"MTLS_BINDING\\"