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

sync: document --delete behavior for excluded files #4937

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

stevenkaras
Copy link
Contributor

Running aws s3 sync --delete ... will not delete files that are
excluded by filters. For example:

aws s3 mb s3://sync-delete-exclude
mkdir /tmp/sync-delete-exclude
touch /tmp/sync-delete-exclude/{1,2,3,4}
aws s3 sync /tmp/sync-delete-exclude s3://sync-delete-exclude
# no files will be deleted:
aws s3 sync s3://sync-delete-exclude /tmp/sync-delete-exclude \
  --exclude=3 --exclude=4 --delete --dryrun

This is not immediately obvious from the documentation provided, and the
interaction between exclusion filters and the --delete strategy flag
should be explicitly stated.

solves the documentation issue with #4923.

@codecov-io
Copy link

codecov-io commented Feb 9, 2020

Codecov Report

Merging #4937 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #4937   +/-   ##
========================================
  Coverage    93.95%   93.95%           
========================================
  Files          189      189           
  Lines        14524    14524           
========================================
  Hits         13646    13646           
  Misses         878      878
Impacted Files Coverage Δ
awscli/customizations/s3/syncstrategy/delete.py 100% <ø> (ø) ⬆️
awscli/compat.py 62.3% <0%> (ø) ⬆️
awscli/customizations/history/db.py 98.02% <0%> (ø) ⬆️
awscli/argparser.py 94.62% <0%> (ø) ⬆️
awscli/testutils.py 64.42% <0%> (ø) ⬆️

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 b552c00...aaeb634. Read the comment docs.

@kdaily kdaily added pr:needs-review This PR needs a review from a Member. s3sync labels Mar 2, 2021
Running `aws s3 sync --delete ...` will not delete files that are
excluded by filters. For example:

```bash
aws s3 mb s3://sync-delete-exclude
mkdir /tmp/sync-delete-exclude
touch /tmp/sync-delete-exclude/{1,2,3,4}
aws s3 sync /tmp/sync-delete-exclude s3://sync-delete-exclude
# no files will be deleted:
aws s3 sync s3://sync-delete-exclude /tmp/sync-delete-exclude \
  --exclude=3 --exclude=4 --delete --dryrun
```

This is not immediately obvious from the documentation provided, and the
interaction between exclusion filters and the `--delete` strategy flag
should be explicitly stated.
@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (fbddb4c) 0.08% compared to head (cadaca9) 0.08%.
Report is 6 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff           @@
##           develop   #4937   +/-   ##
=======================================
  Coverage     0.08%   0.08%           
=======================================
  Files          208     208           
  Lines        16627   16627           
=======================================
  Hits            14      14           
  Misses       16613   16613           
Files Coverage Δ
awscli/customizations/s3/syncstrategy/delete.py 0.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@kyleknap kyleknap left a comment

Choose a reason for hiding this comment

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

Thanks! Merging

@kyleknap kyleknap merged commit 623e3b7 into aws:develop Sep 29, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:needs-review This PR needs a review from a Member. s3sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants