Repository navigation
8000
a>
fix(docker_executor): explain the missing Docker daemon at startup - #87
Merged
Merged
Conversation
The Spark image pre-pull reported a missing Docker socket as a raw connection error. Report it as 'Docker is not reachable' with the two ways to opt out, and keep the existing warning for real pull failures. Document Docker as optional for pip installs.
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.
Closes #85
Summary
On a machine without Docker (a plain
pip installis the common case), startup logged:Nothing was wrong, but it read like a failure and gave no way out.
What changed
prewarm_spark_imagenow tells the cases apart:DockerException): logsDocker is not reachable (...); skipping the Spark image pre-pull. Spark job tasks need Docker (or set MINILAKE_JOB_EXECUTOR=subprocess). Set MINILAKE_SPARK_PREWARM=0 to silence this.APIError): keeps the existingFailed to pre-pull ...warning.except.The message stays a WARNING on purpose: the default log level is
WARNING(cli.py), so an INFO message would never be seen, and Spark job tasks really do fail without Docker.docs/getting-started.mdnow says Docker is optional forpipinstalls, anddocs/configuration.mdnotes thatMINILAKE_SPARK_PREWARM=0also silences this warning.Testing
Two tests in
tests/test_docker_executor.py: one for the no-daemon message (asserts the two opt-out settings are named and the old "Failed to pre-pull" text is absent), one for a pull failure that still warns.I could not run the Docker test suite locally (arm64 machine, amd64-only test image), so this relies on CI. I did exercise the real code path outside pytest with
DOCKER_HOSTpointing at a nonexistent socket, and the new message is what gets logged.ruff format,ruff checkand pre-commit pass.