fix(cli): run check deep-probes via docker run, not docker compose run#46
Merged
Conversation
`openmapx check` deep-probes failed on every service with "unknown flag: --network". The probe was issued through the dockerCompose() helper, but `docker compose run` has no --network flag and expects a service name rather than an image, so it never reached the ephemeral HTTP-client container. Switch the probe to a new dockerRun() helper (plain `docker run`), drop the compose-only --no-deps flag, and use a real pinned image (curlimages/curl:8.20.0; the previous alpine/wget:1.27.0 tag does not exist on Docker Hub). Extract buildProbeArgs() and cover it with tests.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pnpm openmapx checkreported every service asprobe-fail: unknown flag: --network. The deep-probe ran through thedockerCompose()helper, butdocker compose run(v2+) has no--networkflag and expects a service name, not an image — so the ephemeral HTTP-client container was never reachable. The probe image was alsoalpine/wget:1.27.0, a tag that doesn't exist on Docker Hub, so it could never have pulled even if the flag were accepted.This switches the probe to a new
dockerRun()helper (plaindocker run), drops the compose-only--no-depsflag, and uses a real pinned image (curlimages/curl:8.20.0). The probe-command assembly is extracted intobuildProbeArgs()and covered by unit tests that lock indocker run+--network+ a valid curl image.Verified on the staging host (Docker 29.4.1 / Compose v5.1.3): the new
docker run curlimages/curl:8.20.0 --network docker_openmapx -fsS --max-time 5 <url>form returns healthy responses for all probed services (valhalla, app-api, data-manager, photon, motis, tileserver, motis-feed-proxy).