Skip to content

fix: copy config.group onto source and singular tests - #16265

Closed
larspettermadsstuen wants to merge 2 commits into
dbt-labs:mainfrom
larspettermadsstuen:fix/test-config-group-unattached
Closed

larspettermadsstuen wants to merge 2 commits into
dbt-labs:mainfrom
larspettermadsstuen:fix/test-config-group-unattached

Conversation

@larspettermadsstuen

Copy link
Copy Markdown
Contributor

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

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • 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

Unattached tests were dropping config.group from the top-level group
field. Fall back to the explicit config when there is no attached node.

Co-authored-by: Cursor <cursoragent@cursor.com>
@aiguofer aiguofer added the ci:approve-public-fork-ci Maintainer approval to run secret-bearing CI on a public fork PR. Auto-removed on each new push. label Sep 16, 2026
@aiguofer

Copy link
Copy Markdown
Contributor

Thank you very much for your contribution! your fix has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:approve-public-fork-ci Maintainer approval to run secret-bearing CI on a public fork PR. Auto-removed on each new push. cla:yes community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v2 Bug] Fusion drops explicit config.group → top-level group on unattached test nodes (source-attached generic + singular tests)

2 participants