Repository navigation
Fix/local store path ci baseline - #1707
Open
godara-alt wants to merge 4 commits into
Open
godara-alt wants to merge 4 commits into
godara-alt wants to merge 4 commits into
Conversation
Resolve local storage path confinement conflicts, keeping the strict URI/home-prefix rejection and OS-native commonpath checks, Windows test assertions, and upstream changes.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fix cross-platform file-store path handling and path confinement compatibility issues affecting Windows, Linux, and older
fsspecversions.The changes preserve path security checks while ensuring consistent behavior across supported environments.
Root Cause
Local file-store path validation relied on POSIX-style path comparisons and
fsspecprotocol normalization behavior that differed across operating systems and dependency versions.This caused failures on Windows and with older
fsspecversions.Changes
Normalize local file-store paths using OS-native absolute-path and case handling.
Use
os.path.commonpath()to validate path containment, including paths on different Windows drives.Reject unsupported
file:,local:, and~path prefixes beforefsspeccan interpret them differently.Add regression coverage for relative paths returned by older
fsspecversions.Update Windows-specific download tests to handle invalid filesystem paths.
Preserve upstream changes while resolving merge conflicts.
Testing and Verification
Latest commit:
54d220df5dc39315f464a1f47b57fe68c355a86eThe branch has been synchronized with the latest upstream
Check | Result -- | -- Lint and formatting | Passed Linux unit tests | Passed Windows unit tests (Python 3.10, 3.14, 3.15) | Passed MySQL integration tests (6 configurations) | Passed Minimum dependency versions (Python 3.10) | Passedmaster, and all merge conflicts have been resolved.Final Result: All 12 GitHub Actions test and lint jobs passed, with zero failures and zero pending checks.
The additional vulnerability-analysis check completed with a neutral result.
GitHub confirms the PR is conflict-free (
mergeable: true).Scope
The final changes are limited to:
src/datajoint/storage.pytests/unit/test_path_confinement.pyThe codespell configuration adjustment is already included upstream and is no longer part of this PR's effective diff.
No new dependencies were introduced, and no tests were disabled.
This fix is independent of the staged-insert and blob-decoding issues and can be reviewed separately.