Skip to content

delete_warehouse_snapshot is a return True stub — pretends to delete, does nothing #383

@sdebruyn

Description

@sdebruyn

Summary

FabricAdapter.delete_warehouse_snapshot(snapshot_id) is a stub that returns True without making any REST call. Users who think they are cleaning up old warehouse snapshots are accumulating them indefinitely on their Fabric capacity.

Evidence (HEAD 0de2190, v1.10.0)

dbt/adapters/fabric/warehouse_snapshots.py#L307-L309:

def delete_warehouse_snapshot(self, snapshot_id):
    # TODO: implement
    return True

(The comment may vary slightly, but the method body is a constant True return.)

User impact

  • Warehouse snapshots that the user explicitly requested to delete are never deleted.
  • Capacity consumption keeps growing.
  • dbt reports the delete as successful, so there is no diagnostic signal that anything is wrong.
  • This is a silent-failure mode: the operation succeeds from dbt's view, but the platform state diverges from the user's expectation.

Suggested fix

Implement the actual DELETE against the Fabric REST API. This should be addressed together with #372 (moving the warehouse-snapshot lifecycle off atexit and onto Jinja macros / on-run-end), since both touch the same surface.

Reference implementation in the fork: commit 412b4732.

Happy to open a PR alongside if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions