-
Notifications
You must be signed in to change notification settings - Fork 159
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 ExecutionConfig.dbt_executable_path to use default_factory #678
Merged
tatiana
merged 2 commits into
astronomer:main
from
jbandoro:execution-config-post-init-get-system-dbt
Nov 16, 2023
Merged
Fix ExecutionConfig.dbt_executable_path to use default_factory #678
tatiana
merged 2 commits into
astronomer:main
from
jbandoro:execution-config-post-init-get-system-dbt
Nov 16, 2023
Conversation
This file contains 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
👷 Deploy Preview for amazing-pothos-a3bca0 processing.
|
dosubot
bot
added
area:config
Related to configuration, like YAML files, environment variables, or executer configuration
dbt:test
Primarily related to dbt test command or functionality
execution:local
Related to Local execution environment
labels
Nov 16, 2023
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. |
tatiana
approved these changes
Nov 16, 2023
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.
Thanks for this fix, @jbandoro !
This was referenced Nov 23, 2023
Merged
Merged
pull bot
pushed a commit
to pgoslatara/astronomer-cosmos
that referenced
this pull request
Nov 24, 2023
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)
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)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:config
Related to configuration, like YAML files, environment variables, or executer configuration
dbt:test
Primarily related to dbt test command or functionality
execution:local
Related to Local execution environment
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_path
because 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_path
to use a dataclass default factory forget_system_dbt
so 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