Skip to content

Remote test artifacts accumulate without cleanup #247

@sdebruyn

Description

@sdebruyn

Problem

When using --remote for Spark test execution, each run creates a directory under dbt-remote-runs/artifacts/{run_id}/ on the lakehouse. These are never cleaned up automatically, so storage usage grows unbounded over time.

Proposed solution

Add a cleanup mechanism — either:

  1. A --remote-cleanup flag that prunes artifacts older than N days
  2. Automatic cleanup at the start of each run (delete artifacts older than 7 days)
  3. A separate maintenance script

Context

This was identified during code review of PR #208. The current design correctly isolates artifacts per run for concurrency safety, but has no garbage collection.

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