-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
add some important log in aws athena hook #27917
Conversation
Signed-off-by: BobDu <[email protected]>
Signed-off-by: BobDu <[email protected]>
Signed-off-by: BobDu <[email protected]>
self.log.error( | ||
"Exception while getting query state %s. Query execution id: %s", | ||
ex, | ||
query_execution_id, | ||
) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 <[email protected]>
@@ -91,8 +94,12 @@ def run_query( | |||
} | |||
if client_request_token: | |||
params["ClientRequestToken"] = client_request_token | |||
if self.log_query: |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #27917 (comment)
There was a problem hiding this comment.
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
Signed-off-by: BobDu [email protected]
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.