Repository navigation
Conversation
The two encoding tests exercise _encode_otlp_json, which imports protobuf and opentelemetry-exporter-otlp-proto-common. Both ship in the optional otel dependency group, so a default `uv sync` leaves them failing on a fresh clone. Gate them with importorskip so they skip when the extra is absent and still run when it is present, matching how the server suites skip on a missing service. Before: 8 failed, 696 passed, 3 skipped After: 6 failed, 696 passed, 5 skipped (remaining 6 are unrelated, in test_static_json_scorer.py) Signed-off-by: abhati27 <anmolvb11@gmail.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Collaborator
|
@abhati27 Whould you like to create a git issue first. |
This branch has not been deployed
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.
Description
uv run pytest src/ -k "not integration"fails on a fresh clone with two errors insrc/observability/tests/test_file_exporter.py, bothModuleNotFoundError: No module named 'google.protobuf'.Fix Details
The two encoding tests go through
_encode_otlp_json, which imports protobuf and theOTLP common trace encoder. Both come from the optional
oteldependency group, so adefault
uv syncdoesn't install them. Gated those two tests withpytest.importorskipso they skip when the extra is absent and still run when it'spresent.
test_file_exporter_creates_parent_diris left alone since it doesn't encodeanything.
This follows what INSTRUCTIONS.md already describes for the server suites, where a
missing dependency skips rather than fails.
Impact on Benchmarking
Test-only change, no scorer or runtime code touched.
Related Issues
Verification Steps
uv run pytest src/ -k "not integration"uv syncThe remaining 6 are unrelated, in
test_static_json_scorer.py, which passes anevaluation_metadata=kwarg thatevaluate_static_jsondoesn't accept.Checked both directions so the guard isn't a permanent mute:
uv sync --group otel, thenpytest src/observability/tests/test_file_exporter.py→ 3 passeduv sync, then the same → 1 passed, 2 skippeduvx ruff checkanduvx ruff format --checkclean on the changed fileChecklist
themselves, verified by running them with and without the
otelextra, as above.