-
Notifications
You must be signed in to change notification settings - Fork 597
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
Should fix the R2 bucket create endpoint #1035
Conversation
changelog detected ✅ |
Codecov Report
@@ Coverage Diff @@
## master #1035 +/- ##
==========================================
+ Coverage 49.06% 49.94% +0.88%
==========================================
Files 108 115 +7
Lines 10428 10991 +563
==========================================
+ Hits 5116 5490 +374
- Misses 4200 4338 +138
- Partials 1112 1163 +51
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Also, do wrangler API calls count as public documentation? |
thanks, i'll with the R2 folks internally and see what we can do here.
afraid not; the service team only maintains the API/developer docs. the wrangler/workers folks are in a bit of privileged position where they usually own the APIs they are using so are across the upcoming changes. |
Was the PR you just got merged 3 days ago in #1028 already broken by an API that was removed without notice? |
The API worked when I tested it. The back ended seemed to have changed without noticed as it broke, creating buckets from wrangler as well. |
I will raise an issue with enterprise support. Pulling a public API that is actively in use is ridiculous. It's still in the public docs: https://api.cloudflare.com/#r2-bucket-create-bucket I will note that this API was mis-documented anyways. The documentation says to POST, but wrangler2 was using PUT. As a general rule, one should not POST to a non-existent resource to create it (as the documentation says), the correct HTTP verb for this case is PUT (as wrangler2 was doing). A more common approach is to POST to the collection URL, e.g. I will say again, though, under no circumstances should an in-use API have been yanked from production without notice. |
this was somewhat unintentional and the change is being rolled back so this isn't needed. thanks anyway! |
Ok, that's good. But also the discrepancy I observed re: PUT vs POST is worth sorting out. The docs say POST, but wrangler2 is doing a PUT. The better verb here is indeed PUT as it implies creation. Here's a good write up of the differences: https://restfulapi.net/rest-put-vs-post/ |
@jacobbednarz This should be reopened. The API is changing to |
I'll confirm with the team as they were looking into with issues when using tokens last I checked and were backing out the change until they could dig in further. |
there is still no ETA on the |
the documentation for fixing the POST payloads is coming in the next couple of days. we'll revive this as it will be the way forward. |
This functionality has been released in v0.48.0. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Description
Should fix the R2 bucket creation API request
See cloudflare/workers-sdk#1653
Fixes #1033
Has your change been tested?
Unit tests pass
Types of changes
What sort of change does your code introduce/modify?
Checklist:
Should wait for wrangler to be merged to confirm that this is the correct fix.