-
Notifications
You must be signed in to change notification settings - Fork 322
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_bucket.py - deal gracefuly with empty bucket policy #1368
s3_bucket.py - deal gracefuly with empty bucket policy #1368
Conversation
When using wasabi object storage, the bucket policy can be blank. This was throwing a json decode error. Fix by checking for empty string and returning None.
Build failed. ❌ ansible-galaxy-importer FAILURE in 4m 11s |
fix syntax error
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 3m 37s |
Build failed. ❌ ansible-galaxy-importer RETRY_LIMIT in 3m 43s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to submit this PR. A couple of minor tweaks.
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 3m 48s |
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 4m 31s |
recheck |
Build failed. ❌ ansible-galaxy-importer RETRY_LIMIT in 15s |
recheck |
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 3m 48s |
recheck |
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 3m 42s |
recheck |
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 4m 22s |
recheck |
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 4m 32s |
recheck |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 30s |
Build succeeded (gate pipeline). ✔️ ansible-galaxy-importer SUCCESS in 3m 56s |
Backport to stable-5: 💚 backport PR created✅ Backport PR branch: Backported as #1371 🤖 @patchback |
s3_bucket.py - deal gracefuly with empty bucket policy When using wasabi object storage, the bucket policy can be blank. This was throwing a json decode error. Fix by checking for empty string and returning None. SUMMARY Deals gracefully with empty bucket policy (encountered on wasabi storage). ISSUE TYPE Bugfix Pull Request COMPONENT NAME s3_bucket ADDITIONAL INFORMATION Recreate by attempting to create a new bucket on wasabi: ENV: S3_URL=https://s3.us-west-1.wasabisys.com name: create bucket s3_bucket: name: "thisbucketwillfail" Reviewed-by: Mark Chappell Reviewed-by: magicrobotmonkey Reviewed-by: Alina Buzachis (cherry picked from commit 6948eb5)
[PR #1368/6948eb57 backport][stable-5] s3_bucket.py - deal gracefuly with empty bucket policy This is a backport of PR #1368 as merged into main (6948eb5). When using wasabi object storage, the bucket policy can be blank. This was throwing a json decode error. Fix by checking for empty string and returning None. SUMMARY Deals gracefully with empty bucket policy (encountered on wasabi storage). ISSUE TYPE Bugfix Pull Request COMPONENT NAME s3_bucket ADDITIONAL INFORMATION Recreate by attempting to create a new bucket on wasabi: ENV: S3_URL=https://s3.us-west-1.wasabisys.com name: create bucket s3_bucket: name: "thisbucketwillfail" Reviewed-by: Mark Chappell
When using wasabi object storage, the bucket policy can be blank. This was throwing a json decode error. Fix by checking for empty string and returning None.
SUMMARY
Deals gracefully with empty bucket policy (encountered on wasabi storage).
ISSUE TYPE
COMPONENT NAME
s3_bucket
ADDITIONAL INFORMATION
Recreate by attempting to create a new bucket on wasabi:
ENV:
S3_URL=https://s3.us-west-1.wasabisys.com
s3_bucket:
name: "thisbucketwillfail"