Skip to content

Add CI check for breaking changes to util-genai public API - #841

Open
lmolkova wants to merge 3 commits into
open-telemetry:mainfrom
lmolkova:util-api-break-check
Open

lmolkova wants to merge 3 commits into
open-telemetry:mainfrom
lmolkova:util-api-break-check

Conversation

@lmolkova

@lmolkova lmolkova commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Adds a check-util-api CI job. It runs griffe check on util-genai against main and fails if a public object is removed or its signature changes. It mirrors public-symbols-check in opentelemetry-python core, and the Approve Public API check label skips it.

Released instrumentations accept any util version below 2. #823 removes get_telemetry_handler, which langchain 1.0b0, 1.1b0, 1.1b1 and openai-agents 1.0b0, 1.1b0 import at module level. With the next util release they would fail on import. This job catches that kind of break.

Known gaps:

  • The Approve Public API check label doesn't exist in this repo yet.
  • It checks signatures, not behavior.
  • griffe reports breaks that already shipped between util 1.0b0/1.1b0 and 1.2b0, for example AgentInvocation.agent_id moved to the remote agent subclass. I haven't checked yet whether they affect old releases.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-10-04 17:34 UTC

Investigate required status check failures.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Should this be with reviewers? Comment /dashboard route:reviewers to route it to them.
  • Anything wrong — including the routing? Report it with what you expected; it helps us improve the dashboard.

@lmolkova lmolkova added the Skip Changelog PR does not require a changelog entry label Oct 2, 2026
@lmolkova lmolkova mentioned this pull request Oct 2, 2026
5 of 9 tasks
@lmolkova
lmolkova marked this pull request as ready for review October 3, 2026 00:25
@lmolkova
lmolkova requested a review from a team as a code owner October 3, 2026 00:25
Copilot AI balanced review requested due to automatic review settings October 3, 2026 00:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The hardcoded main baseline causes false failures for PRs targeting release branches.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds automated compatibility checking for the util-genai public API.

Changes:

  • Adds a pinned Griffe dependency and tox environment.
  • Runs the API check in CI with a maintainer-label bypass.
  • Documents the workflow for contributors and reviewers.
File Description
tox.ini Defines the Griffe API check.
dev-requirements.txt Pins Griffe 2.3.0.
AGENTS.md Documents local API compatibility checks.
.github/​workflows/​misc.yml Adds the CI job.
.github/​instructions/​util-genai.instructions.md Adds review guidance for API changes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tox.ini Outdated
-c {toxinidir}/dev-requirements.txt
griffe
commands =
griffe check opentelemetry.util.genai -s util/opentelemetry-util-genai/src -a origin/main

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PR does not require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants