see-quick opened a new pull request, #23490: URL: https://github.com/apache/kafka/pull/23490
`docker_build_test.py` imports test.docker_sanity_test at module scope, which pulls in `pytest`, and that happens even under --build. So building an image fails with `ModuleNotFoundError` on an environment that has only the build dependencies installed, despite the flag being documented as "Only build the image, don't run tests", and docker_official_image_build_test.py inherits the same failure through its import of run_docker_tests. Moving the import into run_docker_tests, its only call site, leaves the build path needing only what building actually requires. The error is: ``` ... [2026-09-16T16:38:09.537Z] File "".../KAFKA/docker/test/docker_sanity_test.py", line 22, in <module> [2026-09-16T16:38:09.537Z] import pytest [2026-09-16T16:38:09.537Z] ModuleNotFoundError: No module named 'pytest' ... ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
