From e86d6577701c617179cccbe96bb5ec6216b51b57 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Tue, 14 May 2024 09:57:39 -0500 Subject: [PATCH 1/4] Revert "Run manual jobs with sequential executor by default (#757)" This reverts commit 4c2c5767d59b35bc9900e8925fecd3cddd6ab2fb. --- create_jenkins_job.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/create_jenkins_job.py b/create_jenkins_job.py index 10d811a7..67b93d16 100755 --- a/create_jenkins_job.py +++ b/create_jenkins_job.py @@ -191,7 +191,6 @@ def create_job(os_name, job_name, template_file, additional_dict): # configure manual triggered job create_job(os_name, 'ci_' + os_name, 'ci_job.xml.em', { 'cmake_build_type': 'None', - 'test_args_default': os_configs.get(os_name, {}).get('test_args_default', data['test_args_default']) + ' --executor sequential', }) # configure test jobs for experimenting with job config changes # Keep parameters the same as the manual triggered job above. @@ -295,7 +294,7 @@ def create_job(os_name, job_name, template_file, additional_dict): 'cmake_build_type': 'None', 'compile_with_clang_default': 'true', 'build_args_default': clang_libcxx_build_args, - 'test_args_default': clang_libcxx_test_args + ' --executor sequential', + 'test_args_default': clang_libcxx_test_args, }) # configure nightly job for testing rmw/rcl based packages with thread sanitizer on linux @@ -431,7 +430,7 @@ def create_job(os_name, job_name, template_file, additional_dict): 'build_args_default': data['build_args_default'] + ' --packages-skip qt_gui_cpp --packages-skip-by-dep qt_gui_cpp ' + '--packages-up-to ' + ' '.join(quality_level_pkgs + testing_pkgs_for_quality_level), 'test_args_default': data['test_args_default'] + ' --packages-skip qt_gui_cpp --packages-skip-by-dep qt_gui_cpp ' + - '--packages-up-to ' + ' '.join(quality_level_pkgs + testing_pkgs_for_quality_level) + ' --executor sequential', + '--packages-up-to ' + ' '.join(quality_level_pkgs + testing_pkgs_for_quality_level), }) create_job(os_name, 'test_' + os_name + '_coverage', 'ci_job.xml.em', { 'cmake_build_type': 'Debug', @@ -548,7 +547,6 @@ def create_job(os_name, job_name, template_file, additional_dict): job_data['label_expression'] = 'built-in || master' job_data['os_specific_data'] = os_specific_data job_data['cmake_build_type'] = 'None' - job_data['test_args_default'] += ' --executor sequential' job_data.update(retention_data_by_job_type(launcher_job_name)) job_config = expand_template('ci_launcher_job.xml.em', job_data) configure_job(jenkins, launcher_job_name, job_config, **jenkins_kwargs) From b23f8b0c702de7cc0024730189b9579d8ad45fed Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Tue, 14 May 2024 15:20:09 -0500 Subject: [PATCH 2/4] Use sequential executor for testing Humble and Iron --- linux_docker_resources/Dockerfile | 6 ++++++ linux_docker_resources/Dockerfile-RHEL | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/linux_docker_resources/Dockerfile b/linux_docker_resources/Dockerfile index ad1331a9..0ac8bd6c 100644 --- a/linux_docker_resources/Dockerfile +++ b/linux_docker_resources/Dockerfile @@ -213,6 +213,12 @@ RUN apt-get update && apt-get install -y \ libacl1-dev \ libncurses5-dev +# Set default arguments for colcon +RUN mkdir -p /etc/colcon && echo "---\n\ +test:\n\ +$(if test \( ${ROS_DISTRO} = humble -o ${ROS_DISTRO} = iron \); then echo ' executor: sequential\\n'; fi)\ +" > /etc/colcon/defaults.yaml + # After all packages are installed, update ccache symlinks (see ros2/ci#326). # This command is supposed to be invoked whenever a new compiler is installed # but that isn't happening. So we invoke it here to make sure all compilers are diff --git a/linux_docker_resources/Dockerfile-RHEL b/linux_docker_resources/Dockerfile-RHEL index 8ff73b1e..1164a37c 100644 --- a/linux_docker_resources/Dockerfile-RHEL +++ b/linux_docker_resources/Dockerfile-RHEL @@ -197,6 +197,12 @@ ADD rti_web_binaries_install_script.py /tmp/rti_web_binaries_install_script.py # Add the RTI license file. ADD rticonnextdds-license/rti_license.dat /tmp/rti_license.dat +# Set default arguments for colcon +RUN mkdir -p /etc/colcon && echo "---\n\ +test:\n\ +$(if test \( ${ROS_DISTRO} = humble -o ${ROS_DISTRO} = iron \); then echo ' executor: sequential\\n'; fi)\ +" > /etc/colcon/defaults.yaml + # automatic invalidation once every day. RUN echo "@today_str" RUN dnf update --refresh -y From b5caf4dda4fb8037a5fd366b771ed2780698c171 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Thu, 16 May 2024 16:47:51 -0500 Subject: [PATCH 3/4] Revert "Use sequential executor for testing Humble and Iron" This reverts commit b23f8b0c702de7cc0024730189b9579d8ad45fed. --- linux_docker_resources/Dockerfile | 6 ------ linux_docker_resources/Dockerfile-RHEL | 6 ------ 2 files changed, 12 deletions(-) diff --git a/linux_docker_resources/Dockerfile b/linux_docker_resources/Dockerfile index 0ac8bd6c..ad1331a9 100644 --- a/linux_docker_resources/Dockerfile +++ b/linux_docker_resources/Dockerfile @@ -213,12 +213,6 @@ RUN apt-get update && apt-get install -y \ libacl1-dev \ libncurses5-dev -# Set default arguments for colcon -RUN mkdir -p /etc/colcon && echo "---\n\ -test:\n\ -$(if test \( ${ROS_DISTRO} = humble -o ${ROS_DISTRO} = iron \); then echo ' executor: sequential\\n'; fi)\ -" > /etc/colcon/defaults.yaml - # After all packages are installed, update ccache symlinks (see ros2/ci#326). # This command is supposed to be invoked whenever a new compiler is installed # but that isn't happening. So we invoke it here to make sure all compilers are diff --git a/linux_docker_resources/Dockerfile-RHEL b/linux_docker_resources/Dockerfile-RHEL index 1164a37c..8ff73b1e 100644 --- a/linux_docker_resources/Dockerfile-RHEL +++ b/linux_docker_resources/Dockerfile-RHEL @@ -197,12 +197,6 @@ ADD rti_web_binaries_install_script.py /tmp/rti_web_binaries_install_script.py # Add the RTI license file. ADD rticonnextdds-license/rti_license.dat /tmp/rti_license.dat -# Set default arguments for colcon -RUN mkdir -p /etc/colcon && echo "---\n\ -test:\n\ -$(if test \( ${ROS_DISTRO} = humble -o ${ROS_DISTRO} = iron \); then echo ' executor: sequential\\n'; fi)\ -" > /etc/colcon/defaults.yaml - # automatic invalidation once every day. RUN echo "@today_str" RUN dnf update --refresh -y From 1ef55d7711ff3b85ce4c1e56f4bb211e665e575f Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Thu, 16 May 2024 16:48:31 -0500 Subject: [PATCH 4/4] Default to sequential execution for tests on Humble/Iron --- ros2_batch_job/__main__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ros2_batch_job/__main__.py b/ros2_batch_job/__main__.py index 832b8941..fa93f772 100644 --- a/ros2_batch_job/__main__.py +++ b/ros2_batch_job/__main__.py @@ -359,7 +359,11 @@ def build_and_test(args, job, colcon_script): test_cmd.append('--pytest-with-coverage') test_cmd.extend(args.test_args) - ret_test = job.run(test_cmd, exit_on_error=False, shell=True) + test_env = dict(os.environ) + if args.ros_distro in ('humble', 'iron'): + test_env['COLCON_DEFAULT_EXECUTOR'] = 'sequential' + + ret_test = job.run(test_cmd, exit_on_error=False, shell=True, env=test_env) info("colcon test returned: '{0}'".format(ret_test)) print('# END SUBSECTION') if ret_test: