Repository navigation
[Python] Add AwsOptions and deprecate S3Options - #40529
Merged
Merged
Conversation
shunping
force-pushed
the
secret-manager-6
branch
from
October 12, 2026 14:23
1da9254 to
de09a52
Compare
AwsOptions and deprecate S3Options
shunping
marked this pull request as ready for review
October 12, 2026 14:25
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40529 +/- ##
=============================================
+ Coverage 56.16% 79.73% +23.56%
=============================================
Files 1124 487 -637
Lines 178336 82285 -96051
Branches 1489 0 -1489
=============================================
- Hits 100170 65610 -34560
+ Misses 75645 16675 -58970
+ 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:
|
Contributor
|
Assigning reviewers: R: @tvalentyn 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). |
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.
Motivation
S3Optionsholds settings for creating an AWS service client: credentials, region, endpoint and SSL settings. None of them are specific to S3. Upcoming AWS integrations, such as AWS Secrets Manager support, need the same settings, so this PR adds a generalAwsOptionsand deprecatesS3Options.Changes
AwsOptionsinapache_beam.options.pipeline_options, with the same fields asS3Optionsunder anaws_prefix:--aws_access_key_id--s3_access_key_id--aws_secret_access_key--s3_secret_access_key--aws_session_token--s3_session_token--aws_endpoint_url--s3_endpoint_url--aws_region_name--s3_region_name--aws_api_version--s3_api_version--aws_verify--s3_verify--aws_disable_ssl--s3_disable_ssl--s3_*flags are still accepted. Eachaws_*option falls back to itss3_*counterpart when it isn't set, and logs a one-time deprecation warning. If both are set,--aws_*wins.PipelineOptions(s3_endpoint_url=...)) and the dict form accepted by the S3 client.S3Optionsis now a deprecated subclass ofAwsOptions. Itss3_*attributes return the correspondingaws_*values, so existing code likeoptions.view_as(S3Options).s3_region_namekeeps working.AwsOptionsonly. SinceS3Optionsis no longer a direct subclass ofPipelineOptions, no flag is registered twice.boto3_client.Clientnow reads its settings fromAwsOptions.This is one of the steps to address #40528