-
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
fix(bigquery.py): pass correct project_id to triggerer #35200
Conversation
The triggerer uses a different project than the InsertJobOperator when the `project_id` passed to the operator = None
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
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.
Could you add a unit test for this change?
if self.project_id is None: | ||
self.project_id = hook.project_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.
to be consistent with L2852, although either is fine
if self.project_id is None: | |
self.project_id = hook.project_id | |
self.project_id = self.project_id or self.hook.project_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.
I would remove all references that do project_id = self.project_id or self.hook.project_id
since this is what caused the whole issue in the first place, IMO.
The style I'm following is the one used for most hooks assignments when mutating the object on execution
I wanted to do this but unfortunately the dev-containers don't work on apple-silicon macs. I have added the test and will push and test this on an intel mac later this week. We've also forwarded this too Google since this is causing major issues for us |
bump |
Tests are failing
|
@eladkal can you retrigger the tests? I managed to run and verify everything on my local machine |
So there's another test failing but thats not part of the code I touched I guess that is fine? |
Good morning folx, thx for your patience. Does this look good now? I fixed the last few issues I was seeing from the static-checks as well |
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.
It looks good, LGTM
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
The triggerer uses a different project than the InsertJobOperator when the
project_id
passed to the operator = None