Repository navigation
test: check that a non-leader unit sends trace data - #2922
tonyandrewmeyer wants to merge 5 commits into
Conversation
Deploy the traced charm with two units in test_direct_connection and wait for spans from both. Every tracing integration test previously ran a single unit, so nothing exercised a follower against a real provider, and only the leader can read its own application databag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code review: canonical/operator PR #2922Reviewed revision: 1. Verdict: APPROVENo blocking or non-blocking code changes are requested. The new wait condition checks the unit identities carried by spans, rather than merely counting spans, so the test will continue polling until it sees both the leader and follower or the existing bounded wait expires. The PR notes that this exercises the follower's normal tracing path but does not directly reproduce #2918; that is an explicit coverage tradeoff, not a defect in the stated test purpose. 2. Blocking Issues (Must Fix)None found. 3. Non-Blocking Suggestions & NitpicksNo optional code changes suggested. Coverage caveat: The existing integration workflow runs this test on its Kubernetes matrix, but 4. Downstream & Ecosystem ConsiderationsNo production API, runtime behavior, packaging, or downstream charm contract changes. This adds integration coverage using Juju and Tempo. Its execution remains subject to the existing manual/scheduled integration-test coverage noted above. Review evidence and caveats
|
Deploys the traced charm with two units in
test_direct_connectionand waits for spans from both, because every tracing integration test ran a single unit, so nothing exercised a follower against a real provider. Only the leader can read its own application databag, which is where #2918's bug came from.This doesn't reproduce #2918 itself (Tempo always offers
otlp_httponce it sees our request), but it would catch a follower failing on the normal path.get_spansnow keeps each span's resource so the test can tell which unit sent it.I ran
test_direct_connectionin a VM with Juju 3.6.29 on K8s (set up withconcierge prepare -p k8s) and it passed, with spans from bothtest-tracing/0andtest-tracing/1, so the resource attribute parsing works against a real Tempo.