8000 [BUG] Auto-resolving an unchanged query or alert name adds a suffix · Issue #53 · dmux/minilake · GitHub
[go: up one dir, main page]

Skip to content

[BUG] Auto-resolving an unchanged query or alert name adds a suffix #53

Closed

Description

@eddiethedean

Description

An idempotent update of a saved query/alert with auto_resolve_display_name=true treats the object itself as a name collision and renames it.

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. POST /api/2.0/sql/queries with {"query":{"display_name":"unchanged name"}}; capture Q.
  2. PATCH /api/2.0/sql/queries/Q with {"query":{"display_name":"unchanged name"},"update_mask":"display_name","auto_resolve_display_name":true}.
  3. Repeat for alerts using /api/2.0/sql/alerts, the alert envelope, and the created alert ID.

Expected Behavior

Each unchanged name remains unchanged name because no other object uses it.

Actual Behavior

Both services rename the object to unchanged name (1).

Root Cause Analysis

The ordinary update collision check accepts exclude_id, but _resolve_display_name does not. Update calls that helper against the complete store, including the current object.

Impact

Repeating a logically idempotent update changes display names and creates user-visible drift.

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

Suggested Fix

Allow _resolve_display_name to exclude the current ID during update while retaining create-time collision handling.

Test Coverage Gaps

Auto-resolution tests cover conflicting creates only. Add same-name updates, repeated identical updates, and collisions with a distinct object for both services.

Severity

Low

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