Skip to content

clean-test-containers misses leftover test-devcontainer-* image-test containers #1817

Closed

Description

@c-vigo

Description

just clean-test-containers only removes containers matching name=workspace-devcontainer, which are the ones the devcontainer fixtures create. The image-test fixture test_container (tests/conftest.py:246) names its containers test-devcontainer-<epoch>. When a test_image.py run is killed before fixture teardown, those containers are left behind and the recipe never matches them.

Steps to Reproduce

  1. Start just test-image (or uv run pytest tests/test_image.py) and kill it before teardown.
  2. podman ps -a shows an exited test-devcontainer-<epoch> container.
  3. just clean-test-containers prints [*] No lingering test containers found.

Expected Behavior

The recipe removes leftover containers from every test fixture, test-devcontainer-* included.

Actual Behavior

Four exited (137) test-devcontainer-* containers, 5 weeks to 2 months old, survived the recipe and had to be removed by hand with podman rm.

Environment

Local, rootless podman.

Possible Solution

Also collect podman ps -a --filter "name=^test-devcontainer-" in the clean-test-containers recipe (justfile).

Changelog Category

No changelog needed

Activity

  1. added
    bug
    priority:low
    effort:small
    area:testing
    semver:patch
    on Oct 5, 2026
  2. c-vigo commented on Oct 5, 2026

    @c-vigo
    ContributorAuthor

    Fixed by #1818 (merged to dev as 6ee5d27); reaches main with the next release train.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:testingbugeffort:smallpriority:lowsemver:patch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions