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

s3_sync - Improve error handling when testing for existing files #1330

Merged

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Jul 9, 2022

SUMMARY

fixes: #58

  • Simplifies handling of '404' codes (use is_boto3_error_code)
  • Assume 403 files need updating (it's the best we can do, and mimics aws cli)
  • Allows Boto3 exceptions to fall through to the outer try/except clause and cleanly fail rather than rethrowing it as an Exception()
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

s3_sync

ADDITIONAL INFORMATION

@tremble tremble requested review from markuman and alinabuzachis July 9, 2022 08:24
@tremble tremble added backport-3 PR should be backported to the stable-3 branch backport-4 PR should be backported to the stable-4 branch labels Jul 9, 2022
@ansibullbot
Copy link

@ansibullbot ansibullbot added community_review feature This issue/PR relates to a feature request has_issue integration tests/integration module module plugins plugin (any type) tests tests labels Jul 9, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 3m 51s
✔️ build-ansible-collection SUCCESS in 4m 45s
✔️ ansible-test-sanity-docker-devel SUCCESS in 10m 32s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 55s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 05s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 09s
✔️ ansible-test-units-community-aws-python38 SUCCESS in 5m 33s
✔️ ansible-test-units-community-aws-python39 SUCCESS in 6m 03s
✔️ ansible-test-splitter SUCCESS in 2m 27s
✔️ integration-community.aws-1 SUCCESS in 5m 51s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED

@tremble tremble requested a review from jatorcasso July 9, 2022 09:49
@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Jul 9, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ ansible-galaxy-importer SUCCESS in 4m 55s
✔️ build-ansible-collection SUCCESS in 5m 45s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 57s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 52s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 26s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 42s
✔️ ansible-test-units-community-aws-python38 SUCCESS in 5m 59s
✔️ ansible-test-units-community-aws-python39 SUCCESS in 5m 55s
✔️ ansible-test-splitter SUCCESS in 2m 42s
✔️ integration-community.aws-1 SUCCESS in 5m 46s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 40984a4 into ansible-collections:main Jul 9, 2022
@patchback
Copy link

patchback bot commented Jul 9, 2022

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/40984a403c150b31cd58236028ae0d0945c161f0/pr-1330

Backported as #1334

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jul 9, 2022
s3_sync - Improve error handling when testing for existing files

SUMMARY
fixes: #58

Simplifies handling of '404' codes (use is_boto3_error_code)
Assume 403 files need updating (it's the best we can do, and mimics aws cli)
Allows Boto3 exceptions to fall through to the outer try/except clause and cleanly fail rather than rethrowing it as an Exception()

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
s3_sync
ADDITIONAL INFORMATION

Reviewed-by: Joseph Torcasso <None>
(cherry picked from commit 40984a4)
@patchback
Copy link

patchback bot commented Jul 9, 2022

Backport to stable-4: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4/40984a403c150b31cd58236028ae0d0945c161f0/pr-1330

Backported as #1335

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jul 9, 2022
s3_sync - Improve error handling when testing for existing files

SUMMARY
fixes: #58

Simplifies handling of '404' codes (use is_boto3_error_code)
Assume 403 files need updating (it's the best we can do, and mimics aws cli)
Allows Boto3 exceptions to fall through to the outer try/except clause and cleanly fail rather than rethrowing it as an Exception()

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
s3_sync
ADDITIONAL INFORMATION

Reviewed-by: Joseph Torcasso <None>
(cherry picked from commit 40984a4)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jul 10, 2022
…) (#1335)

[PR #1330/40984a40 backport][stable-4] s3_sync - Improve error handling when testing for existing files

This is a backport of PR #1330 as merged into main (40984a4).
SUMMARY
fixes: #58

Simplifies handling of '404' codes (use is_boto3_error_code)
Assume 403 files need updating (it's the best we can do, and mimics aws cli)
Allows Boto3 exceptions to fall through to the outer try/except clause and cleanly fail rather than rethrowing it as an Exception()

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
s3_sync
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jul 10, 2022
…) (#1334)

[PR #1330/40984a40 backport][stable-3] s3_sync - Improve error handling when testing for existing files

This is a backport of PR #1330 as merged into main (40984a4).
SUMMARY
fixes: #58

Simplifies handling of '404' codes (use is_boto3_error_code)
Assume 403 files need updating (it's the best we can do, and mimics aws cli)
Allows Boto3 exceptions to fall through to the outer try/except clause and cleanly fail rather than rethrowing it as an Exception()

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
s3_sync
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
@tremble tremble deleted the issue/58 branch September 9, 2022 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3 PR should be backported to the stable-3 branch backport-4 PR should be backported to the stable-4 branch community_review feature This issue/PR relates to a feature request has_issue integration tests/integration mergeit Merge the PR (SoftwareFactory) module module plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

s3_sync module does not function with bucket shared across multiple was accounts.
3 participants