Repository navigation
[Python] Make --aws_* options defaults and --s3_* options S3 overrides - #40532
Merged
Merged
Conversation
shunping
force-pushed
the
secret-manager-7
branch
from
October 12, 2026 18:08
9276b68 to
a1187f0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40532 +/- ##
=============================================
+ Coverage 56.16% 79.73% +23.56%
=============================================
Files 1124 487 -637
Lines 178336 82278 -96058
Branches 1489 0 -1489
=============================================
- Hits 100170 65606 -34564
+ Misses 75645 16672 -58973
+ Partials 2521 0 -2521
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
shunping
force-pushed
the
secret-manager-7
branch
from
October 12, 2026 19:55
30a64f5 to
a8b7ccf
Compare
--aws_credentials_secret_manager--s3_api_version in S3Options and remove --aws_api_version
shunping
marked this pull request as ready for review
October 12, 2026 20:01
Abacn
approved these changes
Oct 12, 2026
Contributor
|
Assigning reviewers: R: @claudevdm for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
shunping
force-pushed
the
secret-manager-7
branch
from
October 12, 2026 22:21
a8b7ccf to
30dd940
Compare
--s3_api_version in S3Options and remove --aws_api_version--aws_* options defaults and --s3_* options S3 overrides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #40529, Part of #40528.
Motivation
#40529 added
AwsOptionsand deprecatedS3Options, so every--s3_*option became a deprecated alias of an--aws_*option. That assumes one set of client settings fits every AWS service, which doesn't hold in practice:--aws_endpoint_url=http://minio:9000, any non-S3 client (e.g. Secrets Manager) would be sent to MinIO too.verify/ SSL usually follow the endpoint, e.g. a self-signed certificate on an S3-compatible store.api_versionpicks a service-specific model (S3:2006-03-01, Secrets Manager:2017-10-17), and passing one service's version to another fails:The AWS SDKs handle this with global defaults plus overrides per service, e.g.
AWS_ENDPOINT_URLandAWS_ENDPOINT_URL_S3, where the service-specific value wins. This PR adopts the same model.Changes
AwsOptions(--aws_*) sets the defaults for every AWS client:access_key_id,secret_access_key,session_token,endpoint_url,region_name,verify,disable_ssl.--aws_api_versionis removed, since a single value can't apply to all services.--s3_*aliases and the fallback logic are removed.AwsOptions.get_client_settings(service_options=None)returns the effective client settings for a service:--aws_*defaults and applies overrides from a service options class.AWS_CLIENT_SETTINGS_PREFIX(e.g.'s3') and defining--<prefix>_<setting>options. An override applies when it's set.AwsOptionsdoesn't change.S3Options(--s3_*) is no longer deprecated:--s3_access_key_id,--s3_secret_access_key,--s3_session_token,--s3_endpoint_url,--s3_region_name,--s3_verifyand--s3_disable_ssloverride the matching--aws_*defaults for the S3 client only.--s3_api_versionis S3-only.boto3_client.Clientbuilds the client fromaws_options.get_client_settings(s3_options)pluss3_options.s3_api_version, for bothPipelineOptionsand dict options.CHANGES.md: removed theS3Optionsdeprecation entry, and reworded theAwsOptionsentry:--aws_*set defaults for all AWS clients, and--s3_*override them for S3.