confluentinc / ducktape

System integration and performance tests
10 stars 93 forks source link

Parse args from config files independently #395

Closed imcdo closed 8 months ago

imcdo commented 8 months ago

The Problem

Currently if you add any arguments in your config files that take n arguments, such as exclude, and you have no other arguments, these could potentially get merged with your test path arguments.

For example: .ducktape/config:

--exclude c/a_test.py, c/b_test.py

and you run:

ducktape c

the arg parse will interpret c as an additional argument to the exclude, so you will now be excluding all tests.

The Solution

Simply parse each set of args independently, then merge them into one combined group of args!

Testing

Unit test added, also tested with our system tests: Set config to:

--exclude systests/cluster/test_runner_operations.py::SimpleRunnerTest.timeout_test

and executed

ducktape systests/cluster/test_runner_operations.py --max-parallel 9000

which successfully ran our tests, in parallel.

cla-assistant[bot] commented 8 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

cla-assistant[bot] commented 8 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.