[AIRFLOW-5817] Improve BigQuery operators idempotency#6470
Conversation
|
@TobKed can you take a look? |
cb77cef to
4ce1ec5
Compare
Codecov Report
@@ Coverage Diff @@
## master #6470 +/- ##
===========================================
+ Coverage 9.57% 83.64% +74.06%
===========================================
Files 635 635
Lines 36679 36685 +6
===========================================
+ Hits 3513 30685 +27172
+ Misses 33166 6000 -27166
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
I don't get what changed! We just moved it from hook to operator !!
There was a problem hiding this comment.
In operator in case of http error 409 we assume the resource already exists. Previously an error was thrown like "Database already exists", thus the operator was not idempotent.
There was a problem hiding this comment.
Nearly, in case of http 409 we do not rise exception, because resource already exists.
There was a problem hiding this comment.
This log message won't make sense if the table already exists or there is another HTTP error !
If someone just uses this hook and not the operator, the log message is incorrect. The try/catch should live in the hook I think
There was a problem hiding this comment.
Good catch! I agree that the log should go to operator.
There was a problem hiding this comment.
LGTM once the logline is moved to Operator.
|
@nuclearpinguin master is currently failing. A potential fix #6486 is already there. Therefore I cancelled your tests. Can you do a rebase after the PR is merged, please? :) |
|
@feluelle I will do 👌🏼 |
529552e to
a8f8088
Compare
a8f8088 to
e07c6f8
Compare
Make sure you have checked all steps below.
Jira
Description
The PR adds idempotency to
BigQueryCreateEmptyTableOperatorandBigQueryCreateEmptyDatasetOperator. I added also comment toBigQueryOperatorthat it does not have to be idempotent.Tests
Commits
Documentation