acoustic-carpenter-78188
11/17/2023, 8:38 PMpytest-xdist
allows us to run the tests in parallel, which speeds up local development and the CI. GitHub actions allocates 2 cores per runner. With pytest -n
I get the follow runtimes locally:
• 1 core (default): 121 seconds
• 2 cores: 80 seconds
• 4 cores: 48 seconds
The issue is that 4 tests fail. If we adjusts these tests, then we can get pytest-xdist
working.
FAILED tests/flytekit/unit/core/test_conditions.py::test_condition_tuple_branches - AssertionError: assert '__channelexe...tions.sum_sub' == 'tests.flytek...tions.sum_sub'
FAILED tests/flytekit/unit/core/test_type_hints.py::test_error_messages - AssertionError: Regex pattern did not match.
FAILED tests/flytekit/unit/core/test_type_hints.py::test_union_type - AssertionError: Regex pattern did not match.
FAILED tests/flytekit/unit/core/test_workflows.py::test_wf_nested_comp - AssertionError: assert '__channelexe..._workflows.t1' == 'tests.flytek..._workflows.t1'
What if we do not do this?
We would not be taking advantage of all the CI compute and local compute for development.
Related component(s)
flytekit
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyteacoustic-carpenter-78188
11/17/2023, 8:38 PM