-
Notifications
You must be signed in to change notification settings - Fork 11
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
dsdt remote does not attach a remote context as expected #185
Comments
Looking into this issue, we wanted to only attach to remotes on existing "paths" in S3. The current code allows attaching to just buckets, which is fine. But for / paths we required the last key to refer to an existing object, where the object is a "folder" in s3, i.e., it ends with '/'. However the current code also allows one to attach to a remote without that requirement. |
It throws the same error even if the path ends with '/'. $ dsdt remote new s3://my-bucket/non-existing-key/
Error code 404
Unable to bind context new because URL s3://my-bucket/non-existing-key/ does not exist.
Traceback (most recent call last):
File "/mnt/data/.virtualenvs/F7DBigBang/bin/dsdt", line 11, in <module>
load_entry_point('disdat==0.9.13', 'console_scripts', 'dsdt')()
File "/mnt/data/.virtualenvs/F7DBigBang/lib/python3.6/site-packages/disdat/dsdt.py", line 91, in main
args.func(args)
File "/mnt/data/.virtualenvs/F7DBigBang/lib/python3.6/site-packages/disdat/fs.py", line 1579, in <lambda>
remote_p.set_defaults(func=lambda args: _remote(fs, args))
File "/mnt/data/.virtualenvs/F7DBigBang/lib/python3.6/site-packages/disdat/fs.py", line 1363, in _remote
fs.remote_add(args.context, args.s3_url)
File "/mnt/data/.virtualenvs/F7DBigBang/lib/python3.6/site-packages/disdat/fs.py", line 1348, in remote_add
ctxt_obj.bind_remote_ctxt(remote_context, s3_url)
File "/mnt/data/.virtualenvs/F7DBigBang/lib/python3.6/site-packages/disdat/data_context.py", line 151, in bind_remote_ctxt
raise RuntimeError
RuntimeError The only way |
Current behavior |
I have a local context:
I am trying to attach a remote context to an existing bucket with a non-existing key but I get a
RuntimeError
:If fails in the same way if the key exists:
It succeeds to attach a remote context if I point to the file that I uploaded for the previous test:
Am I using it wrong? It doesn't seem to be the expected behavior.
The text was updated successfully, but these errors were encountered: