Fix telemetry update #359

Closed
opened 2026-06-03 11:32:50 +00:00 by guettli · 2 comments
guettli commented 2026-06-03 11:32:50 +00:00 (Migrated from codeberg.org)
https://codeberg.org/guettli/sharedinbox/pulls/356 Why is that merge not working?
guettlibot commented 2026-06-03 11:45:03 +00:00 (Migrated from codeberg.org)

Let me read the project conventions and investigate the failing PR.Now let me look at PR #356 to understand what happened.Let me check the Taskfile for any relevant Go linting tasks.Now I have the complete picture. Let me check what go mod tidy compatibility status of dagger/otel-go is.Now I have everything I need. Here's the complete picture:


Root Cause

PR #356 correctly updates ci/go.mod — bumping go.opentelemetry.io/otel{,/trace,/sdk} from v1.43.0v1.44.0 in require, and updating the four replace directives from v0.19.0v0.20.0. However, ci/go.sum is never updated — it still contains hashes at v0.16.0 for those four replaced packages, and has no entries at all for the newly required v1.44.0 packages. The same gap existed after PR #279 (the v0.19.0 bump): go.sum was never regenerated then either.

When Dagger compiles the ci module during task check-dagger, Go verifies checksums. The missing entries cause a missing go.sum entry build error, blocking CI.

Why Renovate doesn't fix this: Renovate updates go.mod but does not run go mod tidy for replace-directive bumps, so go.sum is never regenerated.


Implementation Plan

1. Fix ci/go.sum on the PR branch

git fetch origin renovate/opentelemetry-go-monorepo
git checkout -b fix/otel-gosum FETCH_HEAD

Because ci/internal/dagger/ is auto-generated and not committed, go mod tidy won't compile directly. Use the two-step approach:

# Step 1 — regenerate the Dagger-generated code so go.mod graph is resolvable
cd ci && dagger develop

# Step 2 — regenerate go.sum
go mod tidy

Alternatively, if dagger develop is not available in the current environment, use go mod download to add only the new checksums without needing to build:

cd ci
go mod download \
  go.opentelemetry.io/otel@v1.44.0 \
  go.opentelemetry.io/otel/trace@v1.44.0 \
  go.opentelemetry.io/otel/sdk@v1.44.0 \
  go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc@v0.20.0 \
  go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp@v0.20.0 \
  go.opentelemetry.io/otel/log@v0.20.0 \
  go.opentelemetry.io/otel/sdk/log@v0.20.0

Commit the updated ci/go.sum and push to the PR branch. CI should then pass.

2. Prevent recurrence — add postUpdateOptions to renovate.json

Add "postUpdateOptions": ["gomodTidy"] to the existing config so Renovate runs go mod tidy after every Go module update:

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": ["config:recommended"],
  "labels": ["dependencies"],
  "postUpdateOptions": ["gomodTidy"],
  "github-actions": { "enabled": false },
  "packageRules": [
    {
      "matchUpdateTypes": ["minor", "patch", "pin", "digest", "lockFileMaintenance"],
      "addLabels": ["automerge"]
    }
  ]
}

This single-line addition means every future Renovate PR that touches a Go module (including replace-directive bumps) will have a correct, up-to-date go.sum included automatically.

