Skip to content

s3/gs: do not try to make directory on top level path#3524

Merged
efiop merged 4 commits into
treeverse:masterfrom
skshetry:makedirs-s3
Mar 27, 2020
Merged

s3/gs: do not try to make directory on top level path#3524
efiop merged 4 commits into
treeverse:masterfrom
skshetry:makedirs-s3

Conversation

@skshetry
Copy link
Copy Markdown
Collaborator

@skshetry skshetry commented Mar 24, 2020

  • ❗ I have followed the Contributing to DVC checklist.

  • 📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here. If the CLI API is changed, I have updated tab completion scripts.

  • ❌ I will check DeepSource, CodeClimate, and other sanity checks below. (We consider them recommendatory and don't expect everything to be addressed. Please fix things that actually improve code or fix bugs.)

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

This resolves #3523. But, we should try not to make directory path objects if we really don't need to.

@skshetry skshetry added the bug Did we break something? label Mar 24, 2020
@skshetry skshetry requested review from efiop and pared March 24, 2020 13:00
@skshetry skshetry self-assigned this Mar 24, 2020
Comment thread tests/func/test_s3.py
@skshetry skshetry requested review from efiop and pared March 25, 2020 10:21
Copy link
Copy Markdown
Contributor

@pared pared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 minor comments.
Also, the build was failing, seemingly for an unrelated reason, I allowed myself to restart it.

Comment thread tests/unit/remote/test_remote.py Outdated
Comment thread tests/unit/remote/test_remote.py Outdated
Comment on lines +35 to +36
remote = remote_cls(None, {"url": url})
exc = Exception("should not try to create dir on top-level path")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about newline here? Would separate client exception setup from "others".

Copy link
Copy Markdown
Collaborator Author

@skshetry skshetry Mar 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added (maybe too much). :)

Comment thread tests/unit/remote/test_remote.py Outdated
Copy link
Copy Markdown
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@efiop efiop merged commit a7aecf7 into treeverse:master Mar 27, 2020
@skshetry skshetry deleted the makedirs-s3 branch April 7, 2020 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Did we break something?

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure when using S3 remote cache

3 participants