You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I ran into a very strange bug. After hours of debugging I have narrowed down the issue to our use of cargo make.
We use ssh agent forwarding with Docker Compose when building our server. This allows our cargo build job to have access to our ssh agent when building our server in Docker. This is needed as our server depends on private Github Rust dependencies.
We use cargo-make to define our server start task as such (we use foo to hide acutal name of our server):
# Start a foo server in the background
[tasks.start]
command = "docker"
args = ["compose", "up",
"--build", "postgres", "nginx", "foo_server", "foo_client_auth", "foo_nginx",
"--wait",
]
Calling the command manually e.g. docker compose up ... always works. However calling the command via this cargo-make task definition e.g. cargo make start fails most of the time with an error of cargo not being able to access the ssh agent. The strange part is that this behavior is intermittent. Calling cargo make start enough times causes it to randomly succeed sometimes.
I don't see how cargo-make could possible be the issue, but after exhausting every other possibility, I narrowed it down to cargo-make as the culprit. I'm guessing there is some Docker bug that only manifests when being ran as a sub-process... but who knows.
I don't expect this bug to be looked at, as our issue is extremely specific and involves several technologies working together: cargo, ssh-agent, Docker, docker compose, etc. But I wanted to document this somewhere in case anyone else ever runs into it and tries searching for it.
Btw: We love cargo-make! This is an awesome utility.
The text was updated successfully, but these errors were encountered:
Describe The Bug
Hello, I ran into a very strange bug. After hours of debugging I have narrowed down the issue to our use of cargo make.
We use ssh agent forwarding with Docker Compose when building our server. This allows our
cargo build
job to have access to our ssh agent when building our server in Docker. This is needed as our server depends on private Github Rust dependencies.We use cargo-make to define our server start task as such (we use
foo
to hide acutal name of our server):Calling the command manually e.g.
docker compose up ...
always works. However calling the command via this cargo-make task definition e.g.cargo make start
fails most of the time with an error of cargo not being able to access the ssh agent. The strange part is that this behavior is intermittent. Callingcargo make start
enough times causes it to randomly succeed sometimes.I don't see how cargo-make could possible be the issue, but after exhausting every other possibility, I narrowed it down to cargo-make as the culprit. I'm guessing there is some Docker bug that only manifests when being ran as a sub-process... but who knows.
I don't expect this bug to be looked at, as our issue is extremely specific and involves several technologies working together: cargo, ssh-agent, Docker, docker compose, etc. But I wanted to document this somewhere in case anyone else ever runs into it and tries searching for it.
Btw: We love cargo-make! This is an awesome utility.
The text was updated successfully, but these errors were encountered: