Conversation
|
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
1 similar comment
|
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12567 +/- ##
==========================================
- Coverage 91.42% 90.96% -0.46%
==========================================
Files 203 203
Lines 25574 25725 +151
==========================================
+ Hits 23380 23400 +20
- Misses 2194 2325 +131
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Hey folks! Just want to flag a few things here that are potential 🚩/ that I think should be addressed before proceeding:
My concern is that large projects are often the ones that benefit from conditional filtering of deps etc. if that becomes environment (or really to any generic condition) it can blow up the potentially complexity of managing projects (because manifest production / upstream dependencies are conditional). Usually frameworks have a way of specifying "dev" dependencies which are fully detached from being production build dependencies (see dev dependencies in rust).
Disabled packages are excluded from the lock file. This means the lock file becomes environment-specific, defeating its purpose (reproducible builds). Running dbt deps in dev vs prod produces different lock files. You can't commit a single lock file to your github repo for example.
There's no validation that models in the project don't reference macros/models from a disabled package. If a model uses {{ codegen.generate_model_yaml(...) }} and codegen is disabled in prod, you get a runtime Jinja error, not a helpful compile-time error. This is a really popular foot gun I'd expect users to experience.
The PR (I believe) makes dbt deps profile-aware (via optional_profile()) - unless that is already the case. This is an important detail for CI/Docker environments where you install deps before configuring profiles. Subtle but potentially breaking change due to added dependency. @sriramr98 - I'm in-person as you know and can chat re: the implementation details |
Resolves #7434
Problem
There is currently no way to conditionally enable or disable packages in
packages.yml. Dev-only packages likecodegenandaudit_helperare always resolved and installed, even in production environments where they add unnecessary bloat and resolution time.Solution
Adds an
enabledfield to all package types inpackages.yml. The field supports static booleans and Jinja expressions with access totarget,var()andenv_var().Behavior:
Jinja context available in enabled:
Checklist