8000 [BUG] DBFS and Files reject every path with a relative data directory · Issue #43 · dmux/minilake · GitHub
[go: up one dir, main page]

Skip to content

[BUG] DBFS and Files reject every path with a relative data directory #43

Closed

Description

@eddiethedean

Description

The default ./data configuration makes DBFS and Files operations fail with Invalid path, including ordinary uploads. Workspace operations use a different, correct root resolution.

Reproduced on MiniLake 1.9.0, commit fe8837dcfac9df621dfabc440abc07ebb4cdbcbb, using the repository's Docker test image, a real HTTP server, and fresh disposable state. Image Python sources were verified byte-for-byte against this commit. No mocks or production data were used.

Affected Components

Steps to Reproduce

Use a disposable instance and data directory. Paths below are relative to its HTTP base URL; bodies are JSON unless explicitly described as raw bytes. IDs shown as W/J/R/Q/C/HANDLE are replaced with the IDs returned by prior calls.

  1. In a fresh writable working directory, run minilake with MINILAKE_DATA_DIR=data (equivalent to the default relative directory).
  2. POST /api/2.0/dbfs/put with {"path":"/hello","contents":"aGk="}.
  3. PUT raw bytes hi to /api/2.0/fs/files/hello.
  4. Repeat using an absolute data directory as a control.

Expected Behavior

Both uploads work under either a relative or absolute configured root, while traversal outside that root remains rejected.

Actual Behavior

Both relative-root requests return HTTP 400, {"error_code":"INVALID_REQUEST","message":"Invalid path"}.

Root Cause Analysis

The candidate path is converted to an absolute resolved Path, but the root remains relative. Comparing an absolute path/parents to the relative root always fails containment.

Impact

The documented plain-install default breaks core file workflows. Docker defaults to /data and masks the problem.

Severity is assessed within MiniLake's documented local development/CI use; it does not assume a shared production Databricks deployment.

Suggested Fix

Resolve the root once before joining and comparing, as workspace._resolve already does. Test relative, absolute and symlinked roots while preserving traversal checks.

Test Coverage Gaps

DBFS/Files tests run with absolute /data; configuration tests do not combine the default data directory with real HTTP file operations.

Severity

Medium

Confidence

High — reproduced through the real HTTP API and traced to the source paths above.

Recommended Labels

bug

Existing Issue Matches

No reasonable duplicate found. Reviewed all open and closed issues and open pull requests in dmux/minilake, then searched component/function/symptom terms for this finding. The only open PR at review time, #29, changes the virtualenv lock entry and does not address this defect. The documented intentional limitations were checked before reporting.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0