fix: full_refresh unsused in test operators#590
Conversation
👷 Deploy Preview for amazing-pothos-a3bca0 processing.
|
tatiana
left a comment
There was a problem hiding this comment.
Thanks a lot for being so quick at writing the fix for this issue, @EgorSemenov !
We must also write a test to ensure we don't make future changes that will break this feature.
We could change dev/dags/basic_cosmos_dag.py to have:
operator_args={"install_deps": True, "full_refresh": True},
And we could also extend this test:
astronomer-cosmos/tests/operators/test_local.py
Lines 343 to 346 in 3786703
To confirm that by passing full_refresh to the DbtTestLocalOperator, it doesn't add it to the generated command - WDTY? This way, we can confirm from an integration & unit test perspective the feature is what we want it to be.
|
@tatiana yes, I agree |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #590 +/- ##
==========================================
+ Coverage 92.80% 92.87% +0.06%
==========================================
Files 49 51 +2
Lines 2002 2020 +18
==========================================
+ Hits 1858 1876 +18
Misses 144 144
☔ View full report in Codecov by Sentry. |
tatiana
left a comment
There was a problem hiding this comment.
Thanks, @EgorSemenov , we'll release this fix as part of 1.2! 🎉
**Features** * Add support to model versioning available since dbt 1.6 by @binhnq94 in #516 * Add AWS Athena profile mapping by @benjamin-awd in #578 * Support customizing how dbt nodes are converted to Airflow by @tatiana in #503 * Make the arg ``dbt_project_path`` in the ``ProjectConfig`` optional by @MrBones757 in #581 **Bug fixes** * Fix Cosmos custom selector to support filtering a single model by @jlaneve and @harels in #576 * Fix using ``GoogleCloudServiceAccountDictProfileMapping`` together with ``LoadMethod.DBT_LS`` by @joppevos in #587 * Fix using the ``full_refresh`` argument in projects that contain tests by @EgorSemenov and @tatiana in #590 * Stop creating symbolic links for ``dbt_packages`` (solves ``LocalExecutor`` concurrency issue) by @tatiana in #600 **Others** * Docs: add reference to original Jaffle Shop project by @erdos2n in #583 * Docs: retries & note about DagBag error by @TJaniF in #592 * pre-commit updates in #575 and #585
… (and others) (#1175) #590 added a fix to consume the kwargs `full_refresh_ignore` if it wasn't consumed by a higher class as it was preventing the use of test in the DbtTaskGroup if `full_refresh_ignore` was set. The previous patch fixed this by consuming the variable for the `DbtLocalBaseOperator`, leaving a bug in kubernetes and docker operator. Since `AbstractDbtBaseOperator` has been added as a base of `DbtDockerBaseOperator`, `DbtKubernetesBaseOperator` and `DbtLocalBaseOperator`, moving the code there will fix all three. Fixes #1062 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tatiana Al-Chueyr <tatiana.alchueyr@gmail.com>
… (and others) (astronomer#1175) astronomer#590 added a fix to consume the kwargs `full_refresh_ignore` if it wasn't consumed by a higher class as it was preventing the use of test in the DbtTaskGroup if `full_refresh_ignore` was set. The previous patch fixed this by consuming the variable for the `DbtLocalBaseOperator`, leaving a bug in kubernetes and docker operator. Since `AbstractDbtBaseOperator` has been added as a base of `DbtDockerBaseOperator`, `DbtKubernetesBaseOperator` and `DbtLocalBaseOperator`, moving the code there will fix all three. Fixes astronomer#1062 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tatiana Al-Chueyr <tatiana.alchueyr@gmail.com>
Description
https://apache-airflow.slack.com/archives/C059CC42E9W/p1696857998959909
Related Issue(s)
issue 589
Breaking Change?
Details
airflow.exceptions.AirflowException: Invalid arguments were passed to DbtTestLocalOperator (task_id: test). Invalid arguments were:
**kwargs: {'full_refresh': True}