-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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 BigQueryCursor execute method if the location is missing #39659
Fix BigQueryCursor execute method if the location is missing #39659
Conversation
d6bd308
to
a8b8013
Compare
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.
is it feasible to add the test case for the bug?
Can you fix the failing static checks?
@dirrao I can add a unit test, but it will be totally dependent on mocks, because the problem happens between the two client requests. Will that do? I can't fix the static check, it fails because of smth that does not seem related to my PR: |
This static check failure not relevant your PR, it will be fix (at least temporary) by #39662 |
a8b8013
to
2cd6917
Compare
We have system tests for google so probably we should modify/add coverage there. @VladaZakharova WDYT? |
2cd6917
to
9f33610
Compare
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.
LGTM
This addresses a bug where
BigQueryValueCheckOperator
tasks failed if it was not provided with the location parameter and the dataset location was outside of the US.If the location parameter is not provided to
BigQueryValueCheckOperator
, then the location parameter will still be None when execution reaches theBigQueryCursor
execute method. The execute method makes two client requests: the first to the BigQuery client, which can work without the location provided, the second to the Google Discovery client, which cannot find a resource without the location resulting in a error.Pulling the location from a successful BigQuery request result resolves that problem.
Change list:
^ 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.