-
Notifications
You must be signed in to change notification settings - Fork 148
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
Unable to use a custom base_url with delete_object #189
Comments
Please note, this is also fixed in pull request #194. |
Glad to hear it, @kaneplusplus! I guess I'll leave this open for now, though I'm okay with a maintainer closing it if needed. |
I think this is now fixed, as it is essentially the same problem as #191. Let me know if it's not working and I will reopen. You'll need to set the |
Great, thanks @leeper. That fix looks like it'll work for my use case so I'll give it a run through soon and let you know if I run into any issues. |
Great. Thanks! |
Hey @leeper, now that I sit down to test this, it isn't working. I spent some time yesterday and today attempting to debug my issue and I've had no luck. I get a
Upon inspection, I notice the local variable
It looks like maybe the Authorization header is indicating a different set of hashed fields than what are being sent but I haven't figured out whether this is the case just yet. Any insight here would be greatly appreciated! |
I can revisit this at some point. Those docs have a full example, so we should be able to add test to aws.signature to ensure it's working on that level. |
I've added a basic test to aws.signature. Unfortunately their examples don't give enough detail to provide a full test, but from looking at it, this seems like it is an aws.s3 rather than aws.signature problem. Two ideas:
|
Awesome, thanks @leeper. Nice to narrow it down a bit. Both your points make sense (I think) and I'll take a look at fixing our code and report back. |
Made some slight debugging process. I now get this HTTP 400:
when I run Here's the example for creating a Space (bucket) from DigitalOcean:
Compared to what I end up sending:
The first difference I see is that the request body has a different I also see the
which makes total sense. The last thing I see is the difference in |
Also noticed that |
@amoeba What did you set |
I'm not totally sure. Let me try this again and post a more reproducible report. |
I'm not sure what I had set these to before, but I just put together a script that uses the latest build of aws.s3 from the master branch to create a Space (bucket). Pardon the verbosity but I just wanted to run through this from top to bottom again (mostly to jog my memory): I set my env vars like:
When calling
(which is the code I'd ideally like to write), I get a If I try to work around it by setting
I get a Verbose output from the above is
If I override setup_s3_url so that it sets the URL to https://analogsea-nyc3-test-two.nyc3.digitaloceanspaces.com/ I still get an HTTP 400. As before, if I dump the raw response from the API, I get this document:
|
Thanks, again, for really detailed info. Give version 0.3.18 (current on Github) a try. There was some inflexible code, which seems to have been generating these errors. The SHA256 thing might be a separate bug or it might just be a reflection of trying to hack around with the internals and it will go away once the URL parsing stuff is fixed. |
Thanks for the fix. No luck with the latest build. Running:
I get an HTTP 400 w/
Would it be helpful for debugging if I shared my DO Spaces API keys with you? |
If you're okay with that, yes. My gmail is thosjleeper. |
I can confirm with the edits just pushed that the following works:
|
Works for me too! Nice work, @leeper!! I'll test other API methods shortly and close this unless I find anything. |
This looks golden, thanks a million, @leeper. I was able to make some minor tweaks and PR this on analogsea just tonight. |
I was writing a function delete an Object from a DigitalOcean Space (which follows the AWS S3 API) using
aws.s3::delete_object
and was getting an error about a bucket not found. A quick debug and a look at the source ofdelete_object
revealed the cause was a superfluous call toaws.s3/R/delete_object.R
Line 21 in c28925d
It's superfluous in that it isn't used later on in the function body and, because I'm querying a custom endpoint and the function (appears?) hard-coded to only support AWS, I was getting an error.
Since this line of code isn't doing anything, I'm going to submit a PR so, if you agree with my change, this can get closed out quickly.
The text was updated successfully, but these errors were encountered: