-
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
Feature: state:modified.macros #3559
Conversation
646ee34
to
7bdba68
Compare
Thanks for the reviews @nathaniel-may @kwigley! I added some comments where the code wasn't clear. I ended up renaming I spent slightly too long thinking about which of these sub-selector names should be singular and which should be plural. I decided to use "per node" as the frame, such that:
|
8605fc6
to
7fcc4eb
Compare
* First cut at state:modified for macro changes * First cut at state:modified subselectors * Update test_graph_selector_methods * Fix flake8 * Fix mypy * Update 062_defer_state_test/test_modified_state * PR feedback. Update changelog
* First cut at state:modified for macro changes * First cut at state:modified subselectors * Update test_graph_selector_methods * Fix flake8 * Fix mypy * Update 062_defer_state_test/test_modified_state * PR feedback. Update changelog
resolves #2704
resolves #3278
resolves this tweet
Description
If a macro's SQL is modified, mark any node that depends on it (or depends on a macro that depends on it) as modified.
While I was here, it was trivial to make sub-selectors (finally) happen:
state:modified.body
state:modified.configs
state:modified.persisted_descriptions
state:modified.database_representations
state:modified.relation
state:modified.macros
For review
persisted_descriptions
vs. justdescriptions
, to be clear it's the subset withpersist_docs
enabled. On the other hand, I'm not sure aboutmodified.database_representations
vs. something shorter & sweeter likemodified.relations
.same_x
checks (same_fqn
,same_quoting
,same_external
) that are resource-specific and wouldn't have dedicated subselectors in this first round. I think that's ok—these aren't ones we've heard as much demand for, and they're still included in thestate:modified
superset—just worth calling out.Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.