-
Notifications
You must be signed in to change notification settings - Fork 26
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 BigQueryInsertJobOperatorAsync failure after the google provider upgrade #471
Conversation
- use generate_job_id method to get job_id
Codecov Report
@@ Coverage Diff @@
## main #471 +/- ##
=======================================
Coverage 97.66% 97.66%
=======================================
Files 62 62
Lines 3465 3465
=======================================
Hits 3384 3384
Misses 81 81
Continue to review full report at Codecov.
|
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.
Let's test in astro cloud after merging this.
We should also be able to test this locally with the latest version of the provider. |
- Add test case for generate_job_id - remove unused ignore
job_id = self.hook.generate_job_id( | ||
job_id=self.job_id, | ||
dag_id=self.dag_id, | ||
task_id=self.task_id, | ||
logical_date=context["logical_date"], | ||
configuration=self.configuration, | ||
force_rerun=self.force_rerun, | ||
) |
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.
If you wanted to make this backwards and forwards-compatible without bumping the dependency, you could do the following:
try:
# for google provider>=8.1.0
job_id = self.hook.generate_job_id(
job_id=self.job_id,
dag_id=self.dag_id,
task_id=self.task_id,
logical_date=context["logical_date"],
configuration=self.configuration,
force_rerun=self.force_rerun,
)
except AttributeError:
# for google provider<8.1.0
job_id = self._job_id(context)
closes #470