Skip to content

test(agent-observability): pin OTel semconv schema URL to v1.41.0 raw GitHub path#774

Merged
liustve merged 1 commit into
mainfrom
di/conftest-pin-semconv-schema
Jun 15, 2026
Merged

test(agent-observability): pin OTel semconv schema URL to v1.41.0 raw GitHub path#774
liustve merged 1 commit into
mainfrom
di/conftest-pin-semconv-schema

Conversation

@liustve

@liustve liustve commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Conftest pins raw GitHub path so schema-validation tests are stable when the docs site drifts.

The conftest fetches the semconv schema for jsonschema validation.
Using the docs site URL means schema-validation tests break whenever
the docs site drifts. Pin to v1.41.0 raw GitHub path so the schema is
stable across runs.
@liustve liustve requested a review from a team as a code owner June 15, 2026 05:28
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Claude finished @liustve's task in 1m 39s —— View job


Review

Reviewed the diff for PR #774.

  • Read prior reviews (none — first pass)
  • Read PR diff (conftest.py, +4 / −1)
  • Verify usage of _OTEL_SCHEMA_BASE
  • Post review

Findings: none — no new substantive issues.

Notes (non-blocking, FYI only):

  • The change is well-scoped: pins _OTEL_SCHEMA_BASE to a tagged version (v1.41.0) of the upstream semantic-conventions repo via raw.githubusercontent.com, and the version is extracted to a named constant (_OTEL_SEMCONV_VERSION) so future bumps are a one-line edit. Good.
  • validate_otel_genai_schema is consumed by langchain, llama_index, and crewai instrumentor tests for the three schemas (gen-ai-input-messages, gen-ai-output-messages, gen-ai-system-instructions). All three exist under docs/gen-ai/ in the upstream repo at v1.41.0, so the URL substitution should resolve cleanly. The existing _SCHEMA_CACHE keeps repeated calls within a test run cheap.
  • The previous URL (https://opentelemetry.io/docs/specs/semconv) is the rendered docs site, not a raw schema host — the pinned raw GitHub URL is the right base for urllib.request.urlopen + json.loads. This likely also fixes silent test failures if the docs site path was returning HTML.
  • Tests still require network access on first call (unchanged behavior). Out of scope for this PR, but if flakiness from rate-limited or unreachable raw.githubusercontent becomes an issue, vendoring the three small schema JSONs into the repo is a natural follow-up.

LGTM.
• Branch: di/conftest-pin-semconv-schema

@liustve liustve added the skip changelog doesn't need a CHANGELOG entry label Jun 15, 2026
@liustve liustve changed the title test: pin OTel semconv schema URL to v1.41.0 raw GitHub path test(agent-observability): pin OTel semconv schema URL to v1.41.0 raw GitHub path Jun 15, 2026
@liustve liustve enabled auto-merge (squash) June 15, 2026 16:42
@liustve liustve merged commit 0a8b9a1 into main Jun 15, 2026
31 of 33 checks passed
@liustve liustve deleted the di/conftest-pin-semconv-schema branch June 15, 2026 16:42
liustve added a commit to aws-observability/aws-otel-js-instrumentation that referenced this pull request Jun 15, 2026
## Summary

- Pin OTel semconv schema URL to `v1.41.0` raw GitHub path so
schema-validation tests are stable when the docs site drifts.
- Mirrors python-side fix in
aws-observability/aws-otel-python-instrumentation#774. `main` build is
currently failing with 38 GenAI tests hitting 404s on
`https://opentelemetry.io/docs/specs/semconv/gen-ai/*.json`; pinning to
the raw GitHub URL resolves them.

## Test plan

- [ ] Existing schema-validation tests still pass against the pinned URL
jj22ee pushed a commit to aws-observability/aws-otel-js-instrumentation that referenced this pull request Jun 16, 2026
## Summary

- Pin OTel semconv schema URL to `v1.41.0` raw GitHub path so
schema-validation tests are stable when the docs site drifts.
- Mirrors python-side fix in
aws-observability/aws-otel-python-instrumentation#774. `main` build is
currently failing with 38 GenAI tests hitting 404s on
`https://opentelemetry.io/docs/specs/semconv/gen-ai/*.json`; pinning to
the raw GitHub URL resolves them.

## Test plan

- [ ] Existing schema-validation tests still pass against the pinned URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog doesn't need a CHANGELOG entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants