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

Add no-overwrite option to s3 cp and s3 mv commands #6095

Closed
wants to merge 1 commit into from

Conversation

vz10
Copy link
Contributor

@vz10 vz10 commented Apr 14, 2021

Issue #, if available: #2874

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@vz10 vz10 force-pushed the no-overwrite branch 2 times, most recently from f82c4a3 to 2bda3e5 Compare April 14, 2021 23:31
@codecov-io
Copy link

Codecov Report

Merging #6095 (f82c4a3) into v2 (4172ada) will increase coverage by 0.00%.
The diff coverage is 97.36%.

❗ Current head f82c4a3 differs from pull request most recent head 2bda3e5. Consider uploading reports for the commit 2bda3e5 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##               v2    #6095   +/-   ##
=======================================
  Coverage   94.14%   94.15%           
=======================================
  Files         271      271           
  Lines       21550    21608   +58     
=======================================
+ Hits        20288    20344   +56     
- Misses       1262     1264    +2     
Impacted Files Coverage Δ
awscli/customizations/s3/filters.py 98.43% <97.22%> (-1.57%) ⬇️
awscli/customizations/s3/subcommands.py 97.24% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4172ada...2bda3e5. Read the comment docs.

@four43
Copy link

four43 commented Sep 13, 2021

This seems like it would be prone to race condition issues since it's just a HEAD then a write.

@jfstephe
Copy link

@vz10 - hi! Any update on this PR?

@kdaily kdaily linked an issue Nov 17, 2021 that may be closed by this pull request
@justindho justindho added contribution:core This is a PR that came from AWS. ready-for-review labels May 19, 2022
@jjchoi08
Copy link

jjchoi08 commented Jun 8, 2022

Any update to this PR? I in need for no-overwrite option.. thanks!

@orf
Copy link

orf commented Aug 10, 2022

you can't implement a no-overwrite option in S3. it's not possible to do without race conditions.

@jfstephe
Copy link

jfstephe commented Aug 10, 2022

This doesn't fix the problem but may help some people out there in specific scenarios!
https://github.com/jfstephe/aws-s3-lock

@grosser
Copy link

grosser commented Aug 10, 2022

you can't implement a no-overwrite option in S3. it's not possible to do without race conditions.

"get item, do not upload if it exists" is what is requested here, and that is trivial to implement, nobody said it needs to be atomic

@RyanFitzSimmonsAK
Copy link
Contributor

Hey everyone, thanks for this pull request and the discussion around it. We've made the decision to close this pull request, and leave the feature request open for tracking purposes. There is certainly value in the feature being requested here, but this isn't something we can really accept a pull request for, as there are implementation details that need to be handled internally. Please continue to 👍 the tracking issue (#2874), and describe your use cases for such a feature in the replies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution:core This is a PR that came from AWS. ready-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --no-overwrite option to aws s3 cp/mv
9 participants