Skip to content

bug(tests): the unit suite creates a real agent container when a Docker daemon is reachable #4802

Backlog

Description

@pavshulin

Summary

A run of pytest unit/ on a machine where a Docker daemon is reachable leaves a real, running container agent-acme-lead behind.

Context

Found while fixing #4620.

  • Seen with pytest unit/ -n 8 --dist loadfile -p randomly on a machine with a reachable daemon: the container was created at least three times, on two different trees, one of them an unmodified dev checkout at 30ce96ecb. Removed by hand, it came back with the next run.
  • tests/unit/test_ent1030_gates.py describes this hazard next to its start_all_agents stub ("creates a real agent-acme-lead on any machine that runs this file") and closes one path to it. Another path is open. Which test reaches it has not been traced.
  • CI runners have a Docker daemon, so this probably happens there too and goes unnoticed because the runner is thrown away.
  • On a developer machine or a host with a live stack, the container lands on that daemon, and a running backend will see it as one of its agents (it carries trinity.platform=agent).

Acceptance Criteria

  • The test (or tests) that reach Docker are identified.
  • pytest unit/ creates no container, with or without a reachable daemon.
  • A guard fails the unit tier when a test reaches the real Docker client.

Activity

  1. added
    priority-p2
    type-bug
    theme-reliability
    on Nov 27, 2026
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

    priority-p2theme-reliabilitytype-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions