fix(ops): group OpenTelemetry module upgrades and sync semconv imports in Go files - #2015
Open
bwplotka wants to merge 1 commit into
Open
fix(ops): group OpenTelemetry module upgrades and sync semconv imports in Go files#2015bwplotka wants to merge 1 commit into
bwplotka wants to merge 1 commit into
Conversation
bwplotka
commented
Jul 25, 2026
Comment on lines
+165
to
+166
| # OpenTelemetry modules share versions and schema URLs across packages (e.g. otel, otel/sdk, otel/trace, otel/metric). | ||
| # Upgrade all otel modules present in go.mod together to avoid conflicting schema URL errors. |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the vulnerability fixing logic in ops/gmpctl/lib.sh to use go get for updating modules instead of direct sed replacements in go.mod. It also introduces special handling for OpenTelemetry modules to upgrade them simultaneously and align semconv imports to prevent conflicting Schema URL errors. The review feedback highlights potential script crashes due to the use of grep in pipelines under set -o pipefail and set -o errexit when no matches are found, and suggests using awk to safely handle these cases.
bwplotka
commented
Jul 25, 2026
| echo "🔄 Updating OpenTelemetry modules simultaneously:${otel_args}..." | ||
| go get ${otel_args} | ||
|
|
||
| # OpenTelemetry SDK resource detectors (e.g. WithProcessRuntimeDescription, WithTelemetrySDK) |
bwplotka
force-pushed
the
gmpctl-otel-fix
branch
3 times, most recently
from
July 25, 2026 17:01
6763f5e to
6bca81e
Compare
…s in Go files - Uses `go list -m all` to include direct and indirect `go.opentelemetry.io/otel*` modules (such as `otel/trace`, `otel/sdk`, `otel/metric`) in simultaneous upgrades. - Dynamically queries the exact `semconv` package version imported by `go.opentelemetry.io/otel/sdk/resource` and updates hardcoded `semconv` imports across Go files to match. Signed-off-by: bwplotka <bwplotka@google.com>
bwplotka
force-pushed
the
gmpctl-otel-fix
branch
from
July 25, 2026 17:03
6bca81e to
c5c876a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR fixes vulnerability updates for OpenTelemetry modules in
gmpctl:go list -m allto discover all direct and indirectgo.opentelemetry.io/otel*modules (such asotel/trace,otel/sdk,otel/metric, etc.) and upgrades them simultaneously to avoid version drift and partial module upgrades.semconvImport Synchronization: Dynamically queries the exactsemconvpackage version imported bygo.opentelemetry.io/otel/sdk/resourceand updates hardcodedsemconvimports in.gofiles. This preventsconflicting Schema URLerrors during tracer provider initialization (e.g.failed to install a new tracer provider: error detecting resource: conflicting Schema URL: https://opentelemetry.io/schemas/1.40.0 and https://opentelemetry.io/schemas/1.41.0).Signed-off-by: bwplotka bwplotka@google.com