From e2ab1c59c2aff252735fde2b4b2bc27180eddbf8 Mon Sep 17 00:00:00 2001 From: Themis Valtinos <73662635+themisvaltinos@users.noreply.github.com> Date: Fri, 3 Oct 2025 16:43:17 +0300 Subject: [PATCH] Chore: Fix flaky test by unliking dbt msgpack for deterministic behaviour --- tests/dbt/cli/test_run.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/dbt/cli/test_run.py b/tests/dbt/cli/test_run.py index 7aeb8dd4d7..755553bb57 100644 --- a/tests/dbt/cli/test_run.py +++ b/tests/dbt/cli/test_run.py @@ -65,6 +65,12 @@ def test_run_with_changes_and_full_refresh( "select a, b, 'changed' as c from {{ ref('model_a') }}" ) + # Clear dbt's partial parse cache to ensure file changes are detected + # Without it dbt may use stale cached model definitions, causing flakiness + partial_parse_file = project_path / "target" / "sqlmesh_partial_parse.msgpack" + if partial_parse_file.exists(): + partial_parse_file.unlink() + # run with --full-refresh. this should: # - fully refresh model_a (pick up the new records from external_table) # - deploy the local change to model_b (introducing the 'changed' column)