Skip to content

Improving caching of S3 endpoints by omitting unused parameters - #3692

Merged
jonathan343 merged 2 commits into
boto:developfrom
ashovlin:s3-endpoints-unused-params
May 22, 2026
Merged

Improving caching of S3 endpoints by omitting unused parameters#3692
jonathan343 merged 2 commits into
boto:developfrom
ashovlin:s3-endpoints-unused-params

Conversation

@ashovlin

Copy link
Copy Markdown
Contributor

Issue #, if available: #3528, variation of PR #3529, backport from aws/aws-cli#10165

Description of changes: When resolving the endpoint for S3 operations, currently {'Key', 'Prefix', 'CopySource'} are defined as parameters in S3's rules, but aren't currently referenced. This is an issue for endpoint caching, since objects in the same bucket result in a unique set of endpoint parameters. This slows down repeated operations against objects in the same bucket, we re-resolve the endpoint each time.

Now, we drop these three parameters specifically before passing them into the rules. This comes with a test that will begin failing when the rules start referencing these parameters (or add new, unused parameters).

We believe this is safe for botocore, these extra parameters are in the rules for a plugin in a different SDK.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter

codecov-commenter commented Apr 28, 2026

Copy link
Copy Markdown

⚠️ 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 92.56%. Comparing base (ee748e4) to head (60c88a0).
⚠️ Report is 214 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    #3692      +/-   ##
===========================================
- Coverage    92.59%   92.56%   -0.03%     
===========================================
  Files           68       68              
  Lines        15634    15773     +139     
===========================================
+ Hits         14477    14601     +124     
- Misses        1157     1172      +15     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jonathan343 jonathan343 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @ashovlin! Looks good to me outside of one typo.

Comment thread tests/functional/test_endpoint_rulesets.py Outdated
Co-authored-by: jonathan343 <43360731+jonathan343@users.noreply.github.com>
@ashovlin
ashovlin requested a review from jonathan343 May 21, 2026 20:35
@jonathan343
jonathan343 merged commit 89a5ca0 into boto:develop May 22, 2026
49 checks passed
aws-sdk-python-automation added a commit that referenced this pull request May 22, 2026
* release-1.43.14:
  Bumping version to 1.43.14
  Update endpoints model
  Update to latest models
  Improving caching of S3 endpoints by omitting unused parameters (#3692)
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.

3 participants