fix: port telemetry test-order fix + broken aLora example skip to main (#1378)#1382
Queued
ajbozarth wants to merge 1 commit into
Queued
fix: port telemetry test-order fix + broken aLora example skip to main (#1378)#1382ajbozarth wants to merge 1 commit into
ajbozarth wants to merge 1 commit into
Conversation
…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>
Contributor
Author
|
cc @psschwei as the reviewer of the original PR |
psschwei
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Port of #1378
Description
Forward-port of #1378 from
release/v0.7tomain, per the release process (RELEASE.md: open a follow-up PR tomainonce 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(viatest/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-backendhoists the@pytest.mark.ollamatracing 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 callshutdown_plugins(), which nulls the manager — but that flag staysTrue, so a laterreset_tracing_state()/reset_metrics_state()skips re-registration. The plugin-drivenaction/chat/stream_with_chunkingspans are then never emitted (directly-emittedsessionspans still work), surfacing as "span not emitted" and, for three streaming tests using a barenext(),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._plugins_registeredin both telemetry reset helpers so setup re-registers against the current manager.tracingwarn on duplicate registration (metrics already did); scope afilterwarningsfor the expected test-provoked duplicate to the telemetry dir only.stream_with_chunkingspan lookups to assert-on-missing instead of raisingStopIteration.2. Skip broken
101_example.pydocs/examples/aLora/101_example.pyfails withAdapterSchemaMismatchError: thestemboltsadapter output no longer satisfiesrequirement_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
Attribution
Adding a new component, requirement, sampling strategy, or tool?