Let me read the project conventions and investigate the failing PR.Now let me look at PR #356 to understand what happened.Let me check the Taskfile for any relevant Go linting tasks.Now I have the complete picture. Let me check what `go mod tidy` compatibility status of `dagger/otel-go` is.Now I have everything I need. Here's the complete picture: --- ## Root Cause PR #356 correctly updates `ci/go.mod` — bumping `go.opentelemetry.io/otel{,/trace,/sdk}` from `v1.43.0` → `v1.44.0` in `require`, and updating the four `replace` directives from `v0.19.0` → `v0.20.0`. However, **`ci/go.sum` is never updated** — it still contains hashes at `v0.16.0` for those four replaced packages, and has no entries at all for the newly required `v1.44.0` packages. The same gap existed after PR #279 (the `v0.19.0` bump): `go.sum` was never regenerated then either. When Dagger compiles the `ci` module during `task check-dagger`, Go verifies checksums. The missing entries cause a `missing go.sum entry` build error, blocking CI. **Why Renovate doesn't fix this**: Renovate updates `go.mod` but does not run `go mod tidy` for `replace`-directive bumps, so `go.sum` is never regenerated. --- ## Implementation Plan ### 1. Fix `ci/go.sum` on the PR branch ``` git fetch origin renovate/opentelemetry-go-monorepo git checkout -b fix/otel-gosum FETCH_HEAD ``` Because `ci/internal/dagger/` is auto-generated and not committed, `go mod tidy` won't compile directly. Use the two-step approach: ```bash # Step 1 — regenerate the Dagger-generated code so go.mod graph is resolvable cd ci && dagger develop # Step 2 — regenerate go.sum go mod tidy ``` Alternatively, if `dagger develop` is not available in the current environment, use `go mod download` to add only the new checksums without needing to build: ```bash cd ci go mod download \ go.opentelemetry.io/otel@v1.44.0 \ go.opentelemetry.io/otel/trace@v1.44.0 \ go.opentelemetry.io/otel/sdk@v1.44.0 \ go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc@v0.20.0 \ go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp@v0.20.0 \ go.opentelemetry.io/otel/log@v0.20.0 \ go.opentelemetry.io/otel/sdk/log@v0.20.0 ``` Commit the updated `ci/go.sum` and push to the PR branch. CI should then pass. ### 2. Prevent recurrence — add `postUpdateOptions` to `renovate.json` Add `"postUpdateOptions": ["gomodTidy"]` to the existing config so Renovate runs `go mod tidy` after every Go module update: ```json { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": ["config:recommended"], "labels": ["dependencies"], "postUpdateOptions": ["gomodTidy"], "github-actions": { "enabled": false }, "packageRules": [ { "matchUpdateTypes": ["minor", "patch", "pin", "digest", "lockFileMaintenance"], "addLabels": ["automerge"] } ] } ``` This single-line addition means every future Renovate PR that touches a Go module (including replace-directive bumps) will have a correct, up-to-date `go.sum` included automatically.
guettlibot commented 2026-06-03 14:25:01 +00:00 (Migrated from codeberg.org)

Let me look at the referenced PR #356 and understand the issue.Let me fetch PR #356 to understand what changes were attempted.This is a Flutter repo but PR #356 touches Go files. Let me find the Go code in this repo.The PR updates ci/go.mod but go.sum also needs updating. Let me look at both files.Let me check the current go.sum and see if Go tools are available.I can see the issue: ci/go.mod has replace directives pointing to v0.19.0, but ci/go.sum only has hashes for v0.16.0 of the OpenTelemetry log packages. The go.sum is out of sync. PR #356 tried to go further (bump to v1.44.0/v0.20.0) but the underlying go.sum was already broken.

Let me apply the PR #356 version bumps and regenerate go.sum:That's suspicious — go.sum got nearly emptied. Let me check what's left and diagnose:Let me look at what's in the internal/dagger directory:Let me understand the Dagger module setup:Dagger is available. Let me restore go.sum first, then properly fix it using dagger develop:Good, restored. Now let me use dagger develop to generate the internal/dagger package, then do the proper fix:Let me try a different approach — use go get to fetch specific package hashes without needing the full module:Let me apply the PR #356 changes to go.mod and then use go mod download to properly update go.sum:The go.mod changed from what I first saw. Let me check the committed state:I can see the working tree already has partial go.mod/go.sum updates — the go.mod versions were bumped but go.sum is missing the h1: package hashes. Let me complete the update by downloading the missing packages:Let me verify the current state is consistent and check if go mod verify passes:The current working tree already has some fixes (fixing require/replace inconsistency, go.sum /go.mod hashes). But PR #356 also wanted to bump otel to v1.44.0 and replace directives to v0.20.0. Let me apply those too:Let me apply PR #356's intended bumps on top of the current fixes:Now update the replace directives from v0.19.0 to v0.20.0:Good. Now download the new packages to update go.sum:I need to add go.sum entries manually. Let me get all the needed hashes:Now I have all the hashes. Let me add them to go.sum:Now I have all the hashes. Let me write the updated go.sum with the new entries, replacing the stale v0.19.0 placeholder entries and adding v1.44.0/v0.20.0 entries:Now verify the module is consistent:go mod verify passes. Let me do a final review of the changes:The changes look correct. Now let me create a branch and commit:The pull request is open at https://codeberg.org/guettli/sharedinbox/pulls/363.


Summary of what was done and why PR #356 wasn't merging:

Root cause: ci/go.sum was out of sync with ci/go.mod. The require section listed otel log packages at v0.17.0, the replace directives pinned them to v0.19.0, but go.sum only had hashes for the even older v0.16.0. Renovate's "Artifact file update failure" was because it couldn't regenerate go.sum — the Dagger module's internal/dagger generated package isn't committed, so standard go mod tidy drops nearly all entries from go.sum.

Fix: Manually applied PR #356's intended version bumps (otel v1.43.0 → v1.44.0, replace directives v0.19.0 → v0.20.0) and fetched the correct h1: and /go.mod hashes for each new package version via go mod download -json, then wrote them into go.sum. Also picked up the accompanying bumps (grpc, proto/otlp, genproto) that go mod tidy identified.

Let me look at the referenced PR #356 and understand the issue.Let me fetch PR #356 to understand what changes were attempted.This is a Flutter repo but PR #356 touches Go files. Let me find the Go code in this repo.The PR updates `ci/go.mod` but `go.sum` also needs updating. Let me look at both files.Let me check the current go.sum and see if Go tools are available.I can see the issue: `ci/go.mod` has `replace` directives pointing to v0.19.0, but `ci/go.sum` only has hashes for v0.16.0 of the OpenTelemetry log packages. The go.sum is out of sync. PR #356 tried to go further (bump to v1.44.0/v0.20.0) but the underlying go.sum was already broken. Let me apply the PR #356 version bumps and regenerate go.sum:That's suspicious — go.sum got nearly emptied. Let me check what's left and diagnose:Let me look at what's in the `internal/dagger` directory:Let me understand the Dagger module setup:Dagger is available. Let me restore go.sum first, then properly fix it using dagger develop:Good, restored. Now let me use `dagger develop` to generate the `internal/dagger` package, then do the proper fix:Let me try a different approach — use `go get` to fetch specific package hashes without needing the full module:Let me apply the PR #356 changes to go.mod and then use `go mod download` to properly update go.sum:The go.mod changed from what I first saw. Let me check the committed state:I can see the working tree already has partial go.mod/go.sum updates — the go.mod versions were bumped but go.sum is missing the `h1:` package hashes. Let me complete the update by downloading the missing packages:Let me verify the current state is consistent and check if `go mod verify` passes:The current working tree already has some fixes (fixing require/replace inconsistency, go.sum `/go.mod` hashes). But PR #356 also wanted to bump `otel` to v1.44.0 and replace directives to v0.20.0. Let me apply those too:Let me apply PR #356's intended bumps on top of the current fixes:Now update the replace directives from v0.19.0 to v0.20.0:Good. Now download the new packages to update go.sum:I need to add go.sum entries manually. Let me get all the needed hashes:Now I have all the hashes. Let me add them to go.sum:Now I have all the hashes. Let me write the updated go.sum with the new entries, replacing the stale v0.19.0 placeholder entries and adding v1.44.0/v0.20.0 entries:Now verify the module is consistent:`go mod verify` passes. Let me do a final review of the changes:The changes look correct. Now let me create a branch and commit:The pull request is open at https://codeberg.org/guettli/sharedinbox/pulls/363. --- **Summary of what was done and why PR #356 wasn't merging:** **Root cause:** `ci/go.sum` was out of sync with `ci/go.mod`. The `require` section listed otel log packages at v0.17.0, the `replace` directives pinned them to v0.19.0, but `go.sum` only had hashes for the even older v0.16.0. Renovate's "Artifact file update failure" was because it couldn't regenerate `go.sum` — the Dagger module's `internal/dagger` generated package isn't committed, so standard `go mod tidy` drops nearly all entries from go.sum. **Fix:** Manually applied PR #356's intended version bumps (otel v1.43.0 → v1.44.0, replace directives v0.19.0 → v0.20.0) and fetched the correct `h1:` and `/go.mod` hashes for each new package version via `go mod download -json`, then wrote them into `go.sum`. Also picked up the accompanying bumps (`grpc`, `proto/otlp`, `genproto`) that `go mod tidy` identified.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: guettli/sharedinbox#359