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

Fix session token from extra config #730

Merged
merged 3 commits into from Oct 27, 2022
Merged

Fix session token from extra config #730

merged 3 commits into from Oct 27, 2022

Conversation

bharanidharan14
Copy link
Contributor

when AWS secrete and access key is passed via the connection UI field the session token is not considered, when it is passed via extra config it is considered

closes: #725

@codecov
Copy link

codecov bot commented Oct 27, 2022

Codecov Report

Base: 98.48% // Head: 98.48% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (d94427a) compared to base (07c97dc).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #730   +/-   ##
=======================================
  Coverage   98.48%   98.48%           
=======================================
  Files          86       86           
  Lines        4622     4625    +3     
=======================================
+ Hits         4552     4555    +3     
  Misses         70       70           
Impacted Files Coverage Δ
astronomer/providers/amazon/aws/hooks/base_aws.py 96.66% <100.00%> (+0.37%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bharanidharan14
Copy link
Contributor Author

@rajaths010494 @pankajastro @phanikumv can you review this PR

Copy link
Contributor

@rajaths010494 rajaths010494 left a comment

Choose a reason for hiding this comment

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

Overall LGTM.

@@ -65,6 +65,12 @@ async def get_client_async(self) -> AioBaseClient:
self.log.info("Retrieving region_name from Connection.extra_config['region_name']")
region_name = extra_config["region_name"] # pragma: no cover

if "aws_session_token" in extra_config:
self.log.info(
Copy link
Contributor

Choose a reason for hiding this comment

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

in the sync version, they also log self.conn_repr https://github.com/apache/airflow/blob/main/airflow/providers/amazon/aws/utils/connection_wrapper.py#L349
would it be possible to do similar logging here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can do it, whatever the previous async log was there I followed the same. If we want to follow the same in sync version I need to change all the log in this file, So far now to fix this issue we can go ahead with this, we can cover this in #732

Copy link
Contributor

Choose a reason for hiding this comment

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

As long we have a GitHub issue for it I'm ok.

Copy link
Contributor

@pankajastro pankajastro left a comment

Choose a reason for hiding this comment

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

LGTM

@phanikumv phanikumv merged commit ad89152 into main Oct 27, 2022
@phanikumv phanikumv deleted the token-error-725 branch October 27, 2022 08:33
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.

Token error with Sagemaker Async Operators
4 participants