Skip to content

Conversation

@eejbyfeldt
Copy link

@eejbyfeldt eejbyfeldt commented Feb 28, 2024

All the AwsHooks support passing None for aws_conn_id meaning that is should use the default boto3 behavior for deriving credentials. But in lots of operators the aws_conn_id type is typed as only str this leads to type errors in users code if they pass None to aws_conn_id even though this is supported in practice.

This PR resolves this by updating the all (maybe just most) type annotations for aws_conn_id to be str | None instead of just str.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Feb 28, 2024
@eejbyfeldt eejbyfeldt force-pushed the unify-aws-conn-id-type branch from 3a06e93 to 8ebac36 Compare February 28, 2024 09:18
@Taragolis
Copy link
Contributor

Really nice

Copy link
Contributor

@vincbeck vincbeck left a comment

Choose a reason for hiding this comment

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

Love it

@vincbeck vincbeck merged commit 2bc1036 into apache:main Feb 28, 2024
@eejbyfeldt eejbyfeldt deleted the unify-aws-conn-id-type branch February 28, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants