Shivsundar R created KAFKA-19718:
------------------------------------

             Summary: docker_build_test.py does not run tests when using 
--kafka_archive.
                 Key: KAFKA-19718
                 URL: https://issues.apache.org/jira/browse/KAFKA-19718
             Project: Kafka
          Issue Type: Bug
            Reporter: Shivsundar R


When we want to run docker_sanity_test.py for a local image, we need to pass a 
local archive image via --kafka-archive to docker_build_test.py.
But currently it fails to run the test(docker_sanity_test.py) when we pass 
--kafka-archive.
Currently the tests run only when we pass a URL via --kafka-url.



 
{code:java}
Traceback (most recent call last):
  File "/Users/shivsundarr/dev/opensource/kafka/docker/docker_build_test.py", 
line 50, in run_docker_tests
    execute(["wget", "-nv", "-O", f"{temp_dir_path}/kafka.tgz", kafka_url])
  File "/Users/shivsundarr/dev/opensource/kafka/docker/common.py", line 24, in 
execute
    if subprocess.run(command).returncode != 0:
       ^^^^^^^^^^^^^^^^^^^^^^^
  File 
"/Users/shivsundarr/.pyenv/versions/3.12.7/lib/python3.12/subprocess.py", line 
548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"/Users/shivsundarr/.pyenv/versions/3.12.7/lib/python3.12/subprocess.py", line 
1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File 
"/Users/shivsundarr/.pyenv/versions/3.12.7/lib/python3.12/subprocess.py", line 
1885, in _execute_child
    self.pid = _fork_exec(
               ^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not NoneType
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/Users/shivsundarr/dev/opensource/kafka/docker/docker_build_test.py", 
line 85, in <module>
    run_docker_tests(args.image, args.tag, args.kafka_url, args.image_type)
  File "/Users/shivsundarr/dev/opensource/kafka/docker/docker_build_test.py", 
line 55, in run_docker_tests
    raise SystemError("Failed to run the tests")
SystemError: Failed to run the tests
{code}
This is because the code currently only allows kafka_url to be passed for 
running the tests.
{code:java}
def run_docker_tests(image, tag, kafka_url, image_type):{code}
We need to add another overloaded function which would take kafka_archive 
parameter instead of kafka_url.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to