fix(bigquery.py): pass correct project_id to triggerer#35200
fix(bigquery.py): pass correct project_id to triggerer#35200potiuk merged 16 commits intoapache:mainfrom
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)
|
hussein-awala
left a comment
There was a problem hiding this comment.
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.
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.
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 |
|
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_idpassed to the operator = None