Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flags for Pipelines create and update #8753

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

cmackenzie1
Copy link
Contributor

Transforms are not publicly available yet so we are hiding this from the help output. Private beta users will still be able to provide this flag.

This commit also introduces a new flag --shard-count for power users to hand tune their pipeline.

Fixes https://jira.cfdata.org/browse/PIPE-241, https://jira.cfdata.org/browse/PIPE-242


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • Wrangler / Vite E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: not needed
  • Public documentation
  • Wrangler V3 Backport
    • TODO (before merge)
    • Wrangler PR:
    • Not necessary because: Not public yet.

Sorry, something went wrong.

@cmackenzie1 cmackenzie1 requested a review from a team as a code owner April 1, 2025 20:10
Copy link

changeset-bot bot commented Apr 1, 2025

🦋 Changeset detected

Latest commit: 08b6f8d

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

This PR includes changesets to release 2 packages
Name Type
wrangler Patch
@cloudflare/vitest-pool-workers 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

@cmackenzie1 cmackenzie1 requested review from oliy and hhoughgg April 1, 2025 20:10

Verified

This commit was signed with the committer’s verified signature.
cmackenzie1 Cole Mackenzie
Transforms are not publicly available yet so we are hiding this from the help output.
Private beta users will still be able to provide this flag.

This commit also introduces a new flag `--shard-count` for power users
to hand tune their pipeline.

Fixes https://jira.cfdata.org/browse/PIPE-241, https://jira.cfdata.org/browse/PIPE-242
Copy link
Contributor

github-actions bot commented Apr 1, 2025

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-wrangler-8753

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/8753/npm-package-wrangler-8753

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-wrangler-8753 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-cloudflare-workers-bindings-extension-8753 -O ./cloudflare-workers-bindings-extension.0.0.0-v705539487.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v705539487.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-create-cloudflare-8753 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-cloudflare-kv-asset-handler-8753

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-miniflare-8753

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-cloudflare-pages-shared-8753

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-cloudflare-unenv-preset-8753

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-cloudflare-vite-plugin-8753

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-cloudflare-vitest-pool-workers-8753

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-cloudflare-workers-editor-shared-8753

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-cloudflare-workers-shared-8753

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14205075282/npm-package-cloudflare-workflows-shared-8753

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@4.6.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 4.20250321.1
workerd 1.20250321.0 1.20250321.0
workerd --version 1.20250321.0 2025-03-21

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

One question about default values for shard count. Othewise LGTM.

@@ -281,6 +291,10 @@ export async function createPipelineHandler(
pipelineConfig.destination.path.filename = args.fileTemplate;
}

if (args.shardCount) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This will treat undefined and 0 the same. I assume this is what you want?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this is fine. 0 is not an allowed value for number of shards.

.option("shard-count", {
type: "number",
describe:
"Number of pipeline shards. More shards handle higher request volume; fewer shards produce larger output files",
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the default number of shards? One?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think 2, but that may change. We are trying to avoid baking defaults into wrangler and let the API set them instead.

@@ -11,16 +11,20 @@ import type { R2BucketInfo } from "../r2/helpers";

// ensure this is in sync with:
// https://bitbucket.cfdata.org/projects/PIPE/repos/superpipe/browse/src/coordinator/types.ts#6
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still bitbucket or gitlab?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

GitLab now. What is the policy on linking to internal codebases in a public project?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's generally fine I believe since it is all locked behind Access.
But no need to update if you don't want to.

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Apr 2, 2025
@petebacondarwin petebacondarwin self-assigned this Apr 2, 2025
@petebacondarwin petebacondarwin merged commit 245cfbd into main Apr 2, 2025
19 checks passed
@petebacondarwin petebacondarwin deleted the cole/pipelines-dev-week branch April 2, 2025 19:41
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Apr 2, 2025
@workers-devprod workers-devprod mentioned this pull request Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants