8000 [BUG] Files API stores volume content outside the Unity Catalog volume directory · Issue #38 · dmux/minilake · GitHub
[go: up one dir, main page]

Skip to content

[BUG] Files API stores volume content outside the Unity Catalog volume directory #38

Closed

Description

@eddiethedean

Description

Files uploaded under /Volumes/catalog/schema/volume/... are written under the generic DBFS tree, whereas UC volume create/delete operate on a different directory. Deleting a managed volume leaves its API-uploaded files accessible.

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. Create catalog namespace, then POST /api/2.1/unity-catalog/volumes with {"catalog_name":"namespace","schema_name":"default","name":"v","volume_type":"MANAGED"}.
  2. PUT raw bytes old volume bytes to /api/2.0/fs/files/Volumes/namespace/default/v/payload.txt.
  3. DELETE /api/2.1/unity-catalog/volumes/namespace.default.v.
  4. GET the exact Files API path from step 2; optionally recreate the same UC volume and read it again.
  5. Inspect the data directory: bytes reside at dbfs/Volumes/namespace/default/v/payload.txt, while UC uses volumes/namespace/default/v.

Expected Behavior

Volume URIs resolve to the actual registered volume storage, and deletion of that managed volume makes its content unavailable through Files/DBFS.

Actual Behavior

Volume deletion succeeds, but GET still returns HTTP 200 and old volume bytes. The actual UC volume directory is removed while the uploaded bytes remain elsewhere.

Root Cause Analysis

Files and DBFS treat the Volumes prefix as a literal subdirectory of data_dir/dbfs; Unity Catalog manages data_dir/volumes. No shared resolver connects the namespaces.

Impact

Cleanup reports success while content survives and reappears under recreated names. Jobs/consumers using the actual volume directory see different files from API users.

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

Suggested Fix

Introduce one volume-aware resolver shared by Files, DBFS and Unity Catalog. Resolve registered MANAGED/EXTERNAL volume storage consistently and enforce lifecycle checks.

Test Coverage Gaps

Files tests and volume CRUD tests run separately. Add create-volume/upload/read/delete/recreate flows, plus cross-API visibility and nonexistent-volume paths.

Severity

High

Confidence

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

Recommended Labels

bug, high-priority

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.

API Reference

Files API documentation defines /Volumes/<catalog>/<schema>/<volume>/<path> as a volume URI.

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