shiichan

Cloudflare Pipelines binding config moves from pipeline to stream!

Hey there, it's Shiichan! Today I've got a small but handy little rename to share, especially if you spend time in your config files.

Cloudflare Changelog developers.cloudflare.com

What was announced?

Over on the Cloudflare Changelog, there's news that the field name used in the Pipelines binding config has changed. The field you used to write as pipeline is now called stream. It's a small update, but a nice one if you write Workers config files.

The story so far

Until now, when you set up a Pipelines binding, you'd write this in your Wrangler configuration file:

"pipeline": "STREAM_ID"

Or like this in TOML:

pipeline = "STREAM_ID"

But the value you pass is a stream ID, so the pipeline field name was a little out of step with what it actually points to.

What changes

Now you can just write stream instead. The name and the value line up, so it's instantly clear you're pointing at a stream:

"stream": "STREAM_ID"
stream = "STREAM_ID"

The old pipeline field is still accepted for now, so nothing breaks if you don't rush to change everything. It's marked as deprecated, though, so you'll start seeing warnings. When you get a spare moment, switching to stream is the way to go!

Dive Deep

The only thing that changed is the config file field name. The binding name, the TypeScript types, and the runtime API all stay exactly the same. So you don't need to touch your actual code, just fix one line in your config.

For the new syntax and the full binding setup, check out the Writing to streams guide.

Wrap-up

  • The Pipelines binding config field pipeline was renamed to stream
  • The old pipeline still works but is deprecated. Switch to stream to clear the warnings
  • Only the field name changed. The binding name, TypeScript types, and runtime API are untouched

This one's for folks using Pipelines from Workers who like to keep their config files tidy!