#might be bit by needing to say `--use-
1 messages ยท Page 1 of 1 (latest)
Hey
So this is how it's currently being defined
https://github.com/dragoonis/symfony/blob/7.3/.github/workflows/integration-tests.yml#L96-L103
I'm converting github to dagger
defaultArgs:
- couchbase-server
entrypoint:
- /entrypoint.sh
mounts: []
platform: linux/arm64
user: ""
workdir: ""
from dagger core container from --address couchbase
it finally finished (long socket timeout, like 10 minutes lol)
This is just Zookeeper not working
Yeah, there was a change in 0.15 to make ENTRYPOINT not be used by default in AsService to align with WithExec behavior since 0.13 (also some other improvements went in to handling services), but it seems to bite too many people, especially with DBs that all use ENTRYPOINT, so we're considering using the combo of ENTRYPOINT+CMD by default if there are no DefaultArgs or Args on the AsService itself.
oooooooohhh
Yeah, there was a change in 0.15 to make ENTRYPOINT not be used by default in AsService to align with WithExec behavior since 0.13
I mean mysql() works? and that'll have its own entrypoint defined in the Dockerfile, to boot it up, and such.. and works just fine? so why is Couchbase being funny?
So please try asService(use-entrypoint=True) in correct syntax in places like this
https://github.com/dragoonis/symfony/blob/7.3/.dagger/src/Symfony.php#L226
๐ซก testing
running it now .. PHP has named arguments btw ๐ so it's basically the same as what you posted ๐
Still happening - connection refused on port 8093
docker run couchbase works just fine
and I can telnet to it, just fine, from the "docker run couchbase" so something in Dagger isn't quite right .. ๐ค
dev audio for a sec?
docker run --rm -p 8093:8093 couchbase
tail -f /opt/couchbase/var/lib/couchbase/logs/*.log
UPDATE: Jeremy ran the couchbase service up inside "dagger shell" and can replicate the problem .. and is gonna make a ticket for someone to, later, debug it at length to figure out why docker run works but dagger service doesn't.
@maiden pebble IIUC you can't start the couchbase docker image as a couchbase service?
Right. It can't bind to port 8093, specifically
so the couchbase entrypoint isn't working properly, basically, in dagger
let me check really quick
@worn patio
are you using couchbase:latest?
docker run --rm -p 8093:8093 couchbase
telnet localhost 8093
try that
then kill the container (with docker ps, not CTRL+C, coz couchbase doesn't handle CLI signals :P)
In dagger, use this code
private function couchbase($version = '6.5.1'): Service
{
return dag()->container()
->from("couchbase")
->withExposedPort(8091)
->withExposedPort(8092)
->withExposedPort(8093)
->withExposedPort(8094)
->withExposedPort(11210)
->asService(useEntrypoint: true);
}
in your favorite language, ofc ๐
standard code here
->withServiceBinding('couchbase', $this->couchbase())
TIP: Jeremy used "dagger shell" to boot the service up, and check out the log files from couchbase ..
FYI: inside the couchbase container .. the logs live here
tail -f /opt/couchbase/var/lib/couchbase/logs/*.log
Hope this helps ?
@maiden pebble 8093 doesn't bind anything for me using docker run
ehh LOL
age 'couchbase:latest' locally
latest: Pulling from library/couchbase
6414378b6477: Pull complete
b66e4c8297c0: Pull complete
9ce06b3288eb: Pull complete
36ee6a894c26: Pull complete
de7451ade654: Pull complete
dac90a5eb80d: Pull complete
e0e05105422f: Pull complete
e9b19bb06f3c: Pull complete
7b714361da71: Pull complete
785dba9ba6ee: Pull complete
4f4fb700ef54: Pull complete
eaf02364dd30: Pull complete
Digest: sha256:1712f7ea984a17e98422d23cad535a24251fc59726720a535786ea4386dfae77
Status: Downloaded newer image for couchbase:latest
Starting Couchbase Server -- Web UI available at http://<ip>:8091
and logs available in /opt/couchbase/var/lib/couchbase/logs
marcos:tmp/lala $ telnet localhost 8093
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
WTF .. works totally fine for me and jeremy
which would explain why Dagger can't connect
what does your docker run command look like
docker run --rm -p 8093:8093 couchbase
Starting Couchbase Server -- Web UI available at http://<ip>:8091
and logs available in /opt/couchbase/var/lib/couchbase/logs
@worn patio pop open another terminal, and docker exec -ti <container_id> bash and then tail those logs
what do you see? errors wise ..
error.log is empty
it seems to be that couchbase doesn't bind to 8093 by default
at least in the default docker run setup
it does for me and jeremy .. works first time
nope, linux .. ubuntu
ok weird..
can you exec in the couchbase container
and run netstat -tpnl
to see if 8093 is listening?
I don't see it here
Look
^ it's not listening there
yep, i understand that yours isn't managing to bind to 8083
@maiden pebble what do you get with the netstat inside your couchbase container?
netstat -tpnl
se... 8093 is not being binded
yep
by the process inside the container
I think it's the way on how docker is configured in your machine
and how it's proxying the connection to the container
yes, but the process is not binding to that port ๐คทโโ๏ธ
I know, I see that
in any case, for Dagger it doesn't matter
because your service client can stil reach that port
WithServiceBinding is mostly for healthchecks
so if you leave WithServiceBinding 8091 you should be ok
Okay
This is the original code I'm converting
https://github.com/symfony/symfony/blob/7.3/.github/workflows/integration-tests.yml#L96-L103
This is extra stuff they're doing to Couchbase, to configure it, once it's up .. keep in mind it's connecting to 8091 to do that work ..
https://github.com/symfony/symfony/blob/7.3/.github/workflows/integration-tests.yml#L174-L179
I'm going to consider this a wild goose chase .. and that the original YML with 8093 isn't needed .. and only 8091 is needed.. and just move on
WDYT ?
@glad tapir foundt the root cause of this thread. Not a Dagger error
FYI:
yes, for Dagger that won't matter because the container that you bind the service will still be able to reach 8093 if needed
Fair enough .. makes sense
If something, down the line ends up needing 8093 (Query Service) then I'll bring back this conversation, but for now I can just delete the 8093 reference in the code.
sure, just let us know
@worn patio
this looks like a dagger core msg?
This is the original YML
https://github.com/symfony/symfony/blob/7.3/.github/workflows/integration-tests.yml#L104C1-L107C22
This is the new dagger code
looks identical to me ..
@maiden pebble asServicenow requires either WithDefualtArgs OR UseEntryoint in the asService method
yea, i just did useEntrypoint, and it worked ๐
๐
yes, every service where you're expecting to use the default entrypoint
FWIW we're revisiting this decision as we might change it really soon
I don't think you should make this default behavior, as docker run doesn't work like this .. docker run always defaults to the default defined entrypoint ..
Not great DX
just my opinion
there's a whole reason for that change that we're still refining some post-release feedback
yes, this makes sense. Some other users have already raised this concern as well. It's most likely we'll change this very soon
adopting dagger means taking people who know how docker works, and making it accessible via code .. so like-for-like to Docker behavior is important for adoption.
so postgres ..
this is CLI output - I can see WHY postgres is having problems .. however on the Dagger Cloud it doesn't actually show the error log details
curious why I can't see that stuff on my Trace ๐ค
https://dagger.cloud/dragoonis/traces/eef3d5c55a8bc01c751031168e22b1f7
I'm assuming you can see that trace, and see that the real Error message isn't being captured by your Tracing thingy? and not visible on Dagger Cloud
FYI โ๏ธ
@maiden pebble v3 improves that https://v3.dagger.cloud/dragoonis/traces/eef3d5c55a8bc01c751031168e22b1f7
since you're a Dagger power user, I'd suggest using v3 which has a bunch of these small things improved
How do I get v3? That's just the URL that my dagger CLI outputs on STDOUT
just append v3 to the dagger.cloud domain
I see it
v3.dagger.cloud
yes, but you can't click it from there I think ๐
yea, it didn't work, but I found the same trace on the V3 UI
THIS IS COOOOOOL
v3 for the win
yep, v3 is :neat:
How do I get my CLI to output the v3 URLs by default? ๐
๐
lol ๐