Skip to content

bug: Race condition in Docker manager GetDeployment #61

@nfebe

Description

@nfebe

Problem

internal/docker/manager.go (lines 58-72) releases the read lock after GetDeployment but before populateContainerInfo. Container state can change between lock release and the subsequent read, returning stale or inconsistent data.

Impact

Intermittent stale container status, especially under concurrent API requests or rapid container state changes (start/stop/restart).

Proposed Fix

Hold the lock through the entire read-populate cycle, or use a snapshot/copy pattern so the returned data is consistent even if the underlying state changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions