-
Notifications
You must be signed in to change notification settings - Fork 712
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
Adding argument to specify rule to delete if don't want to delete every rule in config #6679
Adding argument to specify rule to delete if don't want to delete every rule in config #6679
Conversation
🦋 Changeset detectedLatest commit: b17d39e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
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/10834626965/npm-package-wrangler-6679 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6679/npm-package-wrangler-6679 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10834626965/npm-package-wrangler-6679 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10834626965/npm-package-create-cloudflare-6679 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10834626965/npm-package-cloudflare-kv-asset-handler-6679 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10834626965/npm-package-miniflare-6679 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10834626965/npm-package-cloudflare-pages-shared-6679 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10834626965/npm-package-cloudflare-vitest-pool-workers-6679 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10834626965/npm-package-cloudflare-workers-editor-shared-6679 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10834626965/npm-package-cloudflare-workers-shared-6679 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you fill out the PR description template?
`${queue}`, | ||
`${rule}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these wrapped in `${...}`?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure - was leftover from previous committer, will remove
}) | ||
.option("rule", { | ||
describe: | ||
"The id of the rule to delete. If no rule is specified, all rules for the bucket/queue configuration will be deleted. ex '--ruleId 12345678'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The id of the rule to delete. If no rule is specified, all rules for the bucket/queue configuration will be deleted. ex '--ruleId 12345678'", | |
"The id of the rule to delete. If no rule is specified, all rules for the bucket/queue configuration will be deleted.", |
packages/wrangler/src/r2/helpers.ts
Outdated
const body: DeleteNotificationRequestBody = { | ||
rules: [ruleId], | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flag description implies that providing a rule ID is optional. What should happen here in that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a rule id is not specified, then all rules within the config will be deleted (which is the current behavior)
e2a46f3
to
a29c1e2
Compare
a29c1e2
to
308cba1
Compare
For posterity, we're merging this without passing status checks intentionally. It's repeatedly flaking on Windows fixtures and re-running isn't helping because it's on a fork and so Turbo caching isn't enabled. We're confident the failures are unrelated to these changes, and in any case will re-run the fixtures before releasing a version of Wrangler with this change. Approved by @lrapoport-cf |
a22985e
to
b17d39e
Compare
What this PR solves / how to test
Updates the R2 Event Notification DELETE payload to the Cloudflare API to be able to specify rules within a config to delete.
Author has addressed the following