-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[dagster-dbt] Upgrade dagster-dbt to be compatible with dbt 1.5.x #13907
Conversation
Currently blocked on: dbt-labs/dbt-core#7465, although should be possible to work around |
python_modules/libraries/dagster-dbt/dagster_dbt/cloud/asset_defs.py
Outdated
Show resolved
Hide resolved
Ok avoided the |
Not sure if this is beneficial for this PR at all, but wanted to put this on your radar (coming out in v1.5): https://docs.getdbt.com/reference/programmatic-invocations I know dagster-dbt does a lot of stuff behind the scenes with the CLI, so this might help clean things up a bit |
@tha23rd Owen mentioned this internally to our team! Yeah this will be such a great QOL cleanup for our integration. |
17fdbf8
to
66dbb73
Compare
66dbb73
to
6549e3e
Compare
Current dependencies on/for this PR: This comment was auto-generated by Graphite. |
…3907) ## Summary & Motivation Fixes: #13898 The changes: - `--no-use-color` is deprecated (`--no-use-colors` is allowed on all versions 1.0+) - The dbt selection string parsing logic relies on global state being set (I know, I know...), and the way that this global state is set has been changed (previously, they were attributes directly on the module, now they're all wrapped into a single GLOBAL_FLAGS object) - Nasty hack to deal with dbt-core shifting from `argparse` to `click`. We were using the argument parsing functionality to parse dbt Cloud job commands, so I found a somewhat similar entrypoint to work with. - Ensure that the current working directory when executing dbt commands is the project directory. This handles the issue linked below, where dbt now writes output files to the cwd rather than the project directory. This is not an issue if the cwd *is* the project directory ;) - Update some tests to be a bit more flexible to subtly different output formats (generally this is just testing stuff in the DbtCliOutput object, which we don't particularly expect or need to be very stable) - Some errors got reworded, so tests needed to be updated In general, the `select_unique_ids_from_manifest` function access a lot of things it potentially shouldn't touch from the dbt internals, and there's no guarantee similar issues don't crop up in the future. The hope is that there is eventually a dbt-native python entrypoint for this functionality, at which point in time we can remove all this ugly stuff. ## How I Tested These Changes Added a dbt_15X tox env, which is pinned to the specific rcs that were available to me. Once the real `dbt 1.5.x` comes out, this should be unpinned --------- Co-authored-by: Rex Ledesma <rex@elementl.com>
…gster-io#13907) ## Summary & Motivation Fixes: dagster-io#13898 The changes: - `--no-use-color` is deprecated (`--no-use-colors` is allowed on all versions 1.0+) - The dbt selection string parsing logic relies on global state being set (I know, I know...), and the way that this global state is set has been changed (previously, they were attributes directly on the module, now they're all wrapped into a single GLOBAL_FLAGS object) - Nasty hack to deal with dbt-core shifting from `argparse` to `click`. We were using the argument parsing functionality to parse dbt Cloud job commands, so I found a somewhat similar entrypoint to work with. - Ensure that the current working directory when executing dbt commands is the project directory. This handles the issue linked below, where dbt now writes output files to the cwd rather than the project directory. This is not an issue if the cwd *is* the project directory ;) - Update some tests to be a bit more flexible to subtly different output formats (generally this is just testing stuff in the DbtCliOutput object, which we don't particularly expect or need to be very stable) - Some errors got reworded, so tests needed to be updated In general, the `select_unique_ids_from_manifest` function access a lot of things it potentially shouldn't touch from the dbt internals, and there's no guarantee similar issues don't crop up in the future. The hope is that there is eventually a dbt-native python entrypoint for this functionality, at which point in time we can remove all this ugly stuff. ## How I Tested These Changes Added a dbt_15X tox env, which is pinned to the specific rcs that were available to me. Once the real `dbt 1.5.x` comes out, this should be unpinned --------- Co-authored-by: Rex Ledesma <rex@elementl.com>
Summary & Motivation
Fixes: #13898
The changes:
--no-use-color
is deprecated (--no-use-colors
is allowed on all versions 1.0+)argparse
toclick
. We were using the argument parsing functionality to parse dbt Cloud job commands, so I found a somewhat similar entrypoint to work with.In general, the
select_unique_ids_from_manifest
function access a lot of things it potentially shouldn't touch from the dbt internals, and there's no guarantee similar issues don't crop up in the future. The hope is that there is eventually a dbt-native python entrypoint for this functionality, at which point in time we can remove all this ugly stuff.How I Tested These Changes
Added a dbt_15X tox env, which is pinned to the specific rcs that were available to me. Once the real
dbt 1.5.x
comes out, this should be unpinned