Skip to content

Commit 683133a

Browse files
Chore: Fix flaky test by unliking dbt msgpack for deterministic behaviour (#5479)
1 parent 93c7a10 commit 683133a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/dbt/cli/test_run.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ def test_run_with_changes_and_full_refresh(
6565
"select a, b, 'changed' as c from {{ ref('model_a') }}"
6666
)
6767

68+
# Clear dbt's partial parse cache to ensure file changes are detected
69+
# Without it dbt may use stale cached model definitions, causing flakiness
70+
partial_parse_file = project_path / "target" / "sqlmesh_partial_parse.msgpack"
71+
if partial_parse_file.exists():
72+
partial_parse_file.unlink()
73+
6874
# run with --full-refresh. this should:
6975
# - fully refresh model_a (pick up the new records from external_table)
7076
# - deploy the local change to model_b (introducing the 'changed' column)

0 commit comments

Comments
 (0)