open-telemetry / open-telemetry/opentelemetry-python-contrib

Independent genai versioned packages are tested with monorepo dependencies

Open
#4,232 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

gen-ai
Dominant language
Python
Stars
1.1k
Forks
1.1k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

We have independent releases for some genai packages, but the tox setup in this repo still installs monorepo deps for testing. For example:

  • opentelemetry-instrumentation-google-genai depends on
    • opentelemetry-instrumentation
    • opentelemetry-util-genai

but the requirements files that tox uses installs those from the monorepo (for both oldest and latest) https://github.com/open-telemetry/opentelemetry-python-contrib/blob/a025a206da0278c39cd3a7c5014a48e129bd6827/instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/requirements.oldest.txt#L33-L37

This is problematic because those packages are not released at the same time, so the monorepo version is not available after publishing. The tests don't reflect the reality of what users see after releasing. However it's convenient for development, for example making an update to opentelemetry-util-genai and opentelemetry-instrumentation-google-genai at the same time. It also makes the release painful (see https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4230). Some possible options to fix it

  1. Strictly only test against published versions (for both oldest and latest). Never use any monorepo deps for independent versioned packages. The downside is that it's hard to develop new features in opentelemetry-util-genai without releasing it after every change.
  2. Do away with independent versioned pacakges. Go back to strict lockstep releases of contrib.
  3. Live with the testing not being accurate.
  4. Test against monorepo deps on main, but release branches (created by package-prepare-release workflow) only test against published versions. Updating the package-prepare-release workflow to do this might be a little painful, but maybe solves all of the above?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked requirements.oldest.txt entries and the .github/workflows/package-prepare-release.yml workflow, then review the release behavior described in pull request 4230. First clarify which testing policy is accepted; done means the chosen policy is reflected in tox and release-branch testing without relying on unavailable monorepo versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
build-system, ci-cd, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.