Support stream (but keep pipeline backwards compatible) binding for Pipelines#13716
Support stream (but keep pipeline backwards compatible) binding for Pipelines#13716
Conversation
🦋 Changeset detectedLatest 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 |
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
|
UnknownError: ProviderInitError |
|
@oliy Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
8459647 to
d87e070
Compare
Changeset ReviewSummary✅ All changesets look good DetailsAll 15 changeset files have been reviewed against the guidelines: Version Types
Changelog Quality
Markdown Headers
Analytics
Dependabot Changesets
Experimental Features
Files Reviewed
|
928e085 to
bad292e
Compare
…ing for Pipelines
bad292e to
fd20fdf
Compare
| env[pipeline.binding] = { | ||
| type: "pipelines", | ||
| pipeline: pipeline.stream || pipeline.pipeline, | ||
| }; |
There was a problem hiding this comment.
🔴 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.
| env[pipeline.binding] = { | |
| type: "pipelines", | |
| pipeline: pipeline.stream || pipeline.pipeline, | |
| }; | |
| env[pipeline.binding] = { | |
| type: "pipelines", | |
| stream: pipeline.stream || pipeline.pipeline, | |
| }; |
Was this helpful? React with 👍 or 👎 to provide feedback.
…
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.
A picture of a cute animal (not mandatory, but encouraged)