Skip to content

Go SDK modules, including published third-party modules, fail to load on engines ≤ v0.21.10 since otel-go v1.47.0: import cycle not allowed (otel/internal/global ↔ otel/log) #15263

Backlog

Description

@sunny-au-support

What is the issue?

Since github.com/dagger/otel-go v1.47.0 was tagged (2026-11-24 03:04 UTC), engine v0.21.10 can no longer build any Go SDK module. This includes a fresh dagger init --sdk=go module, and also already-published modules pinned to a fixed commit, which are now unusable as dependencies.

For example, github.com/vbehar/daggerverse/jfrogcli@82f5c55 worked the day before and now fails on every call. Modules in other SDKs that depend on it (Python in our case) fail as soon as they call it. Nothing changed on the module side: the engine builds the module at load time and resolves an unpinned dependency to its latest version.

package github.com/vbehar/daggerverse/jfrogcli
	imports github.com/dagger/otel-go from dagger.gen.go
	imports go.opentelemetry.io/otel from init.go
	imports go.opentelemetry.io/otel/internal/global from handler.go
	imports go.opentelemetry.io/otel/log from logger.go
	imports go.opentelemetry.io/otel/internal/global from keyvalue.go: import cycle not allowed

Impact

  • Engine operators on ≤ v0.21.10 lose every Go module in their dependency tree at once, including third-party modules they don't control.
  • Consumers can't fix it themselves: modules are fetched at a pinned git ref, so changing a dependency's go.mod requires forking it.

Workarounds

  • Consumers: upgrade the engine to ≥ v0.21.11. That's the only fix that doesn't require forking every affected Go dependency.
  • Module authors: add require github.com/dagger/otel-go v1.43.0 to the module's go.mod (works on v0.21.10) and publish a new version. Consumers still have to bump their pin.

Related

Suggestion: mention in the release notes or troubleshooting docs that engines ≤ v0.21.10 can no longer load Go modules since otel-go v1.47.0, and that upgrading to ≥ v0.21.11 is required.

Dagger version

v0.21.10 (broken), v0.21.12 (OK)

Mechanism

  1. On v0.21.10, the generated code (dagger.gen.go) imports github.com/dagger/otel-go, but sdk/go/go.mod doesn't require it. The codegen's go mod tidy resolves it to the latest version, now v1.47.0, which pulls go.opentelemetry.io/otel v1.47.0.
  2. In otel v1.47.0, internal/global (logger.go, state.go) imports go.opentelemetry.io/otel/log. v1.43.0 through v1.46.0 don't.
  3. The codegen still copies the SDK's replace go.opentelemetry.io/otel/log => v0.16.0 (and sdk/log) into the module's go.mod. otel/log v0.16.0 imports otel/internal/global (keyvalue.go), which closes the cycle.

Steps to reproduce

Consuming a published module, unmodified:

dagger -m github.com/vbehar/daggerverse/jfrogcli@82f5c55fd5005e87a71fdb1da7f3509d37eb2f34 call get-latest-version

Fresh module:

dagger init --sdk=go --name=testotel --source=.
dagger call container-echo --string-arg=ok stdout
Engine Published module (jfrogcli@82f5c55) Fresh dagger init --sdk=go
v0.21.10 ❌ import cycle ❌ import cycle (otel-go v1.47.0, otel/log => v0.16.0)
v0.21.12 ✅ OK (2.133.0) ✅ OK (otel-go v1.43.0, same replaces)

v0.21.11+ isn't affected because sdk/go/go.mod requires github.com/dagger/otel-go v1.43.0, which pins it.

Log output

$ dagger --progress=plain -m github.com/vbehar/daggerverse/jfrogcli@82f5c55fd5005e87a71fdb1da7f3509d37eb2f34 call get-latest-version

1   : connect DONE [8.7s]

9   : load workspace: .
10  : ┆ loading type definitions
10  : ┆ loading type definitions DONE [11.9s]
9   : load workspace: . DONE [11.9s]

11  : parsing command line arguments
11  : parsing command line arguments DONE [0.0s]

12  : jfrogcli: Jfrogcli!
12  : jfrogcli ERROR [8.6s]
12  : ! call constructor: exit code: 1

Error: call constructor: exit code: 1 [traceparent:70f0beda6a52276031c03666cf1bfbe6-13814a7cf74e2c46]
Stderr:
package github.com/vbehar/daggerverse/jfrogcli
	imports github.com/dagger/otel-go from dagger.gen.go
	imports go.opentelemetry.io/otel from init.go
	imports go.opentelemetry.io/otel/internal/global from handler.go
	imports go.opentelemetry.io/otel/log from logger.go
	imports go.opentelemetry.io/otel/internal/global from keyvalue.go: import cycle not allowed

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions