[CT-2636] TestVersionedModels::test_pp_versioned_models is flaky
Example failing test run: https://github.com/dbt-labs/dbt-core/actions/runs/5178505585/jobs/9330058721?pr=7768
Relevant Logs:
# update versions schema.yml block - latest_version from 2 to 1
write_file(
models_versions_updated_schema_yml, project.project_root, "models", "schema.yml"
)
> results, log_output = run_dbt_and_capture(
["--partial-parse", "--log-format", "json", "run"]
)
D:\a\dbt-core\dbt-core\tests\functional\partial_parsing\test_partial_parsing.py:341:
if expect_pass is not None:
> assert res.success == expect_pass, "dbt exit state did not match expected"
E AssertionError: dbt exit state did not match expected
d:\a\dbt-core\dbt-core\core\dbt\tests\util.py:105: AssertionError
stdout_log: {"data": {"msg": " relation \"test16859771223328142563_test_partial_parsing.model_one_downstream\" does not exist"}, "info": {"category": "", "code": "Z029", "extra": {}, "invocation_id": "9e30ed11-b91f-4609-8dd0-a82ab93b96ba", "level": "error", "msg": " relation \"test16859771223328142563_test_partial_parsing.model_one_downstream\" does not exist", "name": "AfterFirstRunResultError", "pid": 6128, "thread": "MainThread", "ts": "2023-06-05T14:58:50.611377Z"}}
Another example: https://github.com/dbt-labs/dbt-core/actions/runs/5293127534/jobs/9580850631?pr=7892#step:8:3783
An another example: https://github.com/dbt-labs/dbt-core/actions/runs/5324997604/jobs/9645095748
Tested with Flaky Tester and failed 3/100 runs on Python 3.8/windows
The test fails in the middle. This happens when run as part of the suite or when run by itself.
In the test run that I looked at the sequence of events is:
- create view ...model_one_downstream__dbt_tmp
- rename model_one_downstream to model_one_downstream__dbt_backup
- fails with "model_one_downstream" does not exist
Looks like this is flaking again: https://github.com/dbt-labs/dbt-core/actions/runs/8341943731/job/22829077630?pr=9769