Skip to content

Conversation

@BobDu
Copy link
Contributor

@BobDu BobDu commented Nov 25, 2022

Signed-off-by: BobDu i@bobdu.cc

add some important log in aws athena hook

^ 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.

Signed-off-by: BobDu <i@bobdu.cc>
@BobDu BobDu requested a review from eladkal as a code owner November 25, 2022 15:52
@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Nov 25, 2022
BobDu added 2 commits December 1, 2022 11:37
Signed-off-by: BobDu <i@bobdu.cc>
Signed-off-by: BobDu <i@bobdu.cc>
Comment on lines 116 to 120
self.log.error(
"Exception while getting query state %s. Query execution id: %s",
ex,
query_execution_id,
)
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to use log.exception instead? (Same for other calls below)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if we should use log.exception .
In this PR I just added query execution id in the log message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@uranusjr I modify it to use log.exception

Signed-off-by: BobDu <i@bobdu.cc>
}
if client_request_token:
params["ClientRequestToken"] = client_request_token
if self.log_query:
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason why we want to use a flag (log_query) to configure whether we log or not? In other words, why dont we log regardless ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Oops! I missed that. Thanks for pointing it out. LGTM

@eladkal eladkal self-requested a review December 4, 2022 09:49
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.

7 participants