#Modules with service

1 messages · Page 1 of 1 (latest)

covert zealot
#

Hello,

I’ve a module which uses a service in a function and another function which uses the result of the first function seems to fail due to the service. Any idea why it happens?

Here is the code, I’ll try to provide a full example later, I’m in hurry to finalize a demo right now 😛

lethal raft
#

What command are you using to run the function?

And can you please share the full error output?

covert zealot
#

@lethal raft the code is here: https://github.com/camptocamp/daggerverse/tree/test

In an empty directory, I use

dagger call -m github.com/camptocamp/daggerverse/presentation@test --directory '.' --output '.' init
dagger call -m github.com/camptocamp/daggerverse/presentation@test --directory '.' --output 'dist' build
dagger call -m github.com/camptocamp/daggerverse/presentation@test --directory '.' server up

The last command fails:

Error: response from query: input: container.from.withFile.withMountedDirectory.withExposedPort.asService.up resolve: failed to start host service: start upstream: exited: exit code: 125
output: host alias: lookup 0oqgekkfhhbdk on 10.87.0.1:53: no such host
lookup 0oqgekkfhhbdk.k65rf8erqpnj4.dagger.local on 10.87.0.1:53: no such host

If I do not mount the build in the server container, it works, even if I add an explicit sync() on the build in the code (checking that there are no errors).

dagger call -m github.com/camptocamp/daggerverse/presentation@test2 --directory '.' server up
GitHub

Contribute to camptocamp/daggerverse development by creating an account on GitHub.

#

BTW, thanks for taking time to help me!

lethal raft
#

Tagging @narrow musk since he knows a bunch about the services implementation. 😄

narrow musk
#

looking, but my first guess would be a missing health-check

#

but nope, I see they're configured

#

@covert zealot thanks for the report + repro, I think you found a bug! it looks like the service starts in a different namespace than the consumer

narrow musk
#

got a fix 🎉 - i've had an uneasy feeling about this code path for a while now but never ran into a case that proved it, thanks again

covert zealot
#

Wow, so fast! Thanks a lot @narrow musk 👍