#What's the safe way to upgrade Dagger GO modules?

1 messages · Page 1 of 1 (latest)

swift willow
#

I use renovate.
I have dagger in the project with the nested module, so a multi-module repo.
I've used go work sync/use.

When renovate upgrades all the packages, it's running go get -u I believe in the nested directory and as a result I get things like this:

Last time I did this I ran into conflicts in my build ( golang.org/x/sys@v0.20.0: missing go.sum entry for go.mod file).
Is there a way I can avoid running dagger develop to upgrade and use just go commands without concern for compatibility?

If this is merely an issue with not having run go mod tidy from the root directory as well then maybe it's a defect with renovate, but I am trying to iron out issues to make sure.

low brook
#

If this is merely an issue with not having run go mod tidy from the root directory as well then maybe it's a defect with renovate, but I am trying to iron out issues to make sure.

In theory, you could run go mod tidy to handle this, but I remember also hitting that kind of issue when I was developing a go module inside a go project and dependencies were mixed between my project and my modules.

I could fix it with a go mod tidy so maybe it can help you too

swift willow
#

did you run go mod tidy from root or dagger directory? Haven't explored if behavior is different

swift willow
#

I just did this and ran into the issue again...

I ran upgrades in both root and dagger, go mod tidy, and dagger develop.
Confirmed version: dagger v0.11.4 (registry.dagger.io/engine) darwin/arm64

Any ideas? It's actually blocking the build entirely.
Figured that running dagger develop would align if i got something wrong.

#
dagger call mkdocs-build --dir ${PWD} export --path .artifacts/_site
✘ initialize 1.5s
! input: module.withSource.initialize resolve: failed to initialize module: failed to call module "devex" to get functions: call constructor: process "go build -o /runtime ." did not complete successfully: exit code: 1

Stderr:
# dagger/devex/internal/telemetry
internal/telemetry/proxy.go:50:14: cannot use proxySpan{…} (value of type proxySpan) as "go.opentelemetry.io/otel/trace".Span value in return statement: proxySpan does not implement "go.opentelemetry.io/otel/trace".Span (missing method AddLink)
internal/telemetry/proxy.go:59:20: cannot use proxySpan{} (value of type proxySpan) as "go.opentelemetry.io/otel/trace".Span value in variable declaration: proxySpan does not implement "go.opentelemetry.io/otel/trace".Span (missing method AddLink)
  ✔ ModuleSource.asModule: Module! 0.7s
  ✘ Module.initialize: Module! 0.2s
  ! failed to initialize module: failed to call module "devex" to get functions: call constructor: process "go build -o /runtime ." did not complete successfully: exit code: 1
    ✘ exec go build -o /runtime . 0.1s
    ! process "go build -o /runtime ." did not complete successfully: exit code: 1
    ┃ # dagger/devex/internal/telemetry                                                                         ```
#

... continued due to discord limits

    ┃ internal/telemetry/proxy.go:50:14: cannot use proxySpan{…} (value of type proxySpan) as "go.opentelemetry.io/otel/trace".Span value in return sta
    ┃ : proxySpan does not implement "go.opentelemetry.io/otel/trace".Span (missing method AddLink)                                                    
    ┃ internal/telemetry/proxy.go:59:20: cannot use proxySpan{} (value of type proxySpan) as "go.opentelemetry.io/otel/trace".Span value in variable de
    ┃ ion: proxySpan does not implement "go.opentelemetry.io/otel/trace".Span (missing method AddLink)                                                 

Error: input: module.withSource.initialize resolve: failed to initialize module: failed to call module "devex" to get functions: call constructor: process "go build -o /runtime ." did not complete successfully: exit code: 1
swift willow
#

i also deleted all gen code and then dagger developed again and still same issue. next trying to delete go.sum contents to see

#

argghhh. i must have hit something

Error: failed to get module SDK: returned error 502 Bad Gateway: http do: Post "http://dagger/query": context canceled
#

ok, i'm good there it's responding now, probably did something wrong in my directory location or something.... still working at it