You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "see-quick (via GitHub)" <gi...@apache.org> on 2026/09/17 07:04:30 UTC

[PR] MINOR: Avoid ModuleNotFoundError when building without running docker tests [kafka]

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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Avoid ModuleNotFoundError when building without running docker tests [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #23490:
URL: https://github.com/apache/kafka/pull/23490


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org