8000 [BUG] Persisted jobs and runs become inaccessible after restart · Issue #36 · dmux/minilake · GitHub
[go: up one dir, main page]

Skip to content

[BUG] Persisted jobs and runs become inaccessible after restart #36

Closed

Description

@eddiethedean

Description

With persistence enabled, jobs remain visible in list responses after restart but get/run/update operations return NOT_FOUND for their advertised numeric IDs.

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. Start with MINILAKE_PERSIST=1 and a fresh absolute data directory.
  2. POST /api/2.2/jobs/create with {"name":"persisted"}; capture numeric job ID J.
  3. POST /api/2.2/jobs/run-now with {"job_id":J}; capture run ID R and wait for TERMINATED.
  4. Gracefully stop/restart against the same directory.
  5. GET /api/2.2/jobs/list, /api/2.2/jobs/get?job_id=J, and /api/2.2/jobs/runs/get?run_id=R.

Expected Behavior

IDs returned before restart and in listings continue to address the same jobs and completed runs.

Actual Behavior

The list includes job 1, but get-job and get-run both return 404 (Job 1 not found / Run 1 not found).

Root Cause Analysis

JSON converts integer dictionary keys to strings. restore_state blindly updates jobs/runs/task_outputs; API lookups still use integers. The same conversion affects persisted task-output lookup.

Impact

Every persisted job definition becomes unusable through normal ID-based operations after restart. Completed run history cannot be retrieved by ID, undermining the documented persistence guarantee.

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

Suggested Fix

Normalize numeric-keyed registries during restore or use a consistent string key representation throughout the service. Verify submit-token mappings still resolve to restored runs.

Test Coverage Gaps

The only process-restart persistence test creates a catalog, not jobs/runs. Add a completed SQL job, restart, and exercise list/get/run-now/update/output with the original IDs.

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.

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