Skip to content

Add test: semantic manifest unaffected by cache config#12589

Draft
theyostalservice wants to merge 2 commits intomainfrom
test/semantic-manifest-cache-config-invariance
Draft

Add test: semantic manifest unaffected by cache config#12589
theyostalservice wants to merge 2 commits intomainfrom
test/semantic-manifest-cache-config-invariance

Conversation

@theyostalservice
Copy link
Contributor

Summary

  • Adds a functional test (TestSemanticManifestUnaffectedByCacheConfig) that proves the semantic manifest output is identical regardless of cache.enabled status on saved queries
  • The cache config is a dbt-core-only concern stored in SavedQueryConfig; it is intentionally excluded from the semantic manifest because PydanticSavedQuery (from dbt-semantic-interfaces) does not define a config field
  • This test guards against regressions where cache config might accidentally leak into the semantic manifest

Test plan

  • New test parses a saved query with default cache (enabled=False), builds semantic manifest, then re-parses with cache enabled via project config and rebuilds — asserts both outputs are identical
  • Also asserts that neither config nor cache keys appear in the serialized semantic manifest saved query dict
  • Test passes locally: pytest tests/functional/saved_queries/test_configs.py::TestSemanticManifestUnaffectedByCacheConfig -v
  • All pre-commit hooks pass (black, isort, flake8)

🤖 Generated with Claude Code

The cache.enabled field on SavedQueryConfig is a dbt-core-only concern
that is intentionally excluded from the semantic manifest. This test
verifies that the PydanticSavedQuery serialization (used by
dbt-semantic-interfaces) produces identical output regardless of
whether cache is enabled or disabled, ensuring downstream consumers
of the semantic manifest are never impacted by cache config changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@theyostalservice theyostalservice requested a review from a team as a code owner March 3, 2026 21:21
@cla-bot cla-bot bot added the cla:yes label Mar 3, 2026
@github-actions github-actions bot added the community This PR is from a community member label Mar 3, 2026
Capture the baseline cache.enabled value and explicitly assert it
flipped before comparing the semantic manifest outputs, making the
test a proper control-vs-experiment comparison.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.42%. Comparing base (b5050ea) to head (7ea0333).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12589      +/-   ##
==========================================
+ Coverage   91.40%   91.42%   +0.02%     
==========================================
  Files         203      203              
  Lines       25574    25574              
==========================================
+ Hits        23376    23382       +6     
+ Misses       2198     2192       -6     
Flag Coverage Δ
integration 88.31% <ø> (+0.09%) ⬆️
unit 65.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 65.37% <ø> (ø)
Integration Tests 88.31% <ø> (+0.09%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@theyostalservice theyostalservice marked this pull request as draft March 4, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes community This PR is from a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant