You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(tests): isolate DuckLake extension caches per worker - #6193
Concurrent pytest workers can install DuckLake into the same default DuckDB extension cache and interfere with each other. Give each worker a cache under its pytest base temp directory, use it for the three DuckLake adapter tests, and verify both the configured directory and the installed extension path.
Extracted from #6173 so this test repair can land independently. The patch contains no provider or cancellation changes.
Test Plan
All four DuckLake cases passed serially and with two pytest workers.
The complete DuckDB adapter module passed all 16 tests.
make style passed. The initial run found the declared httpx2 dependency missing; installing it in the private venv resolved the failure.
All six make fast-test phases passed (3,010 passed, 13 skipped), with automatic worker count limited to two.
Checklist
I have run make style and fixed any issues
I have added tests for my changes (if applicable)
All existing tests pass (make fast-test)
My commits are signed off (git commit -s) per the DCO
Summary by CodeRabbit
Tests
Expanded automated coverage for DuckLake extension installation and catalog behavior, including checks for worker-specific extension paths and existing partitioning and cascade-drop scenarios. These changes affect test coverage only; no end-user functionality changes are noted.
No actionable comments were generated in the recent review.
Walkthrough
DuckLake tests now use a fixture that installs and loads the extension in a directory under the pytest worker’s temporary directory. A new test checks the configured directory and DuckLake’s install path.
The fixture configures an extension directory under the worker’s temporary directory, installs and loads DuckLake, and provides the connection. A test checks the directory and install path. Partitioning and cascade-drop tests now use the fixture instead of installing the extension themselves.
SQLMesh/sqlmesh issue 6182 describes concurrent DuckLake extension installs failing under pytest-xdist. This change configures the extension directory under the worker’s temporary directory.
Possibly related PRs
SQLMesh/sqlmesh#6184: Both PRs change setup for the DuckLake tests to address concurrent extension installation, using different approaches.
SQLMesh/sqlmesh#6183: Both PRs address the concurrent installation issue in the same tests, using different approaches.
Suggested reviewers:kingjaiteh, stuffbyyuki
Merge Risk: Minimal · up to 50b6c
This change only affects test setup. Each test worker now installs DuckLake into its own temporary directory, which avoids cache collisions between parallel workers. Offline local runs that depended on a preinstalled DuckLake may now fail, but CI is unaffected. No merge-blocking risk remains.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title names the main change: per-worker DuckLake extension caches for the test suite. The raw summary confirms the fixture sets a worker-specific extension directory under pytest's base temp direc…
Description check
The description states the problem (concurrent pytest workers sharing the default DuckDB extension cache), the fix (a per-worker cache under the pytest base temp directory for the three DuckLake adapt…
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: per-worker DuckLake extension caches for the test suite. The raw summary confirms the fixture sets a worker-specific extension directory under pytest's base temp directory, and the PR objectives describe the same change. The title is specific and accurate.
Full details: Description check
Explanation
The description states the problem (concurrent pytest workers sharing the default DuckDB extension cache), the fix (a per-worker cache under the pytest base temp directory for the three DuckLake adapter tests), and verification (configured directory and installed extension path). The Test Plan lists the commands run and their results. The Checklist follows the template and is marked complete. The description does not mention the new test explicitly beyond the verification sentence, but it covers the required sections and the key information.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 64d99249-561c-47bc-a672-e5c1cac2fc96
Commits
Reviewing files that changed from the base of the PR and between c4dbac4 and 50b6cf2.
Files selected for processing: 1
tests/core/engine_adapter/test_duckdb.py
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Concurrent pytest workers can install DuckLake into the same default DuckDB extension cache and interfere with each other. Give each worker a cache under its pytest base temp directory, use it for the three DuckLake adapter tests, and verify both the configured directory and the installed extension path.
Extracted from #6173 so this test repair can land independently. The patch contains no provider or cancellation changes.
Test Plan
make stylepassed. The initial run found the declaredhttpx2dependency missing; installing it in the private venv resolved the failure.make fast-testphases passed (3,010 passed, 13 skipped), with automatic worker count limited to two.Checklist
make styleand fixed any issuesmake fast-test)git commit -s) per the DCOSummary by CodeRabbit