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 200 errors implementation #3276

Merged
merged 20 commits into from
Oct 21, 2024
Merged

Conversation

alexgromero
Copy link
Contributor

The S3 service may occasionally respond with an HTTP 200 OK status code while including errors in the response body. This PR addresses this handling to ensure accurate error reporting.

@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.20%. Comparing base (0e229ae) to head (017bacf).
Report is 123 commits behind head on develop.

Files with missing lines Patch % Lines
botocore/handlers.py 94.11% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3276      +/-   ##
===========================================
+ Coverage    93.17%   93.20%   +0.02%     
===========================================
  Files           66       66              
  Lines        14339    14358      +19     
===========================================
+ Hits         13361    13382      +21     
+ Misses         978      976       -2     

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

botocore/handlers.py Outdated Show resolved Hide resolved
tests/functional/test_credentials.py Outdated Show resolved Hide resolved
tests/functional/test_s3.py Show resolved Hide resolved
tests/functional/test_s3.py Outdated Show resolved Hide resolved
tests/unit/test_handlers.py Outdated Show resolved Hide resolved
@alexgromero alexgromero force-pushed the s3-200-errors branch 2 times, most recently from f5a7bb6 to 6e31ea8 Compare October 8, 2024 21:22
botocore/endpoint.py Outdated Show resolved Hide resolved
botocore/model.py Outdated Show resolved Hide resolved
Copy link
Contributor

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

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

Some high level comments of what may make this a bit simpler. We should be able to drop the empty body requirement after our discussion.

botocore/handlers.py Outdated Show resolved Hide resolved
botocore/model.py Outdated Show resolved Hide resolved
botocore/endpoint.py Outdated Show resolved Hide resolved
botocore/handlers.py Outdated Show resolved Hide resolved
botocore/handlers.py Outdated Show resolved Hide resolved
botocore/model.py Outdated Show resolved Hide resolved
tests/functional/test_s3.py Show resolved Hide resolved
tests/functional/test_s3.py Outdated Show resolved Hide resolved
Copy link
Contributor

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

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

Looking good! Have a few minor notes on comments and unit tests. We want to try to be succinct with comments/logging as long messages are often ignored.

botocore/handlers.py Outdated Show resolved Hide resolved
botocore/handlers.py Outdated Show resolved Hide resolved
botocore/handlers.py Outdated Show resolved Hide resolved
botocore/handlers.py Outdated Show resolved Hide resolved
botocore/handlers.py Outdated Show resolved Hide resolved
tests/unit/test_handlers.py Outdated Show resolved Hide resolved
tests/unit/test_handlers.py Outdated Show resolved Hide resolved
alexgromero and others added 4 commits October 17, 2024 13:31
Co-authored-by: Nate Prewitt <[email protected]>
Co-authored-by: Nate Prewitt <[email protected]>
Co-authored-by: Nate Prewitt <[email protected]>
Co-authored-by: Nate Prewitt <[email protected]>
Co-authored-by: Nate Prewitt <[email protected]>
botocore/handlers.py Outdated Show resolved Hide resolved
Copy link
Contributor

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

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

Looking good! One last thing to fix and then I think we're set.

botocore/handlers.py Outdated Show resolved Hide resolved
Co-authored-by: Nate Prewitt <[email protected]>
Copy link
Contributor

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

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

Things look good, assuming tests pass I think this is ready to ship. Great job, @alexgromero!

@nateprewitt
Copy link
Contributor

Closing/reopening to rerun tests against fix in #3282.

@nateprewitt nateprewitt reopened this Oct 18, 2024
@alexgromero alexgromero merged commit d64e956 into boto:develop Oct 21, 2024
78 of 79 checks passed
@alexgromero alexgromero deleted the s3-200-errors branch October 21, 2024 16:26
aws-sdk-python-automation added a commit that referenced this pull request Oct 21, 2024
* release-1.35.45:
  Bumping version to 1.35.45
  Update to latest models
  S3 200 errors implementation (#3276)
  Fix flakey test by allowing arbitrary warnings during capture (#3282)
hswong3i pushed a commit to alvistack/boto-botocore that referenced this pull request Oct 22, 2024
alexgromero added a commit to alexgromero/botocore that referenced this pull request Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants