Skip to content

fix: port telemetry test-order fix + broken aLora example skip to main (#1378)#1382

Queued
ajbozarth wants to merge 1 commit into
generative-computing:mainfrom
ajbozarth:fix/1378-port-telemetry-test-fixes
Queued

fix: port telemetry test-order fix + broken aLora example skip to main (#1378)#1382
ajbozarth wants to merge 1 commit into
generative-computing:mainfrom
ajbozarth:fix/1378-port-telemetry-test-fixes

Conversation

@ajbozarth

Copy link
Copy Markdown
Contributor

Issue

Port of #1378

Description

Forward-port of #1378 from release/v0.7 to main, per the release process (RELEASE.md: open a follow-up PR to main once the release-branch PR merges). Cherry-picked cleanly with no conflicts.

Two unrelated failures surface when running the full test suite with --group-by-backend (via test/scripts/run_tests_with_ollama_and_vllm.sh) with ollama and huggingface backends available. This PR addresses both.

1. Telemetry plugin re-registration (test-order state leakage)

--group-by-backend hoists the @pytest.mark.ollama tracing tests ahead of the plugin/logger tests. The tracing tests register the telemetry plugins on the process-global plugin manager and set _plugins_registered = True. The plugin/logger tests then call shutdown_plugins(), which nulls the manager — but that flag stays True, so a later reset_tracing_state()/reset_metrics_state() skips re-registration. The plugin-driven action/chat/stream_with_chunking spans are then never emitted (directly-emitted session spans still work), surfacing as "span not emitted" and, for three streaming tests using a bare next(), RuntimeError: coroutine raised StopIteration. This does not reproduce under the default collection order (GitHub CI), which runs the plugin-wipe tests before any telemetry test.

  • Reset _plugins_registered in both telemetry reset helpers so setup re-registers against the current manager.
  • Make tracing warn on duplicate registration (metrics already did); scope a filterwarnings for the expected test-provoked duplicate to the telemetry dir only.
  • Harden three stream_with_chunking span lookups to assert-on-missing instead of raising StopIteration.

2. Skip broken 101_example.py

docs/examples/aLora/101_example.py fails with AdapterSchemaMismatchError: the stembolts adapter output no longer satisfies requirement_check_to_bool's contract (tightened in #1320). The example predates the intrinsics refactor and needs rewriting to the new API, tracked in #385. Skipped until then.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code was added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

Adding a new component, requirement, sampling strategy, or tool?

  • Component
  • Requirement
  • Sampling Strategy
  • Tool

…egistration + broken aLora example) (generative-computing#1378)

* fix(telemetry): re-register plugins after manager teardown in test resets

A full-suite run via test/scripts/run_tests_with_ollama_and_vllm.sh (which
passes --group-by-backend) reorders the ollama-marked tracing tests ahead of
the plugin/logger tests. Those tests call shutdown_plugins(), which nulls the
process-global plugin manager, but the telemetry modules' `_plugins_registered`
flag stayed True — so the next reset_tracing_state()/reset_metrics_state()
skipped re-registration and the plugin-driven action/chat/stream_with_chunking
spans were never emitted.

Reset `_plugins_registered` in both telemetry reset helpers so setup
re-registers against the current manager. Make tracing warn on duplicate
registration (matching metrics), and scope a filterwarnings for the expected
test-provoked duplicate to the telemetry dir. Also harden three streaming
span lookups to assert-on-missing instead of raising StopIteration.

Assisted-by: Claude Code
Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>

* test(examples): skip broken 101_example pending aLora rewrite

101_example.py fails with AdapterSchemaMismatchError: the stembolts adapter
output no longer satisfies requirement_check_to_bool's contract (tightened in
generative-computing#1320). The example predates the intrinsics refactor and needs rewriting to
the new API, tracked in generative-computing#385. Skip until then.

Assisted-by: Claude Code
Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>

* test(telemetry): use os.path.dirname for telemetry dir path

Assisted-by: Claude Code
Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>

---------

Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
@ajbozarth ajbozarth requested a review from a team as a code owner July 13, 2026 18:14
@github-actions github-actions Bot added the bug Something isn't working label Jul 13, 2026
@ajbozarth

Copy link
Copy Markdown
Contributor Author

cc @psschwei as the reviewer of the original PR

@ajbozarth ajbozarth self-assigned this Jul 13, 2026
@ajbozarth ajbozarth added this pull request to the merge queue Jul 13, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 13, 2026
@ajbozarth ajbozarth added this pull request to the merge queue Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants