#are you able to run `dagger call sdk go

1 messages ยท Page 1 of 1 (latest)

viral violet
#

Hmmm

sipsma@dagger_dev:~/repo/github.com/sipsma/dagger$ dagger call sdk go generate
โœ˜ initialize 4.9s
! input: moduleSource.withContextDirectory.asModule resolve: failed to create module: select: failed to update module dependencies: failed to initialize dependency modules: failed to initialize dependency module: select: failed to create module: select: failed to update codegen and runtime: failed to generate
 code: failed to get modified source directory for go module sdk codegen: select: process "/usr/local/bin/codegen --output /src --module-context-path /src/docusaurus/dagger --module-name docusaurus --introspection-json-path /schema.json" did not complete successfully: exit code: 1

Stderr:
exec /.init: exec format error
  โœ˜ ModuleSource.asModule: Module! 3.7s
  ! failed to create module: select: failed to update module dependencies: failed to initialize dependency modules: failed to initialize dependency module: select: failed to create module: select: failed to update codegen and runtime: failed to generate code: failed to get modified source directory for go mod
ule sdk codegen: select: process "/usr/local/bin/codegen --output /src --module-context-path /src/docusaurus/dagger --module-name docusaurus --introspection-json-path /schema.json" did not complete successfully: exit code: 1

Error: input: moduleSource.withContextDirectory.asModule resolve: failed to create module: select: failed to update module dependencies: failed to initialize dependency modules: failed to initialize dependency module: select: failed to create module: select: failed to update codegen and runtime: failed to gen
erate code: failed to get modified source directory for go module sdk codegen: select: process "/usr/local/bin/codegen --output /src --module-context-path /src/docusaurus/dagger --module-name docusaurus --introspection-json-path /schema.json" did not complete successfully: exit code: 1

Stderr:
exec /.init: exec format error
#

Not good

earnest crystal
#

hm that's very different from what i see ๐Ÿค”

#

oh

#

you're an arm mac?

viral violet
#

I wonder if dumb-init is only being built for the host platform....

#

๐Ÿ˜ž

#

Okay well that's issue 1

earnest crystal
#

yup

#

just checked that now as well

viral violet
#

I can enable the qemu-emulators to workaround for a sec

#

to try reproing the dns issue

earnest crystal
#

huh we might see about getting an arm ci runners

viral violet
#

actually idk if the emulators will kick in

earnest crystal
#

if it's in binfmt on your host, i think they should

viral violet
earnest crystal
#

yup yup, 100%

#

ohh

#

so if you connect to the service binding name it works

#

but not if you connect to the endpoint

#

so if i change the HOST to dagger-engine in ci/sdk.go's installer

viral violet
#

Right I actually was more curious how the hell this worked previously after seeing the error message you sent lol

earnest crystal
#

my guess is somehow we now miss adding the endpoint to the hosts file or dns

viral violet
#

Still want to understand that since I suppose this was a breaking change in some way, but it may be something incredibly obscure that just happened to work before

earnest crystal
#

oh were we not ever supposed to connect in this way ๐Ÿ˜„

viral violet
#

but it appears I can't repro the dns issue:

sipsma@dagger_dev:~/repo/github.com/sipsma/dagger$ dagger call --source . sdk go generate entries
sdk
sipsma@dagger_dev:~/repo/github.com/sipsma/dagger$ dagger version
dagger v0.11.5 (registry.dagger.io/engine) linux/arm64
earnest crystal
#

well i guess that's nice - seems to be somewhat machine dependent, so at least you can repro what ci is seeing

#

not quite sure why i'm special though

viral violet
#

Does any DNS work in dagger? Like a withExec that curls google.com?

#

I've gotten into situations where DNS inside docker breaks, which breaks DNS inside dagger

#

Usually involving tailscale in my particular case

#

I'm gonna fix the dumb-init problem now either way, that's probably worse overall

earnest crystal
#

good morning ๐Ÿ˜„ sorry to begin your day with regressions

#

okay have some pings from inside the container:

67  :     [0.4s] | PING dagger-engine (10.87.0.24): 56 data bytes
67  :     [0.4s] | 64 bytes from 10.87.0.24: seq=0 ttl=64 time=0.160 ms
67  :     [1.4s] | 64 bytes from 10.87.0.24: seq=1 ttl=64 time=0.089 ms
67  :     [2.4s] | 64 bytes from 10.87.0.24: seq=2 ttl=64 time=0.087 ms
67  :     [3.4s] | 64 bytes from 10.87.0.24: seq=3 ttl=64 time=0.084 ms
67  :     [3.4s] | 
67  :     [3.4s] | --- dagger-engine ping statistics ---
67  :     [3.4s] | 4 packets transmitted, 4 packets received, 0% packet loss
67  :     [3.4s] | round-trip min/avg/max = 0.084/0.105/0.160 ms
67  :     [3.4s] | Server:        10.87.0.1
67  :     [3.4s] | Address:    10.87.0.1:53
67  :     [3.4s] | 
67  :     [3.4s] | ** server can't find dagger-engine: NXDOMAIN
67  :     [3.4s] | 
67  :     [3.4s] | ** server can't find dagger-engine: NXDOMAIN
67  :     [3.4s] | 
67  :     [3.4s] | PING google.com (142.250.200.46): 56 data bytes
67  :     [3.5s] | 64 bytes from 142.250.200.46: seq=0 ttl=114 time=23.650 ms
67  :     [4.5s] | 64 bytes from 142.250.200.46: seq=1 ttl=114 time=20.535 ms
67  :     [5.5s] | 64 bytes from 142.250.200.46: seq=2 ttl=114 time=20.705 ms
67  :     [6.5s] | 64 bytes from 142.250.200.46: seq=3 ttl=114 time=17.030 ms
67  :     [6.5s] | 
67  :     [6.5s] | --- google.com ping statistics ---
67  :     [6.5s] | 4 packets transmitted, 4 packets received, 0% packet loss
67  :     [6.5s] | round-trip min/avg/max = 17.030/20.480/23.650 ms
67  :     [6.5s] | Server:        10.87.0.1
67  :     [6.5s] | Address:    10.87.0.1:53
67  :     [6.5s] | 
67  :     [6.5s] | Non-authoritative answer:
67  :     [6.5s] | Name:    google.com
67  :     [6.5s] | Address: 142.250.200.46
67  :     [6.5s] | 
67  :     [6.5s] | Non-authoritative answer:
67  :     [6.5s] | Name:    google.com
67  :     [6.5s] | Address: 2a00:1450:4009:81d::200e
67  :     [6.5s] | 
67  :     [6.5s] | ping: bad address 'maqhuug9fbhak'
67  :     [6.5s] | Server:        10.87.0.1
67  :     [6.5s] | Address:    10.87.0.1:53
67  :     [6.5s] | 
67  :     [6.5s] | ** server can't find maqhuug9fbhak: NXDOMAIN
67  :     [6.5s] | 
67  :     [6.5s] | ** server can't find maqhuug9fbhak: NXDOMAIN
#

i can reach dagger-engine and google.com, but not the endpoint

#

the NXDOMAIN is from nslookup but that doesn't seem to work on either of the ways to reach a service (i think expected)

viral violet
earnest crystal
#

potentially this could maybe be related to a vm-thingy - e.g. if you're using docker desktop, vs running docker on your host

#

i wouldn't be surprised if there's some magic dns stuff happening deep in DD

viral violet
#

If it's easy, can you cat /etc/hosts and /etc/resolv.conf from that exec where it can't resolve the service name?

earnest crystal
#

yup will do, sorry, i'm heading off for the day soon (and then am on pto till tues)

#

so scrambling a little bit ๐Ÿ™

viral violet
#

no worries! I can take things from here. I think the init problem is worth a patch release which I will do once fixed

earnest crystal
#

yup ๐Ÿ™ sgtm - i should be reachable for anything super urgent fyi

#

okay:

#
68  :     [0.7s] | OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=http://127.0.0.1:44655
68  :     [0.7s] | OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
68  :     [0.7s] | CGO_ENABLED=0
68  :     [0.7s] | _EXPERIMENTAL_DAGGER_CLI_BIN=/.dagger-cli
68  :     [0.7s] | OTEL_EXPORTER_OTLP_PROTOCOL=grpc
68  :     [0.7s] | GOOS=linux
68  :     [0.7s] | SHLVL=1
68  :     [0.7s] | HOME=/root
68  :     [0.7s] | GOTOOLCHAIN=local
68  :     [0.7s] | OTEL_EXPORTER_OTLP_METRICS_PROTOCOL=grpc
68  :     [0.7s] | _EXPERIMENTAL_DAGGER_RUNNER_HOST=tcp://kln5058ul88ps:1234
68  :     [0.7s] | GOROOT=/usr/local/go
68  :     [0.7s] | GOARCH=amd64
68  :     [0.7s] | OTEL_TRACE_PARENT=00-06ece313899cce68eb27875fbb3b0bb8-2795c9c1ea532b0b-01
68  :     [0.7s] | DOLLAR=$
68  :     [0.7s] | GOFILE=generate.go
68  :     [0.7s] | OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=grpc
68  :     [0.7s] | PATH=/usr/local/go/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
68  :     [0.7s] | GOLINE=3
68  :     [0.7s] | GOPACKAGE=dagger
68  :     [0.7s] | TRACEPARENT=00-06ece313899cce68eb27875fbb3b0bb8-2795c9c1ea532b0b-01
68  :     [0.7s] | OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:44655
68  :     [0.7s] | OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:44655
68  :     [0.7s] | GOPATH=/go
68  :     [0.7s] | OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://127.0.0.1:44655
68  :     [0.7s] | PWD=/app/sdk/go
68  :     [0.7s] | GOLANG_VERSION=1.22.3
68  :     [0.7s] | OTEL_TRACES_EXPORTER=otlp
68  :     [0.7s] | ---- /etc/hosts
68  :     [0.7s] | 127.0.0.1    localhost buildkitsandbox
68  :     [0.7s] | ::1    localhost ip6-localhost ip6-loopback
68  :     [0.7s] | 
68  :     [0.7s] | 10.87.0.27    dagger-engine
68  :     [0.7s] | ---- /etc/resolv.conf
68  :     [0.7s] | nameserver 10.87.0.1
68  :     [0.7s] | ---- pings
#

also got an env dump

viral violet
earnest crystal
#

gonna grab the equivalent from v0.11.4 as well

#

just to check to see there's no unexpected differences

#

here's from v0.11.4

#

there's a diff in resolv.conf - the new version is missing a search

viral violet
earnest crystal
#

it looks like there's no equivalent in the new worker

viral violet
viral violet
#

though still mystified by why this was only happening to you so far

earnest crystal
viral violet
#

The reason it matters is that I want to actually test the fix e2e somehow, but that requires knowing how to hit it laughcry I'm poking around on my host to see if I have a search in my resolv.conf that gets propagated to the engine through docker and thus never needs the !resolved codepath that got missed in the shim transplant

#

Just my best guess so far

earnest crystal
#

I can test your fix in a few moments on my apparently cursed machine

#

If that helps ๐Ÿ™‚

viral violet
#

Also curious what your host's /etc/resolv.conf looks like if you have a sec

earnest crystal
#

Yeah I'll be like half an hour - currently on the bus home after doing some last minutes shopping

viral violet
#

My host does indeed have a search domain configured, which seems to be propagated by docker to the search domain of the dagger-engine.dev's resolv.conf, so if that's also propagated to each exec container, that may explain this all

viral violet
viral violet