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 expires implementation #3232

Merged
merged 20 commits into from
Sep 10, 2024
Merged

Conversation

alexgromero
Copy link
Contributor

@alexgromero alexgromero commented Aug 6, 2024

This PR customizes the S3 Expires shape in preparation for model changes. Instead of throwing an error, operations will now complete with fallback behavior and a warning.

  • Ensures the Expires header remains a timestamp for backwards compatibility.
  • Omits the Expires key in the response if parsing fails and logs a warning.

Operations with Expires in their output shapes will:

  • Add a synthetic member called ExpiresString to retain the raw value of Expires.
  • Deprecate Expires and encourage users to use the new field ExpiresString through documentation.

@codecov-commenter
Copy link

codecov-commenter commented Aug 6, 2024

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

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.17%. Comparing base (c68aa1a) to head (95797f3).
Report is 157 commits behind head on develop.

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

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3232      +/-   ##
===========================================
+ Coverage    93.12%   93.17%   +0.05%     
===========================================
  Files           66       66              
  Lines        14252    14331      +79     
===========================================
+ Hits         13272    13353      +81     
+ Misses         980      978       -2     

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

.changes/next-release/enhancement-s3-94466.json Outdated Show resolved Hide resolved
botocore/handlers.py Outdated Show resolved Hide resolved
tests/functional/test_s3.py Outdated Show resolved Hide resolved
tests/functional/test_s3.py Outdated Show resolved Hide resolved
tests/functional/test_s3.py Outdated Show resolved Hide resolved
@jonathan343 jonathan343 self-requested a review August 20, 2024 19:58
botocore/parsers.py Outdated Show resolved Hide resolved
botocore/parsers.py Outdated Show resolved Hide resolved
tests/unit/test_parsers.py Outdated Show resolved Hide resolved
botocore/handlers.py Outdated Show resolved Hide resolved
botocore/parsers.py Outdated Show resolved Hide resolved
botocore/data/s3/2006-03-01/service-2.sdk-extras.json Outdated Show resolved Hide resolved
botocore/data/s3/2006-03-01/service-2.sdk-extras.json Outdated Show resolved Hide resolved
tests/functional/test_s3.py Outdated Show resolved Hide resolved
tests/unit/test_parsers.py Outdated Show resolved Hide resolved
botocore/parsers.py Outdated Show resolved Hide resolved
botocore/parsers.py Outdated Show resolved Hide resolved
botocore/parsers.py Outdated Show resolved Hide resolved
botocore/parsers.py Outdated Show resolved Hide resolved
botocore/parsers.py Outdated Show resolved Hide resolved
tests/functional/test_s3.py Outdated Show resolved Hide resolved
Co-authored-by: Nate Prewitt <nate.prewitt@gmail.com>
Copy link
Contributor

@jonathan343 jonathan343 left a comment

Choose a reason for hiding this comment

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

LGTM!

botocore/parsers.py Outdated Show resolved Hide resolved
botocore/parsers.py Outdated Show resolved Hide resolved
tests/functional/test_service_headers.py Outdated Show resolved Hide resolved
tests/unit/test_handlers.py Outdated Show resolved Hide resolved
botocore/endpoint.py Outdated Show resolved Hide resolved
botocore/endpoint.py Outdated Show resolved Hide resolved
botocore/handlers.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jonathan343 jonathan343 left a comment

Choose a reason for hiding this comment

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

:shipit:

@alexgromero alexgromero merged commit 4c2771a into boto:develop Sep 10, 2024
34 checks passed
aws-sdk-python-automation added a commit that referenced this pull request Sep 10, 2024
* release-1.35.16:
  Bumping version to 1.35.16
  Update endpoints model
  Update to latest models
  remove outdated documentation page (#3249)
  s3 expires implementation (#3232)
  Update awcrt version to 0.21.5 (#3248)
hswong3i pushed a commit to alvistack/boto-botocore that referenced this pull request Sep 11, 2024
* implementation to gracefully handle invalid timestamps returned in the Expires header
@alexgromero alexgromero deleted the s3-expires-timestamp branch October 21, 2024 16:27
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