Skip to content

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

Open
oliy wants to merge 1 commit intomainfrom
oli/pipelines_stream
Open

Support stream (but keep pipeline backwards compatible) binding for Pipelines#13716
oliy wants to merge 1 commit intomainfrom
oli/pipelines_stream

Conversation

@oliy
Copy link
Copy Markdown
Contributor

@oliy oliy commented Apr 28, 2026

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:

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 April 28, 2026 22:41
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 28, 2026

🦋 Changeset detected

Latest commit: fd20fdf

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

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 Apr 28, 2026
@workers-devprod workers-devprod requested review from a team and penalosa and removed request for a team April 28, 2026 22:42
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Apr 28, 2026

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • 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/e2e/remote-binding/miniflare-remote-resources.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/api/startDevWorker/LocalRuntimeController.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/dev/remote-bindings.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]

devin-ai-integration[bot]

This comment was marked as resolved.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 28, 2026

UnknownError: ProviderInitError

github run

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 28, 2026

@oliy Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 28, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: fd20fdf

@oliy oliy force-pushed the oli/pipelines_stream branch from 8459647 to d87e070 Compare April 29, 2026 13:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

Changeset Review

Summary

✅ All changesets look good

Details

All 15 changeset files have been reviewed against the guidelines:

Version Types

  • Appropriate version bumps selected (patch for bug fixes/improvements, minor for new features)
  • drop-node-20.md correctly uses minor for dropping Node.js 20 support (significant compatibility change)
  • Dependency update changesets for create-cloudflare skipped per guidelines

Changelog Quality

  • All descriptions are meaningful and explain the user impact
  • Before/after examples provided where helpful (e.g., pipeline-stream-rename.md)
  • Technical context included where necessary (e.g., fix-buffer-devalue.md)

Markdown Headers

  • No h1/h2/h3 headers found in any changeset

Analytics

  • No analytics-related changes detected

Dependabot Changesets

  • Skipped validation for c3-frameworks-update-*.md files as they are dependency updates for create-cloudflare

Experimental Features

  • No experimental feature changes requiring opt-in notes detected

Files Reviewed

  1. pipeline-stream-rename.md - ✅ minor, good description with examples
  2. c3-frameworks-update-13733.md - ✅ skipped (dependabot-style C3 update)
  3. dependabot-update-13732.md - ✅ patch for workerd update
  4. c3-frameworks-update-13359.md - ✅ skipped (dependabot-style C3 update)
  5. restart-from-step.md - ✅ minor for Workflows feature
  6. shaky-parks-buy.md - ✅ minor for module fallback service
  7. quiet-houses-attack.md - ✅ minor for Hyperdrive fix
  8. fix-config-flag-autoconfig-opennext.md - ✅ patch for bug fix
  9. c3-frameworks-update-13729.md - ✅ skipped (dependabot-style C3 update)
  10. fuzzy-zoos-hear.md - ✅ patch for improvement
  11. c3-frameworks-update-13730.md - ✅ skipped (dependabot-style C3 update)
  12. drop-node-20.md - ✅ minor for Node.js version requirement change
  13. router-worker-loopback.md - ✅ patch for refactoring
  14. twelve-eggs-fetch.md - ✅ minor for Vite plugin feature
  15. fix-buffer-devalue.md - ✅ patch for bug fix with good technical detail

devin-ai-integration[bot]

This comment was marked as resolved.

@oliy oliy force-pushed the oli/pipelines_stream branch 2 times, most recently from 928e085 to bad292e Compare April 30, 2026 06:40
devin-ai-integration[bot]

This comment was marked as resolved.

@oliy oliy force-pushed the oli/pipelines_stream branch from bad292e to fd20fdf Compare April 30, 2026 07:04
Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 8 additional findings in Devin Review.

Open in Devin Review

Comment on lines +245 to +248
env[pipeline.binding] = {
type: "pipelines",
pipeline: pipeline.stream || pipeline.pipeline,
};
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.

🔴 extractConfigBindings writes to deprecated pipeline field instead of stream

In extractConfigBindings, the resolved stream name is assigned to the old pipeline field (pipeline: pipeline.stream || pipeline.pipeline) instead of the new stream field. Every other analogous site in the PR was correctly migrated to write to stream — for example, packages/wrangler/src/deployment-bundle/create-worker-upload-form.ts:488 writes stream: pipelineStream || pipeline, and packages/workers-utils/src/map-worker-metadata-bindings.ts:326 writes stream: binding.stream || binding.pipeline. This env object is sent directly to the Cloudflare Preview Deployment API (via assemblePreviewDefaults at packages/wrangler/src/preview/shared.ts:338 and createPreviewDeployment at packages/wrangler/src/preview/preview.ts:388-390). Since the PR's stated purpose is to align with the updated API wire format that uses stream, sending the old pipeline field could cause preview deployments to fail to recognize the pipeline binding.

Suggested change
env[pipeline.binding] = {
type: "pipelines",
pipeline: pipeline.stream || pipeline.pipeline,
};
env[pipeline.binding] = {
type: "pipelines",
stream: pipeline.stream || pipeline.pipeline,
};
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants