You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/05 22:43:13 UTC
[GitHub] [airflow] potiuk commented on a diff in pull request #23715: breeze test parallel
potiuk commented on code in PR #23715:
URL: https://github.com/apache/airflow/pull/23715#discussion_r889745581
##########
dev/breeze/src/airflow_breeze/commands/testing_commands.py:
##########
@@ -112,6 +117,49 @@ def docker_compose_tests(
sys.exit(return_code)
+def run_tests(
+ shell_params: ShellParams, dry_run: bool, verbose: bool, extra_pytest_args: Tuple
+) -> Tuple[int, str]:
+ env_variables = get_env_variables_for_docker_commands(shell_params)
+ perform_environment_checks(verbose=verbose)
+ cmd = ['docker-compose', 'run', '--service-ports', '--rm', 'airflow']
+ cmd.extend(list(extra_pytest_args))
+ test_result = run_command(
+ cmd,
+ verbose=verbose,
+ dry_run=dry_run,
+ env=env_variables,
+ )
+ return (
+ test_result.returncode,
+ f"Running tests for Python {shell_params.python}",
+ )
+
+
+def run_tests_in_parallel(
+ shell_params_list: List[ShellParams],
+ python_version_list: List[str],
+ parallelism: int,
+ dry_run: bool,
+ verbose: bool,
+):
+ """Run tests in parallel"""
+ get_console().print(
+ f"\n[info]Running tests with parallelism = {parallelism} "
+ f"for the python versions: {python_version_list}[/]"
+ )
+ pool = mp.Pool(parallelism)
Review Comment:
We don't need those more options, really. We used to use "gnu parallell" which was also a parallell combo but adding it caused enormous complexity - because what we essentially need is to run n jobs in parallel and wait for them.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org