Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force free duckdb lock on test #21763

Closed
wants to merge 1 commit into from

Conversation

benpankow
Copy link
Member

@benpankow benpankow commented May 9, 2024

Summary

Attempt to fix flaky dbt-row-count tests which are failing occasionally on master. Seems like the duckdb file lock is still being held when the test starts & the main dbt streaming process hits it. Here we explicitly delete and recreate the file to ensure the lock is not held.

A little uncertain about if this is a real bug - I haven't been able to repro it with pytest or tox locally 😔

@benpankow
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @benpankow and the rest of your teammates on Graphite Graphite

shutil.copyfile(db_file_copy, db_file_abspath)


def test_row_count(test_jaffle_shop_manifest: Dict[str, Any], force_free_lock_on_db) -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably just need to monkeypatch DAGSTER_DBT_PYTEST_XDIST_DUCKDB_DBFILE_PATH in the body of this test.

@benpankow benpankow closed this May 14, 2024
benpankow added a commit that referenced this pull request May 14, 2024
…21852)

## Summary

Fix for flaky dagster-dbt test which uses a standalone duckdb file for
the row count test, to control for duckdb holding the file lock.

Replaces #21763 

## Test Plan

bk
alangenfeld pushed a commit that referenced this pull request May 15, 2024
…21852)

## Summary

Fix for flaky dagster-dbt test which uses a standalone duckdb file for
the row count test, to control for duckdb holding the file lock.

Replaces #21763 

## Test Plan

bk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants