Skip to content

fix(containers): tolerate OTel bootstrap conflicts when backfilling old releases#6063

Merged
cdoern merged 1 commit into
ogx-ai:mainfrom
cdoern:fix/image-otel-bootstrap-besteffort
Jun 8, 2026
Merged

fix(containers): tolerate OTel bootstrap conflicts when backfilling old releases#6063
cdoern merged 1 commit into
ogx-ai:mainfrom
cdoern:fix/image-otel-bootstrap-besteffort

Conversation

@cdoern

@cdoern cdoern commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

What

Adds an OTEL_BEST_EFFORT build arg. When set to 1, a failure of opentelemetry-bootstrap -a install is logged and tolerated instead of failing the image build. The base opentelemetry-distro/opentelemetry-exporter-otlp install remains required either way.

The publish workflow sets OTEL_BEST_EFFORT=1 only when bundling a non-ogx package (a pre-rename backfill, e.g. llama-stack). ogx release images keep the strict behavior.

Why

opentelemetry-bootstrap -a install auto-selects the latest per-library instrumentation packages. When backfilling an older release, those conflict with the release's pinned deps and the build fails:

RuntimeError: Dependency conflict found: opentelemetry-instrumentation-openai-v2 2.4b0
  requires opentelemetry-util-genai>=0.4b0.dev, but you have opentelemetry-util-genai 0.2b0
ERROR: ... "opentelemetry-bootstrap -a install" ... exit code: 1

Hit while backfilling llama-stack 0.5.2 images. The per-library bootstrap is inherently best-effort; the core OTel exporter/distro (the part needed for OTLP export) still installs.

Effect

  • ogx release builds: unchanged — bootstrap stays strict (fatal on conflict).
  • Pre-rename backfills (package_name != ogx): if the latest auto-instrumentation packages can't be installed cleanly, the image is built without that per-library auto-instrumentation, but with the base OTel exporter/distro intact. OTEL_*-triggered opentelemetry-instrument still works; some library-specific spans may be missing.

Test plan

  • pypi.yml validated as YAML.
  • Verified derivation (ogx → strict, llama-stack → best-effort) and the bootstrap-failure branch logic.

🤖 Generated with Claude Code


Open in Devin Review

opentelemetry-bootstrap -a install selects the latest per-library
instrumentation packages. When backfilling an older release, those
latest packages conflict with the release's pinned dependencies and the
build fails, e.g.:

    RuntimeError: Dependency conflict found:
    opentelemetry-instrumentation-openai-v2 2.4b0 requires
    opentelemetry-util-genai>=0.4b0.dev, but you have 0.2b0

The base opentelemetry-distro/exporter install is still required, but the
per-library bootstrap is inherently best-effort. Add an OTEL_BEST_EFFORT
build arg: when set to 1, a bootstrap failure is logged and tolerated;
otherwise it remains fatal.

The publish workflow sets OTEL_BEST_EFFORT=1 only when bundling a
non-ogx package (a pre-rename backfill), so ogx release images keep the
strict behavior.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Charlie Doern <cdoern@redhat.com>

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@cdoern cdoern merged commit dd8ef2b into ogx-ai:main Jun 8, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants