From 8a3e7b7daf2c732d0eed62c1fc30678cfd5e1147 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Wed, 28 Jan 2026 20:26:30 -1000 Subject: [PATCH 01/15] Updated Makeflow logger --- tests/test_helpers.py | 8 +- .../test_translators_loggers.py | 23 ++-- wfcommons/wfinstances/logs/makeflow.py | 104 ++++++++++-------- 3 files changed, 75 insertions(+), 60 deletions(-) diff --git a/tests/test_helpers.py b/tests/test_helpers.py index af549278..3458ca80 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -123,16 +123,16 @@ def _get_total_size_of_directory(directory_path: str): total_size += os.path.getsize(filepath) return total_size -def _compare_workflows(workflow1: Workflow, workflow_2: Workflow): +def _compare_workflows(workflow_1: Workflow, workflow_2: Workflow): # Test the number of tasks - assert (len(workflow1.tasks) == len(workflow_2.tasks)) + assert (len(workflow_1.tasks) == len(workflow_2.tasks)) # Test the task graph topology - assert (networkx.is_isomorphic(workflow1, workflow_2)) + assert (networkx.is_isomorphic(workflow_1, workflow_2)) # Test the total file size sum workflow1_input_bytes, workflow2_input_bytes = 0, 0 workflow1_output_bytes, workflow2_output_bytes = 0, 0 - for workflow1_task, workflow2_task in zip(workflow1.tasks.values(), workflow_2.tasks.values()): + for workflow1_task, workflow2_task in zip(workflow_1.tasks.values(), workflow_2.tasks.values()): # sys.stderr.write(f"WORKFLOW1: {workflow1_task.task_id} WORKFLOW2 TASK: {workflow2_task.task_id}\n") for input_file in workflow1_task.input_files: # sys.stderr.write(f"WORKFLOW1 INPUT FILE: {input_file.file_id} {input_file.size}\n") diff --git a/tests/translators_loggers/test_translators_loggers.py b/tests/translators_loggers/test_translators_loggers.py index 1be31b9a..74ae661e 100644 --- a/tests/translators_loggers/test_translators_loggers.py +++ b/tests/translators_loggers/test_translators_loggers.py @@ -38,6 +38,7 @@ from wfcommons.wfinstances import PegasusLogsParser from wfcommons.wfinstances.logs import TaskVineLogsParser +from wfcommons.wfinstances.logs import MakeflowLogsParser def _create_workflow_benchmark() -> (WorkflowBenchmark, int): @@ -165,7 +166,7 @@ def run_workflow_taskvine(container, num_tasks, str_dirpath): def run_workflow_makeflow(container, num_tasks, str_dirpath): # Run the workflow (with full logging) - exit_code, output = container.exec_run(cmd=["bash", "-c", "source ~/conda/etc/profile.d/conda.sh && conda activate && makeflow --log-verbose ./workflow.makeflow"], stdout=True, stderr=True) + exit_code, output = container.exec_run(cmd=["bash", "-c", "source ~/conda/etc/profile.d/conda.sh && conda activate && makeflow --log-verbose --monitor=./monitor_data/ ./workflow.makeflow"], stdout=True, stderr=True) # Check sanity assert (exit_code == 0) num_completed_jobs = len(re.findall(r'job \d+ completed', output.decode())) @@ -229,16 +230,16 @@ class TestTranslators: @pytest.mark.parametrize( "backend", [ - "swiftt", - "dask", - "parsl", - "nextflow", - "airflow", - "bash", - "taskvine", + # "swiftt", + # "dask", + # "parsl", + # "nextflow", + # "airflow", + # "bash", + # "taskvine", "makeflow", - "cwl", - "pegasus", + # "cwl", + # "pegasus", ]) @pytest.mark.unit # @pytest.mark.skip(reason="tmp") @@ -274,6 +275,8 @@ def test_translator(self, backend) -> None: parser = PegasusLogsParser(dirpath / "work/wfcommons/pegasus/Blast-Benchmark/run0001/") elif backend == "taskvine": parser = TaskVineLogsParser(dirpath / "vine-run-info/most-recent/vine-logs", filenames_to_ignore=["cpu-benchmark","stress-ng", "wfbench"]) + elif backend == "makeflow": + parser = MakeflowLogsParser(execution_dir = dirpath, resource_monitor_logs_dir = dirpath / "monitor_data/") else: parser = None diff --git a/wfcommons/wfinstances/logs/makeflow.py b/wfcommons/wfinstances/logs/makeflow.py index 88f3b0dc..8306fc0d 100644 --- a/wfcommons/wfinstances/logs/makeflow.py +++ b/wfcommons/wfinstances/logs/makeflow.py @@ -28,9 +28,9 @@ class MakeflowLogsParser(LogsParser): """ Parse Makeflow submit directory to generate workflow instance. - :param execution_dir: Makeflow workflow execution directory (contains .mf and .makeflowlog files). + :param execution_dir: Makeflow workflow execution directory (contains .mf/.makeflow and .makeflowlog files). :type execution_dir: pathlib.Path - :param resource_monitor_logs_dir: Resource Monitor log files directory. + :param resource_monitor_logs_dir: Resource Monitor log files directory (created with `makeflow ----monitor=... ...`) :type resource_monitor_logs_dir: pathlib.Path :param description: Workflow instance description. :type description: Optional[str] @@ -46,28 +46,38 @@ def __init__(self, """Create an object of the makeflow log parser.""" super().__init__('Makeflow', 'http://ccl.cse.nd.edu/software/makeflow/', description, logger) - # Sanity check + # Sanity checks if not execution_dir.is_dir(): raise OSError(f'The provided path does not exist or is not a folder: {execution_dir}') + if not resource_monitor_logs_dir.is_dir(): + raise OSError(f'The provided path does not exist or is not a folder: {resource_monitor_logs_dir}') + # Makeflow file files: List[pathlib.Path] = list(execution_dir.glob('*.mf')) + if len(files) > 1: + raise OSError(f'Multiple .mf files in: {execution_dir}') if len(files) == 0: - raise OSError(f'Unable to find .mf file in: {execution_dir}') + files: List[pathlib.Path] = list(execution_dir.glob('*.makeflow')) + if len(files) > 1: + raise OSError(f'Multiple .makeflow files in: {execution_dir}') + if len(files) == 0: + raise OSError(f'Unable to find a .mf or .makeflow file in: {execution_dir}') self.mf_file: pathlib.Path = files[0] + # Log file files = list(execution_dir.glob('*.makeflowlog')) if len(files) == 0: raise OSError(f'Unable to find .makeflowlog file in: {execution_dir}') + if len(files) > 1: + raise OSError(f'Multiple .makeflowlog files in: {execution_dir}') self.mf_log_file: pathlib.Path = files[0] + if self.mf_log_file.read_text().count("# NODE") == 0: + raise OSError(f'Not sufficiently verbose log file {self.mf_log_file}. Re-run the workflow with `makeflow --log-verbose ...`') - if not resource_monitor_logs_dir.is_dir(): - raise OSError(f'The provided path does not exist or is not a folder: {resource_monitor_logs_dir}') - - self.execution_dir: pathlib.Path = execution_dir - - self.resource_monitor_logs_dir: pathlib.Path = resource_monitor_logs_dir - self.files_map = {} - self.args_map = {} + self._execution_dir: pathlib.Path = execution_dir + self._resource_monitor_logs_dir: pathlib.Path = resource_monitor_logs_dir + self._files_map = {} + self._args_map = {} def build_workflow(self, workflow_name: Optional[str] = None) -> Workflow: """ @@ -106,30 +116,31 @@ def _parse_workflow_file(self) -> None: outputs = [] inputs = [] for line in f: - if ':' in line: + # print(f"Processing line: {line}") + if line.lstrip().startswith('#'): + continue + if ':' in line and '\t' not in line: outputs = line.split(':')[0].split() inputs = line.split(':')[1].split() for file in itertools.chain(outputs, inputs): - if file not in self.files_map: - self.files_map[file] = {'task_name': None, 'children': [], 'file': []} + if file not in self._files_map: + self._files_map[file] = {'task_name': None, 'children': [], 'file': []} - elif len(line.strip()) > 0: - # task execution command - prefix = line.replace('./', '').replace('perl', '').strip().split()[1 if 'LOCAL' in line else 0] - task_name = "{}_ID{:07d}".format(prefix, task_id_counter) + elif '\t' in line: + # task execution command (likely olf here) + prefix = line.replace('./', '').strip().split()[1 if 'LOCAL' in line else 0] + task_name = "ID{:07d}".format(task_id_counter) - # create list of task files - list_files = [] + # create list of input and output files output_files = self._create_files(outputs, "output", task_name) input_files = self._create_files(inputs, "input", task_name) # create task - args = ' '.join(line.replace('LOCAL', '').replace('perl', '').strip().split()) + args = ' '.join(line.split()) task = Task(name=task_name, - task_id="ID{:07d}".format(task_id_counter), + task_id=task_name, category=prefix, - task_type=TaskType.COMPUTE, runtime=0, program=prefix, args=args.split(), @@ -137,15 +148,16 @@ def _parse_workflow_file(self) -> None: input_files=input_files, output_files=output_files, logger=self.logger) - self.workflow.add_node(task_name, task=task) - self.args_map[args] = task + self.workflow.add_task(task) + args = args.replace('\\\\', '\\') + self._args_map[args] = task task_id_counter += 1 # adding edges - for file in self.files_map: - for child in self.files_map[file]['children']: - if self.files_map[file]['task_name']: - self.workflow.add_edge(self.files_map[file]['task_name'], child) + for file in self._files_map: + for child in self._files_map[file]['children']: + if self._files_map[file]['task_name']: + self.workflow.add_edge(self._files_map[file]['task_name'], child) def _create_files(self, files_list: List[str], input_or_output: str, task_name: str) -> List[File]: """ @@ -163,16 +175,16 @@ def _create_files(self, files_list: List[str], input_or_output: str, task_name: """ list_files = [] for file in files_list: - if self.files_map[file]['file']: + if self._files_map[file]['file']: list_files.append( - self.files_map[file]['file'][0] if input_or_output == "input" else self.files_map[file]['file'][1]) + self._files_map[file]['file'][0] if input_or_output == "input" else self._files_map[file]['file'][1]) else: size = 0 - file_path = self.execution_dir.joinpath(file) + file_path = self._execution_dir.joinpath(file) if file_path.is_dir(): - size = sum(math.ceil(f.stat().st_size / 1000) for f in file_path.glob("*") if f.is_file()) + size = sum(f.stat().st_size for f in file_path.glob("*") if f.is_file()) elif file_path.is_file(): - size = int(math.ceil(file_path.stat().st_size / 1000)) # B to KB + size = int(file_path.stat().st_size) file_obj_in = File(file_id=file, size=size, @@ -181,13 +193,13 @@ def _create_files(self, files_list: List[str], input_or_output: str, task_name: size=size, logger=self.logger) list_files.append(file_obj_in if input_or_output == "input" else file_obj_out) - self.files_map[file]['file'].extend([file_obj_in, file_obj_out]) + self._files_map[file]['file'].extend([file_obj_in, file_obj_out]) # files dependencies if input_or_output == "input": - self.files_map[file]['children'].append(task_name) + self._files_map[file]['children'].append(task_name) else: - self.files_map[file]['task_name'] = task_name + self._files_map[file]['task_name'] = task_name return list_files @@ -208,24 +220,24 @@ def _parse_makeflow_log_file(self): elif line.startswith('# FILE') and 'condorlog' not in line: file_name = line.split()[3] - if file_name in self.files_map: - size = int(math.ceil(int(line.split()[5]) / 1000)) # B to KB - for file_obj in self.files_map[file_name]['file']: + if file_name in self._files_map: + size = int(line.split()[5]) + for file_obj in self._files_map[file_name]['file']: file_obj.size = size def _parse_resource_monitor_logs(self): """Parse the log files produced by resource monitor""" - for file in pathlib.Path.glob(f'{self.resource_monitor_logs_dir}/*.summary'): + for file in self._resource_monitor_logs_dir.glob("*.summary"): with open(file) as f: data = json.load(f) # task - task = self.args_map[data['command'].replace('perl', '').strip()] + task = self._args_map[data['command'].replace('perl', '').strip()] task.runtime = float(data['wall_time'][0]) task.cores = float(data['cores'][0]) - task.memory = int(data['memory'][0]) * 1000 # MB to KB - task.bytes_read = int(data['bytes_read'][0] * 1000) # MB to KB - task.bytes_written = int(data['bytes_written'][0] * 1000) # MB to KB + task.memory = int(data['memory'][0]) + task.bytes_read = int(data['bytes_read'][0]) + task.bytes_written = int(data['bytes_written'][0]) task.avg_cpu = float('%.4f' % (float(data['cpu_time'][0]) / float(data['wall_time'][0]) * 100)) task.machine = Machine(name=data['host'], cpu={'coreCount': int(data['machine_cpus'][0]), 'speedInMHz': 0, 'vendor': ''}, From 1fed32ceec4cd8a6f618537206874d51473124c0 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Wed, 28 Jan 2026 20:31:30 -1000 Subject: [PATCH 02/15] re-enabling all tests --- .../test_translators_loggers.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/translators_loggers/test_translators_loggers.py b/tests/translators_loggers/test_translators_loggers.py index 74ae661e..c5c8b9bf 100644 --- a/tests/translators_loggers/test_translators_loggers.py +++ b/tests/translators_loggers/test_translators_loggers.py @@ -230,16 +230,16 @@ class TestTranslators: @pytest.mark.parametrize( "backend", [ - # "swiftt", - # "dask", - # "parsl", - # "nextflow", - # "airflow", - # "bash", - # "taskvine", + "swiftt", + "dask", + "parsl", + "nextflow", + "airflow", + "bash", + "taskvine", "makeflow", - # "cwl", - # "pegasus", + "cwl", + "pegasus", ]) @pytest.mark.unit # @pytest.mark.skip(reason="tmp") From 3c2623aff1ffece404770e17adecd98f384b06bf Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Thu, 29 Jan 2026 09:46:12 -1000 Subject: [PATCH 03/15] Updated test helpers to force a cpu-benchmark rebuild, via an ugly in-place rewrite of setup.py --- tests/test_helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 3458ca80..d23d8596 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -42,13 +42,15 @@ def _install_WfCommons_on_container(container): # Cleanup files from the host exit_code, output = container.exec_run("sudo /bin/rm -rf /tmp/WfCommons/build/", stdout=True, stderr=True) exit_code, output = container.exec_run("sudo /bin/rm -rf /tmp/WfCommons/*.egg-info/", stdout=True, stderr=True) + # Clean up and force a rebuild of cpu-benchmark (because it may be compiled for the wrong architecture) exit_code, output = container.exec_run("sudo /bin/rm -rf /tmp/WfCommons/bin/cpu-benchmark.o", stdout=True, stderr=True) exit_code, output = container.exec_run("sudo /bin/rm -rf /tmp/WfCommons/bin/cpu-benchmark", stdout=True, stderr=True) + exit_code, output = container.exec_run(r"sudo sed -i 's|if os.path.exists(cpu_benchmark_path):|if True:|' /tmp/WfCommons/setup.py") # Install WfCommons on the container (to install wfbench and cpu-benchmark really) - exit_code, output = container.exec_run("sudo python3 -m pip install . --break-system-packages", + exit_code, output = container.exec_run("sudo python3 -m pip install -v . --break-system-packages", workdir="/tmp/WfCommons", stdout=True, stderr=True) if exit_code != 0: raise RuntimeError("Failed to install WfCommons on the container") @@ -88,6 +90,7 @@ def _start_docker_container(backend, mounted_dir, working_dir, bin_dir, command= stdout=True, stderr=True) if exit_code != 0: raise RuntimeError("Failed to copy wfbench script to the bin directory") + exit_code, output = container.exec_run(["sh", "-c", "sudo cp -f `which cpu-benchmark` " + bin_dir], stdout=True, stderr=True) if exit_code != 0: From af18065f2b4d8cbf2aafed0a8f6c05063390eea1 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Thu, 29 Jan 2026 13:32:31 -1000 Subject: [PATCH 04/15] comment++ --- tests/test_helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_helpers.py b/tests/test_helpers.py index d23d8596..eebe094e 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -39,7 +39,7 @@ def _install_WfCommons_on_container(container): target_path = '/tmp/' # inside container tar_data = _make_tarfile_of_wfcommons() container.put_archive(target_path, tar_data) - # Cleanup files from the host + # Cleanup files that came from the host exit_code, output = container.exec_run("sudo /bin/rm -rf /tmp/WfCommons/build/", stdout=True, stderr=True) exit_code, output = container.exec_run("sudo /bin/rm -rf /tmp/WfCommons/*.egg-info/", stdout=True, stderr=True) # Clean up and force a rebuild of cpu-benchmark (because it may be compiled for the wrong architecture) @@ -52,6 +52,7 @@ def _install_WfCommons_on_container(container): # Install WfCommons on the container (to install wfbench and cpu-benchmark really) exit_code, output = container.exec_run("sudo python3 -m pip install -v . --break-system-packages", workdir="/tmp/WfCommons", stdout=True, stderr=True) + # print(output.decode()) if exit_code != 0: raise RuntimeError("Failed to install WfCommons on the container") From bf8d74fa799321ec1b57341aa0e0e8f8558940fd Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Thu, 29 Jan 2026 13:48:09 -1000 Subject: [PATCH 05/15] tweak --- tests/test_helpers.py | 2 +- .../test_translators_loggers.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/test_helpers.py b/tests/test_helpers.py index eebe094e..d1c99a82 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -50,7 +50,7 @@ def _install_WfCommons_on_container(container): exit_code, output = container.exec_run(r"sudo sed -i 's|if os.path.exists(cpu_benchmark_path):|if True:|' /tmp/WfCommons/setup.py") # Install WfCommons on the container (to install wfbench and cpu-benchmark really) - exit_code, output = container.exec_run("sudo python3 -m pip install -v . --break-system-packages", + exit_code, output = container.exec_run("sudo python3 -m pip install . --break-system-packages", workdir="/tmp/WfCommons", stdout=True, stderr=True) # print(output.decode()) if exit_code != 0: diff --git a/tests/translators_loggers/test_translators_loggers.py b/tests/translators_loggers/test_translators_loggers.py index c5c8b9bf..47ad7f33 100644 --- a/tests/translators_loggers/test_translators_loggers.py +++ b/tests/translators_loggers/test_translators_loggers.py @@ -230,16 +230,16 @@ class TestTranslators: @pytest.mark.parametrize( "backend", [ - "swiftt", - "dask", + # "swiftt", + # "dask", "parsl", - "nextflow", - "airflow", - "bash", - "taskvine", - "makeflow", - "cwl", - "pegasus", + # "nextflow", + # "airflow", + # "bash", + # "taskvine", + # "makeflow", + # "cwl", + # "pegasus", ]) @pytest.mark.unit # @pytest.mark.skip(reason="tmp") From 4718b3265435593284cf6caf40b977af26c507f3 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Thu, 29 Jan 2026 14:28:49 -1000 Subject: [PATCH 06/15] temporarily disabling parsl testing --- .../test_translators_loggers.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/translators_loggers/test_translators_loggers.py b/tests/translators_loggers/test_translators_loggers.py index 47ad7f33..3225068c 100644 --- a/tests/translators_loggers/test_translators_loggers.py +++ b/tests/translators_loggers/test_translators_loggers.py @@ -230,16 +230,16 @@ class TestTranslators: @pytest.mark.parametrize( "backend", [ - # "swiftt", - # "dask", - "parsl", - # "nextflow", - # "airflow", - # "bash", - # "taskvine", - # "makeflow", - # "cwl", - # "pegasus", + "swiftt", + "dask", + # "parsl", + "nextflow", + "airflow", + "bash", + "taskvine", + "makeflow", + "cwl", + "pegasus", ]) @pytest.mark.unit # @pytest.mark.skip(reason="tmp") From 5dc466efb86719ea82f87f8745bbda03c3967559 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Thu, 29 Jan 2026 15:14:07 -1000 Subject: [PATCH 07/15] leaving only a couple of backends for testing --- .../test_translators_loggers.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/translators_loggers/test_translators_loggers.py b/tests/translators_loggers/test_translators_loggers.py index 3225068c..01e3c675 100644 --- a/tests/translators_loggers/test_translators_loggers.py +++ b/tests/translators_loggers/test_translators_loggers.py @@ -230,16 +230,16 @@ class TestTranslators: @pytest.mark.parametrize( "backend", [ - "swiftt", - "dask", + # "swiftt", + # "dask", # "parsl", - "nextflow", - "airflow", + # "nextflow", + # "airflow", "bash", - "taskvine", - "makeflow", + # "taskvine", + # "makeflow", "cwl", - "pegasus", + # "pegasus", ]) @pytest.mark.unit # @pytest.mark.skip(reason="tmp") From 67cc4a1e67746ec67bb69dee86461412060e0100 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Thu, 29 Jan 2026 17:11:43 -1000 Subject: [PATCH 08/15] Disabling test backends that seem to, suddenly, suffer from permission errors. (in spite of making the translation directory world-writable). --- tests/test_helpers.py | 5 +++++ tests/translators_loggers/test_translators_loggers.py | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/test_helpers.py b/tests/test_helpers.py index d1c99a82..cf8d0d71 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -99,6 +99,11 @@ def _start_docker_container(backend, mounted_dir, working_dir, bin_dir, command= else: sys.stderr.write(f"[{backend}] Not Copying wfbench and cpu-benchmark...\n") + # Change file permissions + exit_code, output = container.exec_run(["sh", "-c", "sudo chown -R wfcommons:wfcommons "], + stdout=True, stderr=True) + + container.backend = backend return container diff --git a/tests/translators_loggers/test_translators_loggers.py b/tests/translators_loggers/test_translators_loggers.py index 01e3c675..abda09c7 100644 --- a/tests/translators_loggers/test_translators_loggers.py +++ b/tests/translators_loggers/test_translators_loggers.py @@ -15,6 +15,7 @@ import json import time import re +import os from tests.test_helpers import _create_fresh_local_dir from tests.test_helpers import _remove_local_dir_if_it_exists @@ -230,11 +231,11 @@ class TestTranslators: @pytest.mark.parametrize( "backend", [ - # "swiftt", - # "dask", + "swiftt", + "dask", # "parsl", # "nextflow", - # "airflow", + "airflow", "bash", # "taskvine", # "makeflow", @@ -258,6 +259,10 @@ def test_translator(self, backend) -> None: translator = translator_classes[backend](benchmark.workflow) translator.translate(output_folder=dirpath) + # Make the directory that holds the translation world-writable, + # so that docker commands won't fail + os.chmod(dirpath, 0o777) + # Start the Docker container container = _start_docker_container(backend, str_dirpath, str_dirpath, str_dirpath + "bin/") From c19123f15ad2cb2714376da53ceb024d0b0b4bd9 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Thu, 29 Jan 2026 17:35:59 -1000 Subject: [PATCH 09/15] Remove all but one translator Added debug info to see what's wrong on the GitHub Runner It has to do with cpu-benchmark (again!) --- .github/workflows/build.yml | 4 ++-- .../translators_loggers/test_translators_loggers.py | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e0618644..82e543ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ "3.11", "3.12", "3.13", "3.14" ] + python-version: [ "3.14" ] steps: - uses: actions/checkout@v4 @@ -37,7 +37,7 @@ jobs: pip install . - name: Run tests - run: python3 -m pytest -s -v -m unit --cov=wfcommons tests/ + run: python3 -m pytest -s -v -m unit --cov=wfcommons tests/translators_loggers - name: Upload coverage if: github.ref == 'refs/heads/main' diff --git a/tests/translators_loggers/test_translators_loggers.py b/tests/translators_loggers/test_translators_loggers.py index abda09c7..76081863 100644 --- a/tests/translators_loggers/test_translators_loggers.py +++ b/tests/translators_loggers/test_translators_loggers.py @@ -231,15 +231,15 @@ class TestTranslators: @pytest.mark.parametrize( "backend", [ - "swiftt", - "dask", + # "swiftt", + # "dask", # "parsl", # "nextflow", - "airflow", + # "airflow", "bash", # "taskvine", # "makeflow", - "cwl", + # "cwl", # "pegasus", ]) @pytest.mark.unit @@ -257,6 +257,10 @@ def test_translator(self, backend) -> None: # Perform the translation sys.stderr.write(f"\n[{backend}] Translating workflow...\n") translator = translator_classes[backend](benchmark.workflow) + sys.stderr.write("Checking that cpu-benchmark is in the path") + sys.stderr.write(f"{shutil.which('cpu-benchmark')}") + for path in os.environ["PATH"].split(os.pathsep): + sys.stderr.write(f"In PATH: {path}...\n") translator.translate(output_folder=dirpath) # Make the directory that holds the translation world-writable, From d9bbdc54258e8386c8beba74248706eb1139a2a0 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Thu, 29 Jan 2026 17:41:38 -1000 Subject: [PATCH 10/15] Just double-checking that the setup.py change is indeed the culprit again --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 876fd37e..ec71ab73 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,8 @@ def run(self): # Conditionally include cpu-benchmark if it exists data_files = [] cpu_benchmark_path = 'bin/cpu-benchmark' -if os.path.exists(cpu_benchmark_path): +if True: +#if os.path.exists(cpu_benchmark_path): data_files.append(('bin', [cpu_benchmark_path])) setup( From c364b2c0a7334cb5ec3f8043ef8102ca9ac39708 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Thu, 29 Jan 2026 17:47:35 -1000 Subject: [PATCH 11/15] Re-enabling all translator tests just to be sure --- .../test_translators_loggers.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/translators_loggers/test_translators_loggers.py b/tests/translators_loggers/test_translators_loggers.py index 76081863..dcc4e22e 100644 --- a/tests/translators_loggers/test_translators_loggers.py +++ b/tests/translators_loggers/test_translators_loggers.py @@ -231,16 +231,16 @@ class TestTranslators: @pytest.mark.parametrize( "backend", [ - # "swiftt", - # "dask", - # "parsl", - # "nextflow", - # "airflow", + "swiftt", + "dask", + "parsl", + "nextflow", + "airflow", "bash", - # "taskvine", - # "makeflow", - # "cwl", - # "pegasus", + "taskvine", + "makeflow", + "cwl", + "pegasus", ]) @pytest.mark.unit # @pytest.mark.skip(reason="tmp") From abfd5a9b5e27e5ce3d3f9d41cb11e292a8541e39 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Thu, 29 Jan 2026 19:10:58 -1000 Subject: [PATCH 12/15] Hacking the github workflow to work with the setup.py --- .github/workflows/build.yml | 1 + setup.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 82e543ec..14cdd91b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,6 +34,7 @@ jobs: - name: Check package install run: | + sudo sed -i 's|if os.path.exists(cpu_benchmark_path):|if True:|' ./setup.py pip install . - name: Run tests diff --git a/setup.py b/setup.py index ec71ab73..876fd37e 100644 --- a/setup.py +++ b/setup.py @@ -34,8 +34,7 @@ def run(self): # Conditionally include cpu-benchmark if it exists data_files = [] cpu_benchmark_path = 'bin/cpu-benchmark' -if True: -#if os.path.exists(cpu_benchmark_path): +if os.path.exists(cpu_benchmark_path): data_files.append(('bin', [cpu_benchmark_path])) setup( From 5ec72eea755d291b812b3ba260ab155fe444b849 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Thu, 29 Jan 2026 21:49:18 -1000 Subject: [PATCH 13/15] Re-established different python versions for testing --- .github/workflows/build.yml | 2 +- tests/translators_loggers/test_translators_loggers.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 14cdd91b..07a6526c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ "3.14" ] + python-version: [ "3.11", "3.12", "3.13", "3.14" ] steps: - uses: actions/checkout@v4 diff --git a/tests/translators_loggers/test_translators_loggers.py b/tests/translators_loggers/test_translators_loggers.py index dcc4e22e..3d6ae9fb 100644 --- a/tests/translators_loggers/test_translators_loggers.py +++ b/tests/translators_loggers/test_translators_loggers.py @@ -257,10 +257,6 @@ def test_translator(self, backend) -> None: # Perform the translation sys.stderr.write(f"\n[{backend}] Translating workflow...\n") translator = translator_classes[backend](benchmark.workflow) - sys.stderr.write("Checking that cpu-benchmark is in the path") - sys.stderr.write(f"{shutil.which('cpu-benchmark')}") - for path in os.environ["PATH"].split(os.pathsep): - sys.stderr.write(f"In PATH: {path}...\n") translator.translate(output_folder=dirpath) # Make the directory that holds the translation world-writable, From 4c735dd6645f90a723fcdc96770e84acf681199e Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Fri, 30 Jan 2026 10:16:38 -1000 Subject: [PATCH 14/15] Text fixes --- .github/workflows/build.yml | 1 - tests/test_helpers.py | 1 - tests/translators_loggers/test_translators_loggers.py | 8 +++++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07a6526c..49683a7e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,6 @@ jobs: - name: Check package install run: | - sudo sed -i 's|if os.path.exists(cpu_benchmark_path):|if True:|' ./setup.py pip install . - name: Run tests diff --git a/tests/test_helpers.py b/tests/test_helpers.py index cf8d0d71..943ae9c3 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -47,7 +47,6 @@ def _install_WfCommons_on_container(container): stderr=True) exit_code, output = container.exec_run("sudo /bin/rm -rf /tmp/WfCommons/bin/cpu-benchmark", stdout=True, stderr=True) - exit_code, output = container.exec_run(r"sudo sed -i 's|if os.path.exists(cpu_benchmark_path):|if True:|' /tmp/WfCommons/setup.py") # Install WfCommons on the container (to install wfbench and cpu-benchmark really) exit_code, output = container.exec_run("sudo python3 -m pip install . --break-system-packages", diff --git a/tests/translators_loggers/test_translators_loggers.py b/tests/translators_loggers/test_translators_loggers.py index 3d6ae9fb..400a45a8 100644 --- a/tests/translators_loggers/test_translators_loggers.py +++ b/tests/translators_loggers/test_translators_loggers.py @@ -259,9 +259,11 @@ def test_translator(self, backend) -> None: translator = translator_classes[backend](benchmark.workflow) translator.translate(output_folder=dirpath) - # Make the directory that holds the translation world-writable, - # so that docker commands won't fail - os.chmod(dirpath, 0o777) + # # Make the directory that holds the translation world-writable, + # # so that docker commands won't fail + # TODO: Explore whether this below makes tests runnable on Linux due to + # different Docker permission schemes, etc. + # os.chmod(dirpath, 0o777) # Start the Docker container container = _start_docker_container(backend, str_dirpath, str_dirpath, str_dirpath + "bin/") From dda0ab3e4668468891d9ea6f340da6e4758bfb4a Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Fri, 30 Jan 2026 10:17:40 -1000 Subject: [PATCH 15/15] re-etablishing all tests --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 49683a7e..0a4023b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: pip install . - name: Run tests - run: python3 -m pytest -s -v -m unit --cov=wfcommons tests/translators_loggers + run: python3 -m pytest -s -v -m unit --cov=wfcommons tests - name: Upload coverage if: github.ref == 'refs/heads/main'