Operator argument fix#1648
Conversation
✅ Deploy Preview for sunny-pastelito-5ecb04 canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1648 +/- ##
==========================================
+ Coverage 90.70% 97.58% +6.88%
==========================================
Files 83 83
Lines 5174 5174
==========================================
+ Hits 4693 5049 +356
+ Misses 481 125 -356 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
hi @johnhoran thanks for sticking through this PR. Looks like the integration test is failing in the CI. Would you be able to take a look at it? We are aiming to release Cosmos 1.10 in the upcoming week and would be really nice to see if we can have this fix in and included in the release. |
|
Hi @pankajkoti sorry this has gone around so many times. The test is passing on my end now with airflow2.4, so hopefully this is the last run. |
thanks @johnhoran . I re-triggered the CI for running integration tests. We can definitely re-trigger more if need be. And please don't be sorry :), all you're doing is helping the community with the fix and also investing your time here, that's much appreciated 🙇🏽 |
pankajkoti
left a comment
There was a problem hiding this comment.
LGTM. Thanks a lot @johnhoran for fixing these 🙇🏽 👏🏽
Description
Cosmos 1.9.0 introduced a change such that
AbstractDbtBaseno longer inherits from airflowBaseOperatorand I believe this introduced two bugs.default_argsand these would end up being passed to cosmos. So for example we were specifying theproject_diras a default arg, and in 1.9.0 these projects were broken because AbstractDbtBase was not longer getting a project_dir specified. So the first change is to check both kwargs and default_args for the values AbstractDbtBase requires.I've only made this change for the kubernetes operator, but I'd argue it should be done for the local a docker ones too.KubernetesPodOperatorfor the args that it requires, but notably this approach misses arguments that are required byBaseOperator, e.g. the task_group.I've made an effort to restore the convention in airflow that all arguments must be consumed by the operator. So an argument must either be consumed byAbstractDbtBaseor it will be passed along to the operator, it may also be consumed by both classes.Related Issue(s)
Breaking Change?
Checklist