Skip to content

When a pipeline step is manually stopped, not all containers are stopped and removed #517

@LiamTodd

Description

@LiamTodd

I have run into an issue where if a pipeline step using this plugin is manually stopped, only the container in which the commands are being run from is stopped.

When a build or step is manually cancelled, it triggers the ensure_stopped function in run.sh, which only stops and removes the container by the name of $(docker_compose_project_name)_${run_service}_build_${BUILDKITE_BUILD_NUMBER} instead of all containers defined in the docker-compose file. It also prevents the pre-exit hook from running, which would actually stop and remove all the containers.

As a workaround I've defined an agent-level post-checkout hook which updates run.sh to execute the pre-exit hook . Unsure of what the ideal solution here is though, but I believe it should be addressed as in my case it resulted in RAM and disc space being consumed indefinitely after each manually cancelled build, degrading performance over time.

Many thanks 😄

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