Skip to content

Zombie cleanup is a no-op: shipyard.deployment-id label is never set #47

Description

@Alimedhat000

Summary

Startup reconciliation (packages/worker/src/index.ts:86) is meant to clean up orphaned build containers after a worker crash, but it can never match anything.

Evidence

  • listManaged() (packages/worker/src/infrastructure/docker/docker-runner.ts:566) only includes containers whose labels contain shipyard.deployment-id (line 575).
  • Neither caller sets that label:
    • strategies/nixpacks.ts:335 sets only shipyard.managed/type/app-id/worker-id.
    • strategies/dockerfile.ts:184 sets the same four labels, no deployment-id.

Result: listManaged() always returns [], so reconcileStartup() never cleans up orphaned build containers after a worker restart.

Fix

Set "shipyard.deployment-id": deploymentId in the labels passed to runLongLived() in both strategies. Smallest fix in the codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageMaintainer needs to evaluate the issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions