Skip to content

Fix/local store path ci baseline - #1707

Open
godara-alt wants to merge 4 commits into
datajoint:masterfrom
godara-alt:fix/local-store-path-ci-baseline
Open

godara-alt wants to merge 4 commits into
datajoint:masterfrom
godara-alt:fix/local-store-path-ci-baseline

Conversation

@godara-alt

@godara-alt godara-alt commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix cross-platform file-store path handling and path confinement compatibility issues affecting Windows, Linux, and older fsspec versions.

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 fsspec protocol normalization behavior that differed across operating systems and dependency versions.

This caused failures on Windows and with older fsspec versions.

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 before fsspec can interpret them differently.

  • Add regression coverage for relative paths returned by older fsspec versions.

  • Update Windows-specific download tests to handle invalid filesystem paths.

  • Preserve upstream changes while resolving merge conflicts.

Testing and Verification

Latest commit: 54d220df5dc39315f464a1f47b57fe68c355a86e

The branch has been synchronized with the latest upstream master, and all merge conflicts have been resolved.

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) | Passed

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.py

  • tests/unit/test_path_confinement.py

The 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.

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

No deployments
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.

1 participant