Skip to content

fix(examples): align otel-collector builder-config with v0.151.0 release line#2420

Open
hitkall wants to merge 1 commit into
open-telemetry:mainfrom
hitkall:fix/2264-otel-collector-builder-versions
Open

fix(examples): align otel-collector builder-config with v0.151.0 release line#2420
hitkall wants to merge 1 commit into
open-telemetry:mainfrom
hitkall:fix/2264-otel-collector-builder-versions

Conversation

@hitkall

@hitkall hitkall commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

The examples/otel-collector example fails to build because the component versions in examples/otel-collector/builder-config.yaml have drifted out of sync with the Collector release line OBI itself depends on. The config pinned components to the v0.145.0 / v1.51.0 line, while the repo's root go.mod is on v0.151.0 (stable modules at v1.57.0). Building with a current ocb fails with undefined symbols in xexporterhelper.

This PR realigns every component to the v0.151.0 release line (matching go.mod), without changing which components are included.

Changes

  • builder-config.yaml — bump components to OBI's Collector release line:
    • Beta modules v0.145.0v0.151.0: debugexporter, otlpexporter, batchprocessor, otlpreceiver
    • Stable confmap providers v1.51.0v1.57.0: envprovider, fileprovider, httpprovider, httpsprovider, yamlprovider
  • README.md — document the minimum compatible ocb version (v0.151.0+) and why it must track go.mod.
  • CI — add .github/workflows/pull_request_otel_collector_example.yml that runs the ocb build on PRs/pushes touching examples/otel-collector/** or go.mod. It resolves the ocb version from go.mod so the example can't silently drift again.

Testing

Built locally with ocb/builder v0.151.0:

ocb --config ./builder-config.yaml
...
INFO  builder/main.go:150  Compiled  {"binary": "./otelcol-dev/otelcol-dev"}

Fixes #2264

🤖 Generated with Claude Code

@hitkall hitkall requested a review from a team as a code owner June 17, 2026 19:24
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 17, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: hitkall / name: Hitesh Kalluru (d53ba92)

@hitkall hitkall force-pushed the fix/2264-otel-collector-builder-versions branch 2 times, most recently from cf8d189 to d53ba92 Compare June 17, 2026 19:29
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.23%. Comparing base (8a9be99) to head (a0e6efb).
⚠️ Report is 2 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (8a9be99) and HEAD (a0e6efb). Click for more details.

HEAD has 44 uploads less than BASE
Flag BASE (8a9be99) HEAD (a0e6efb)
oats-test 9 0
k8s-integration-test 16 0
integration-test-arm 5 0
integration-test 10 0
integration-test-vm-6.18-lts 2 0
integration-test-vm-5.15-lts 2 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2420      +/-   ##
==========================================
- Coverage   69.10%   62.23%   -6.87%     
==========================================
  Files         325      324       -1     
  Lines       42650    35222    -7428     
==========================================
- Hits        29475    21922    -7553     
- Misses      11474    11859     +385     
+ Partials     1701     1441     -260     
Flag Coverage Δ
integration-test ?
integration-test-arm ?
integration-test-vm-5.15-lts ?
integration-test-vm-6.18-lts ?
k8s-integration-test ?
oats-test ?
unittests 62.23% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hitkall hitkall force-pushed the fix/2264-otel-collector-builder-versions branch from d53ba92 to ac82add Compare June 17, 2026 19:37
Comment thread examples/otel-collector/README.md Outdated

- Go 1.25 or later
- [OTel Collector Builder (`ocb`)](https://opentelemetry.io/docs/collector/extend/ocb/) installed
- [OTel Collector Builder (`ocb`)](https://opentelemetry.io/docs/collector/extend/ocb/) **v0.151.0 or later** installed. The component versions pinned in `builder-config.yaml` track the OpenTelemetry Collector `v0.151.0` release line (matching OBI's own `go.mod`), so `ocb` must be from that release line or newer. Older `ocb` releases may fail to build with undefined-symbol errors.

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.

I'm hesitant to say "or later" here. There is no compatibility guarntee for that unstable package.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point, agreed. I dropped the "or later" wording and pinned the doc to v0.151.0, with a note that ocb is an unstable v0.x package with no compatibility guarantee across versions, so the ocb version should match the component versions in builder-config.yaml. The CI job installs ocb at exactly the version resolved from go.mod, so it stays in lockstep too.

…ase line

The examples/otel-collector builder-config.yaml pinned Collector components
to the v0.145.0 / v1.51.0 release line, which has drifted from the v0.151.0
line OBI depends on (see go.mod). Building with a current ocb failed with
undefined symbols in xexporterhelper.

- Bump beta modules (debugexporter, otlpexporter, batchprocessor,
  otlpreceiver) v0.145.0 -> v0.151.0
- Bump stable confmap providers v1.51.0 -> v1.57.0
- Document the ocb version (v0.151.0) the example builds with in the README
- Add an "OTel Collector example (ocb build)" job to pull_request.yml that
  reuses the existing generate-bpf artifact (like collector-cross-compile)
  and builds the example with ocb, pinned to the Collector version resolved
  from go.mod so it cannot drift again

Fixes open-telemetry#2264
@hitkall hitkall force-pushed the fix/2264-otel-collector-builder-versions branch from ac82add to a0e6efb Compare June 17, 2026 20:21

@MrAlias MrAlias 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.

Awesome! Thanks for the fix

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.

examples/otel-collector fails to build with ocb due to collector version drift

2 participants