Fix ExecutionConfig.dbt_executable_path to use default_factory#678
Merged
tatiana merged 2 commits intoNov 16, 2023
Merged
Conversation
👷 Deploy Preview for amazing-pothos-a3bca0 processing.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #678 +/- ##
=======================================
Coverage 92.76% 92.76%
=======================================
Files 55 55
Lines 2238 2238
=======================================
Hits 2076 2076
Misses 162 162 ☔ View full report in Codecov by Sentry. |
This was referenced Nov 23, 2023
Merged
Merged
Collaborator
arojasb3
pushed a commit
to arojasb3/astronomer-cosmos
that referenced
this pull request
Jul 14, 2024
Bug fixes * Fix running models that use alias while supporting dbt versions by @binhnq94 in astronomer#662 * Make profiles_yml_path optional for ExecutionMode.DOCKER and KUBERNETES by @MrBones757 in astronomer#681 * Prevent overriding dbt profile fields with profile args of type or method by @jbandoro in astronomer#702 * Fix LoadMode.DBT_LS fail when dbt outputs WarnErrorOptions by @adammarples in astronomer#692 * Add support for env vars in RenderConfig for dbt ls parsing by @jbandoro in astronomer#690 * Add support for Kubernetes on_warning_callback by @david-mag in astronomer#673 * Fix ExecutionConfig.dbt_executable_path to use ``default_factory`` by @jbandoro in astronomer#678 Others * Docs fix: example DAG in the README and docs/index by @tatiana in astronomer#705 * Docs improvement: highlight DAG examples in README by @iancmoritz and @jlaneve in astronomer#695 (cherry picked from commit 2878d6a)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I was seeing unit tests failing locally for
dbt.test_graph.test_load_via_dbt_ls_with_invalid_dbt_pathbecause I have dbt installed on my system and after the fix in #666 this test will fail since it fallbacks to the system dbt if it exists instead of "dbt" which the test is expecting.This PR changes
ExecutionConfig.dbt_executable_pathto use a dataclass default factory forget_system_dbtso it is not called when ExecutionConfig is defined and allows us to more easily patch the shutil.which in the test so it won't fail if there is a system dbt installation.Related Issue(s)
None
Breaking Change?
None