Skip to content

feat: make override_primary_test_model_id Fusion compatible#930

Merged
haritamar merged 1 commit intomasterfrom
devin/1771416772-fusion-compatible-override-primary-test-model-id
Feb 18, 2026
Merged

feat: make override_primary_test_model_id Fusion compatible#930
haritamar merged 1 commit intomasterfrom
devin/1771416772-fusion-compatible-override-primary-test-model-id

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 18, 2026

feat: make override_primary_test_model_id Fusion compatible

Summary

Resolves #929

dbt Fusion does not support arbitrary keys in config() blocks — custom values must be placed inside meta. This PR adds a fallback so that override_primary_test_model_id is also read from the unified meta dict (which merges config(meta={...}) and top-level meta) when not found directly in config_dict.

Precedence: config_dictmeta (direct config wins).

Review & Testing Checklist for Human

  • Confirm the or fallback precedence is correct — config_dict value takes priority over meta. If a user sets it in both places, the config_dict value wins.
  • Verify that meta at line 58 (from get_node_meta) is indeed populated before this line executes (it is — line 58 vs line 91), so no ordering issue.
  • Test with a dbt Fusion project using config(meta={'override_primary_test_model_id': 'model.pkg.name'}) to confirm the value is picked up correctly.

Notes

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced configuration resolution for primary test model identification by adding metadata as a fallback source when the primary configuration is unavailable.

…ng meta

Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Contributor

👋 @devin-ai-integration[bot]
Thank you for raising your pull request.
Please make sure to add tests and document all user-facing changes.
You can do this by editing the docs files in the elementary repository.

@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

The pull request adds fallback logic to read override_primary_test_model_id from metadata when the config value is unavailable, enabling compatibility with dbt Fusion which restricts arbitrary keys in config blocks.

Changes

Cohort / File(s) Summary
Fallback Logic for Override Primary Test Model ID
macros/edr/dbt_artifacts/upload_dbt_tests.sql
Modified variable assignment to check both config_dict and meta sources for override_primary_test_model_id, using the config value if present or falling back to meta as a secondary source.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A little hop through config and meta too,
Now Fusion plays nice with the overrides we do,
One line of fallback, a logical dance,
Giving the test models their rightful chance! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Fusion compatibility by supporting override_primary_test_model_id in meta.
Linked Issues check ✅ Passed The code change implements the required fallback behavior: attempting config_dict first, then falling back to meta when absent, directly addressing issue #929.
Out of Scope Changes check ✅ Passed The change is minimal and focused: only modifying one line to add meta fallback support for override_primary_test_model_id as specified in issue #929.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1771416772-fusion-compatible-override-primary-test-model-id

Comment @coderabbitai help to get the list of available commands and usage tips.

@haritamar haritamar merged commit af6d575 into master Feb 18, 2026
22 of 23 checks passed
@haritamar haritamar deleted the devin/1771416772-fusion-compatible-override-primary-test-model-id branch February 18, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make override_primary_test_model_id Fusion compatible

1 participant