Conversation
When a data test has no attached_node (source tests and singular tests), dbt-core 1.x copies the explicit config.group into the test's group property, but the Fusion engine leaves it null. This causes --select group:xxx and state:modified to give different results between the two engines for source tests and singular tests that have an explicit config.group. Fix: when attached_node is None, fall back to test_config.group instead of always using None. Generic tests on models/seeds/snapshots continue to inherit the parent node's group.
|
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @waterWang |
|
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. |
|
@waterWang will you complete required steps for this, or is this abandoned? Keen to get this fixed, happy to open a new pr. |
|
@larspettermadsstuen I am very eager as well but @waterWang might be very preoccupied with all the work they have been doing in August: @HannanNaeem How can this move forward? |
Busy bee indeed. Not too hopeful of an update, so I made a "competing" PR here. |
|
Thanks for your contribution! I'm closing this PR and moving forward with #16265 |
* fix: copy config.group onto source and singular tests Closes #16265 Resolves #15930 @waterWang already fixed this in #15940. That PR is still open, but it looks stuck: CLA unsigned, no changelog, and it's gone dirty against main. I asked there whether they were going to finish it; no movement, and other people still want the fix. Opening a fresh PR so this can actually land. The code change is theirs — I reapplied it on current main and added the changelog. Credit for the diagnosis and the patch goes to them. ### Problem On Fusion, source tests and singular tests never get a top-level `group`, even when you set `config.group`. Core 1.x copies that config onto `group`. Selectors like `group:…`, `state:modified`, and group notifications all look at the top-level field, so those tests quietly drop out of group-based workflows. Generic tests on models are already fine — they inherit the parent model's group, and we should leave that alone (including the case where the parent has no group). ### Solution If the test has no `attached_node`, use `config.group`. If it does (model/seed/snapshot), keep inheriting the parent. #15940 doesn't include a repro. The parse setup and how to check `config.group` vs `group` are in #15930 — I ran that on a local build of this branch and the three bug rows now get `group=test_group`. No new unit test — the check that matters is parse + the manifest field. ### Checklist - [x] I have read the contributing guide and understand what's expected of me. - [x] I have run this code in development, and it appears to resolve the stated issue. - [x] This PR includes tests, or tests are not required or relevant for this PR. - [x] This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX. Made with [Cursor](https://cursor.com) Copybara-Public-Head-SHA: 3add97d GitOrigin-RevId: d2e6ac8 * Mirror contributed changelog entry into the Fusion changelog * test: add regression test for config.group on source/singular tests Covers the manifest top-level `group` field for test nodes with no attached_node (source generic tests, singular tests) falling back to config.group, and confirms model-attached generic tests still inherit the parent model's group. Closes #15930 --------- Co-authored-by: larspettermadsstuen <100695195+larspettermadsstuen@users.noreply.github.com> Co-authored-by: Diego Fernandez <diego.fernandez@dbtlabs.com> GitOrigin-RevId: b8f60418839a87bd975c8432ea6e096c9f8ebea5

Fix: config.group propagation for unattached test nodes
When a data test has no
attached_node(source tests and singular tests), dbt-core 1.x copies the explicitconfig.groupinto the test'sgroupproperty, but the Fusion engine leaves itnull. This causes--select group:xxxandstate:modifiedto give different results between the two engines.Root cause
In
resolve_data_tests.rs, thegroupfield onDbtTestAttrwas set only from the parent model's group:When
attached_nodeisNone(source tests, singular tests), this always producedNone, even when the test had an explicitconfig.group.Fix
When
attached_nodeisNone, fall back totest_config.group(the explicit config value). Generic tests on models/seeds/snapshots continue to inherit the parent node's group.Fixes: #15930