Skip to content

Support stream (but keep pipeline backwards compatible) binding for Pipelines#13860

Merged
oliy merged 1 commit into
mainfrom
oli/pipelines_stream
May 26, 2026
Merged

Support stream (but keep pipeline backwards compatible) binding for Pipelines#13860
oliy merged 1 commit into
mainfrom
oli/pipelines_stream

Conversation

@oliy

@oliy oliy commented May 7, 2026

Copy link
Copy Markdown
Contributor

This reverts commit cf09891 and fixes additional items.

PIPE-374

Fixes the mismatch between original Pipeline bindings and v1 Pipeline entities. Specifically that we are binding to a Stream now, which then feeds the Pipeline that delivers traffic to a Sink. We preserve the original bindings to avoid breaking existing pipelines, but issue a warning of the deprecated usage.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: covered later and tracked in PIPE-633

A picture of a cute animal (not mandatory, but encouraged)


Open in Devin Review

@oliy oliy requested a review from workers-devprod as a code owner May 7, 2026 19:46
@oliy oliy added the ci:run-remote-tests Run remote/E2E tests that require Cloudflare API credentials label May 7, 2026
@changeset-bot

changeset-bot Bot commented May 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6626bc2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
wrangler Minor
@cloudflare/workers-utils Minor
miniflare Minor
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch
@cloudflare/cli-shared-helpers Patch
@cloudflare/pages-shared Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk May 7, 2026
@workers-devprod workers-devprod requested review from a team and jamesopstad and removed request for a team May 7, 2026 19:47
@workers-devprod

workers-devprod commented May 7, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • .changeset/pipeline-stream-rename.md: [@cloudflare/wrangler]
  • fixtures/vitest-pool-workers-examples/pipelines/wrangler.jsonc: [@cloudflare/wrangler]
  • packages/miniflare/src/plugins/pipelines/index.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/config/environment.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/config/validation.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/map-worker-metadata-bindings.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/types.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/worker.ts: [@cloudflare/wrangler]
  • packages/workers-utils/tests/config/validation/normalize-and-validate-config.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/create-worker-upload-form/bindings.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/deploy/durable-objects.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/deploy/get-remote-config-diff.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/init.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/type-generation.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/api/startDevWorker/utils.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/deployment-bundle/create-worker-upload-form.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/dev/miniflare/index.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/preview/api.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/preview/shared.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/type-generation/index.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/type-generation/pipeline-schema.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/utils/print-bindings.ts: [@cloudflare/wrangler]

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

✅ All changesets look good

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

The review was successfully posted with both the summary and the inline suggestion comment.

I'm Bonk, and I've done a quick review of your PR.

This PR renames pipeline to stream in pipeline bindings configuration, preserving backward compatibility with the deprecated pipeline field.

1 issue found:

Bug: Miniflare Zod schema silently drops pipeline field, breaking backward compatibility — The PipelineOptionsSchema uses a z.union of two object variants where both have their distinguishing key (stream / pipeline) as .optional(). Zod 3's default .strip() mode means { pipeline: "foo" } matches the first variant (stream object), and pipeline is silently stripped as an unknown key. The parse succeeds with {}, so opts.stream ?? opts.pipeline ?? "" resolves to "". This breaks all existing users who have pipeline: in their miniflare config during local dev.

The fix (posted as an inline suggestion) is to collapse the two ambiguous object variants into a single z.object with both stream and pipeline as optional fields.

github run

@pkg-pr-new

pkg-pr-new Bot commented May 7, 2026

Copy link
Copy Markdown
create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13860

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13860

miniflare

npm i https://pkg.pr.new/miniflare@13860

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13860

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13860

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13860

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13860

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13860

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@13860

wrangler

npm i https://pkg.pr.new/wrangler@13860

commit: 6626bc2

@oliy oliy force-pushed the oli/pipelines_stream branch from bd3cc65 to 6bcd95d Compare May 7, 2026 19:55
@oliy oliy force-pushed the oli/pipelines_stream branch 2 times, most recently from 0b9b309 to a4ed9d6 Compare May 12, 2026 19:21
@jamesopstad jamesopstad requested review from petebacondarwin and removed request for jamesopstad May 13, 2026 18:33
@workers-devprod

workers-devprod commented May 13, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@oliy oliy force-pushed the oli/pipelines_stream branch from bfd1312 to 328dae5 Compare May 14, 2026 07:23

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk May 14, 2026
Comment thread packages/workers-utils/src/config/environment.ts Outdated
@oliy oliy force-pushed the oli/pipelines_stream branch from 89f375d to 6626bc2 Compare May 22, 2026 11:07
@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@oliy oliy merged commit c8c7ec0 into main May 26, 2026
54 checks passed
@oliy oliy deleted the oli/pipelines_stream branch May 26, 2026 21:34
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-remote-tests Run remote/E2E tests that require Cloudflare API credentials

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants