dbt-core icon indicating copy to clipboard operation
dbt-core copied to clipboard

[CT-2636] TestVersionedModels::test_pp_versioned_models is flaky

Open MichelleArk opened this issue 2 years ago • 6 comments

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"}}

MichelleArk avatar Jun 05 '23 15:06 MichelleArk

Another example: https://github.com/dbt-labs/dbt-core/actions/runs/5293127534/jobs/9580850631?pr=7892#step:8:3783

dbeatty10 avatar Jun 20 '23 15:06 dbeatty10

An another example: https://github.com/dbt-labs/dbt-core/actions/runs/5324997604/jobs/9645095748

dbeatty10 avatar Jun 20 '23 17:06 dbeatty10

Tested with Flaky Tester and failed 3/100 runs on Python 3.8/windows

emmyoop avatar Jul 12 '23 21:07 emmyoop

The test fails in the middle. This happens when run as part of the suite or when run by itself.

emmyoop avatar Jul 17 '23 13:07 emmyoop

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

gshank avatar Jul 19 '23 14:07 gshank

Looks like this is flaking again: https://github.com/dbt-labs/dbt-core/actions/runs/8341943731/job/22829077630?pr=9769

MichelleArk avatar Mar 19 '24 16:03 MichelleArk