Skip to content

fix(telemetry): no devops-otel exporter thread outlives its test, so no later test fails on a connection to port 4318 #2277

Closed

Description

@dan-petty

Problem Description

A test fails at teardown with "network edge reached without a fake", because a devops-otel exporter thread connects to the loopback OpenTelemetry port 4318. The test that fails is never the test that started the thread. The same failure was the subject of #2273. Pull request #2274 closed #2273, and the failure still happens after that pull request is in main.

Two runs show it after #2274:

Run Commit Failed test at teardown
main push, run 40256857274 the merge commit of #2274 tests/test_finding_repetition_compression.py::test_finding_collapses_consecutive_duplicate_lines
pull request #2275, run 40260962194, based on a main that holds #2274 a branch that changes no telemetry code tests/test_finding_repetition_compression.py::test_finding_collapses_consecutive_duplicate_lines and tests/test_fastmcp_in_process.py::test_mcp_tool_stops_at_timeout_when_command_never_returns

The Tests & Coverage check is required, so each failure blocks a merge. The failure is intermittent: the next main push, run 40259326441, passed.

Reproduction Steps

  1. Run the full test suite with uv run devops ci test on a loaded host, or push a branch and let the Tests & Coverage check run.
  2. Read the teardown errors of the run.

Expected vs Actual Behavior

Environment Diagnostics

Notes

The cause is not found yet. #2274 changed src/devops_cli/telemetry/tracer.py and src/devops_cli/telemetry/logging_bridge.py to wait for the executor threads on shutdown. Find which client or exporter is still alive when the test ends, for example one that no reset reaches, and fix it there. Do not add the port to a list of allowed connections: the floor is right to refuse it.

Source: https://github.com/dan-petty/devops-cli/actions/runs/40260962194

regression of #2273

Activity

  1. added
    source/agent
    type/bug
    on Oct 26, 2026
  2. dan-petty commented on Oct 26, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/bug. The candidate fixes a bug in telemetry thread management during test teardown.
    • Priority: P1-High. The issue blocks merges and causes intermittent test failures that affect CI stability.
    • Value: High. Fixing the thread lifecycle prevents test failures and improves CI reliability for all developers.
    • Effort: Medium. The fix requires identifying which exporter thread is not shutting down properly and ensuring it waits during client shutdown.
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

    source/agenttype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions