Skip to content
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

[BUG] s3 download does not check for existing file #807

Open
1 task done
meteodave opened this issue Sep 16, 2024 · 1 comment
Open
1 task done

[BUG] s3 download does not check for existing file #807

meteodave opened this issue Sep 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@meteodave
Copy link

Is this issue already tracked somewhere, or is this a new report?

  • I've reviewed existing issues and couldn't find a duplicate for this problem.

Current Behavior

All objects by s3 earthaccess.download are transferred even if they exist locally.

Expected Behavior

I expected that the s3 earthaccess download would check the object is already available locally (similar to the HTTP) and skip the transfer (e.g., "File MYD04_3K.A2019214.1920.061.2019215152349.hdf already downloaded).

Steps To Reproduce

Compare the earthaccess.download via HTTP versus s3 for a cloud enabled data set.

Environment

- OS:Ubuntu 20.04.6
- Python:3.8.10

Additional Context

No response

@chuckwondo chuckwondo changed the title [BUG] {{ checking existing object exists in local path for s3 earthaccess download}} [BUG] s3 download overwrites existing file Sep 16, 2024
@meteodave meteodave changed the title [BUG] s3 download overwrites existing file [BUG] s3 download does not check for existing file Sep 16, 2024
@itcarroll
Copy link
Collaborator

Thank you, @meteodave. I can reproduce.

It looks like earthaccess.Store. _download_file‎ implements a simple check for whether the path exists, which is not done in either earthaccess.Store._get_granules or earthaccess.Store._get_urls when using "direct" access logic.

@itcarroll itcarroll added the bug Something isn't working label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants