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

Refactor pipelines commands into separate files, rename some options #7769

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

cmackenzie1
Copy link
Contributor

@cmackenzie1 cmackenzie1 commented Jan 14, 2025

Pipelines is currently in closed beta, renaming these without providing aliases should have limited to zero impact

Moving each of the subcommand handlers and options for each subcommand into its own file. This also renames many of the parameters to be more specific.

The following parameters have been renamed:

Previous Name New Name
access-key-id r2-access-key-id
secret-access-key r2-secret-access-key
transform transform-worker
r2 r2-bucket
prefix r2-prefix
binding enable-worker-binding
http enable-http
authentication require-http-auth
filename file-template
filepath partition-template

Adds the following new option for create and update commands:

--cors-origins           CORS origin allowlist for HTTP endpoint (use * for any origin)  [array]

Closes https://jira.cfdata.org/browse/PIPE-160.


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: Unit tests cover the change
  • Public documentation

Copy link

changeset-bot bot commented Jan 14, 2025

🦋 Changeset detected

Latest commit: 33c4b28

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

This PR includes changesets to release 2 packages
Name Type
wrangler Minor
@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 force-pushed the cole/pipe-160-pipelines-cors branch from c9e676d to e7987d4 Compare January 14, 2025 23:11
@cmackenzie1 cmackenzie1 self-assigned this Jan 14, 2025
Copy link
Contributor

github-actions bot commented Jan 14, 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/12957594700/npm-package-wrangler-7769

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

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

Or you can use npx with this latest build directly:

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

cloudflare-workers-bindings-extension:

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

create-cloudflare:

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

@cloudflare/kv-asset-handler:

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

miniflare:

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

@cloudflare/pages-shared:

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

@cloudflare/unenv-preset:

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

@cloudflare/vite-plugin:

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

@cloudflare/vitest-pool-workers:

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

@cloudflare/workers-editor-shared:

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

@cloudflare/workers-shared:

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

@cloudflare/workflows-shared:

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

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


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20250124.0
workerd 1.20250124.0 1.20250124.0
workerd --version 1.20250124.0 2025-01-24

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

@cmackenzie1 cmackenzie1 marked this pull request as ready for review January 14, 2025 23:45
@cmackenzie1 cmackenzie1 requested a review from a team as a code owner January 14, 2025 23:45
@cmackenzie1 cmackenzie1 force-pushed the cole/pipe-160-pipelines-cors branch from 8661d52 to 133c4d2 Compare January 21, 2025 23:45
@cmackenzie1 cmackenzie1 force-pushed the cole/pipe-160-pipelines-cors branch 2 times, most recently from 4b31581 to 773ebc2 Compare January 24, 2025 17:29
**Pipelines is currently in closed beta, renaming these without
providing aliases _should_ have no impact**

Moving each of the subcommand handlers and options for each subcommand into its own
file. This also renames many of the parameters to be more specific.

The following parameters have been renamed:

| Previous Name | New Name |
| ---- | ---- |
| access-key-id | r2-access-key-id |
| secret-access-key | r2-secret-access-key |
| transform | transform-worker |
| r2 | r2-bucket |
| prefix | r2-prefix |
| binding | enable-worker-binding |
| http | enable-http |
| authentication | require-http-auth |
| filename | file-template |
| filepath | partition-template |

Adds the following new option for `create` and `update` commands:

```
--cors-origins           CORS origin allowlist for HTTP endpoint (use * for any origin)  [array]
```

Closes https://jira.cfdata.org/browse/PIPE-160.
This also replaces the use of retryOnError with a for-loop as
retryOnError wasn't working as expected.
Previously this was nested under the `enableHttp` block which doesn't
make sense if HTTP is already enabled and the user just wants to update
the authentication or CORS settings.
@cmackenzie1 cmackenzie1 force-pushed the cole/pipe-160-pipelines-cors branch from d10d5c9 to 33c4b28 Compare January 24, 2025 21:05
@lrapoport-cf lrapoport-cf added the caretaking Priority for caretaking label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
caretaking Priority for caretaking
Projects
Status: Untriaged
Development

Successfully merging this pull request may close these issues.

4 participants