From 15cf05a8a56f8f8860fce558fe16b9a3e7bbf3cf Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 1 Mar 2021 15:56:48 +0100 Subject: [PATCH 01/23] Add testcase for explicit output collection step_outputs when reaching max_num_jobs This should recapitulate the error seen when running workflow tests against https://github.com/galaxyproject/iwc/pull/23. --- .../test_workflow_scheduling_options.py | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/test/integration/test_workflow_scheduling_options.py b/test/integration/test_workflow_scheduling_options.py index 6c12e191727..58af3315a48 100644 --- a/test/integration/test_workflow_scheduling_options.py +++ b/test/integration/test_workflow_scheduling_options.py @@ -61,7 +61,7 @@ class MaximumWorkflowJobsPerSchedulingIterationTestCase(integration_util.Integra def handle_galaxy_config_kwds(cls, config): config["maximum_workflow_jobs_per_scheduling_iteration"] = 1 - def test(self): + def test_collection_explicit_and_implicit(self): workflow_id = self.workflow_populator.upload_yaml_workflow(""" class: GalaxyWorkflow steps: @@ -89,3 +89,40 @@ steps: self.workflow_populator.wait_for_workflow(history_id, workflow_id, invocation_id) self.dataset_populator.wait_for_history(history_id, assert_ok=True) self.assertEqual("a\nc\nb\nd\ne\ng\nf\nh\n", self.dataset_populator.get_history_dataset_content(history_id, hid=0)) + + def test_scheduling_rounds(self): + with self.dataset_populator.test_history() as history_id: + invocation_response = self.workflow_populator.run_workflow(""" +class: GalaxyWorkflow +inputs: + input1: data + text_input: text +steps: + first_cat: + tool_id: cat1 + in: + input1: input1 + second_cat: + tool_id: cat1 + in: + input1: first_cat/out_file1 + collection_creates_dynamic_list_of_pairs: + tool_id: collection_creates_dynamic_list_of_pairs + in: + file: second_cat/out_file1 + count_multi_file: + tool_id: count_multi_file + in: + input1: collection_creates_dynamic_list_of_pairs/list_output +outputs: + wf_output_1: + outputSource: collection_creates_dynamic_list_of_pairs/list_output +""", test_data=""" +input1: + value: 1.fasta + type: File + name: fasta1 +text_input: foo +""", history_id=history_id) + invocation = self._get("/invocations/{}".format(invocation_response.invocation_id)).json() + assert 'wf_output_1' in invocation['output_collections'] From 1f82927ace979075dbd1540cad3493700889492a Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 1 Mar 2021 20:02:11 +0100 Subject: [PATCH 02/23] Don't set empty step output if no job was created Fixes ``` Traceback (most recent call last): File "/Users/mvandenb/src/galaxy/lib/galaxy/workflow/run.py", line 82, in __invoke outputs = invoker.invoke() File "/Users/mvandenb/src/galaxy/lib/galaxy/workflow/run.py", line 190, in invoke incomplete_or_none = self._invoke_step(workflow_invocation_step) File "/Users/mvandenb/src/galaxy/lib/galaxy/workflow/run.py", line 263, in _invoke_step incomplete_or_none = invocation_step.workflow_step.module.execute(self.trans, File "/Users/mvandenb/src/galaxy/lib/galaxy/workflow/modules.py", line 1659, in execute collection_info = self.compute_collection_info(progress, step, all_inputs) File "/Users/mvandenb/src/galaxy/lib/galaxy/workflow/modules.py", line 335, in compute_collection_info collections_to_match = self._find_collections_to_match( File "/Users/mvandenb/src/galaxy/lib/galaxy/workflow/modules.py", line 354, in _find_collections_to_match data = progress.replacement_for_input(step, input_dict) File "/Users/mvandenb/src/galaxy/lib/galaxy/workflow/run.py", line 328, in replacement_for_input replacement = [self.replacement_for_connection(c) for c in connection] File "/Users/mvandenb/src/galaxy/lib/galaxy/workflow/run.py", line 328, in replacement = [self.replacement_for_connection(c) for c in connection] File "/Users/mvandenb/src/galaxy/lib/galaxy/workflow/run.py", line 358, in replacement_for_connection raise Exception(message) Exception: Workflow evaluation problem - failed to find output_name list_output in step_outputs {} galaxy.workflow.scheduling_manager DEBUG 2021-03-01 19:58:59,493 Workflow invocation [1] scheduled ``` --- lib/galaxy/workflow/run.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/workflow/run.py b/lib/galaxy/workflow/run.py index cf05eb39c11..a742257af13 100644 --- a/lib/galaxy/workflow/run.py +++ b/lib/galaxy/workflow/run.py @@ -173,7 +173,12 @@ class WorkflowInvoker: remaining_steps = self.progress.remaining_steps() delayed_steps = False + max_jobs_per_iteration_reached = False for (step, workflow_invocation_step) in remaining_steps: + max_jobs_to_schedule = self.progress.maximum_jobs_to_schedule_or_none + if max_jobs_to_schedule is not None and max_jobs_to_schedule <= 0: + max_jobs_per_iteration_reached = True + break step_delayed = False step_timer = ExecutionTimer() try: @@ -208,7 +213,7 @@ class WorkflowInvoker: if not step_delayed: log.debug("Workflow step {} of invocation {} invoked {}".format(step.id, workflow_invocation.id, step_timer)) - if delayed_steps: + if delayed_steps or max_jobs_per_iteration_reached: state = model.WorkflowInvocation.states.READY else: state = model.WorkflowInvocation.states.SCHEDULED From cc5c3cd0c50a3a4d3ca12f5184a557859402ff14 Mon Sep 17 00:00:00 2001 From: Kaivan Kamali Date: Mon, 1 Mar 2021 14:31:15 -0500 Subject: [PATCH 03/23] Handle the case where column list is a comma-separated string --- lib/galaxy/tools/parameters/basic.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index 97d20f66d0c..b01ee101adb 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1361,9 +1361,12 @@ class ColumnListParameter(SelectToolParameter): legal_values = self.get_column_list(trans, other_values) value = other_values.get(self.name) - if value is not None and value not in legal_values and self.is_file_empty(trans, other_values): - value = value if isinstance(value, list) else [value] - legal_values.extend(value) + if value is not None: + # There are cases where 'value' is a string of comma separated values + # This ensures that it is converted into a list + value = value if isinstance(value, list) else value.split(",") + if not set(value).issubset(set(legal_values)) and self.is_file_empty(trans, other_values): + legal_values.extend(value) return set(legal_values) From 7c8a5c18f9ddd29569e96a1e942826be991df5fe Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Tue, 10 Nov 2020 17:17:15 +0000 Subject: [PATCH 04/23] Fix command line for tools using `interpreter` when galaxy root contains spaces --- lib/galaxy/tools/evaluation.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/tools/evaluation.py b/lib/galaxy/tools/evaluation.py index 67a54927fc6..d1f8d85099f 100644 --- a/lib/galaxy/tools/evaluation.py +++ b/lib/galaxy/tools/evaluation.py @@ -1,6 +1,7 @@ import json import logging import os +import shlex import tempfile @@ -494,11 +495,12 @@ class ToolEvaluator: raise if interpreter: # TODO: path munging for cluster/dataset server relocatability - executable = command_line.split()[0] + command_line_tokens = shlex.split(command_line) + executable = command_line_tokens[0] tool_dir = os.path.abspath(self.tool.tool_dir) abs_executable = os.path.join(tool_dir, executable) - command_line = command_line.replace(executable, abs_executable, 1) - command_line = interpreter + " " + command_line + command_line_tokens[0:1] = [interpreter, abs_executable] + command_line = ' '.join(map(shlex.quote, command_line_tokens)) self.command_line = command_line def __build_config_files(self): From 1673f9b16b67435476a5dd718893671440bb406a Mon Sep 17 00:00:00 2001 From: Kaivan Kamali Date: Mon, 1 Mar 2021 16:46:03 -0500 Subject: [PATCH 05/23] Using utility function per code review feedback. --- lib/galaxy/tools/parameters/basic.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index b01ee101adb..b305da4fcc1 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1362,9 +1362,9 @@ class ColumnListParameter(SelectToolParameter): value = other_values.get(self.name) if value is not None: - # There are cases where 'value' is a string of comma separated values - # This ensures that it is converted into a list - value = value if isinstance(value, list) else value.split(",") + # There are cases where 'value' is a string of comma separated values. This ensures + # that it is converted into a list, with extra whitespace around items removed. + value = util.listify(value, do_strip=True) if not set(value).issubset(set(legal_values)) and self.is_file_empty(trans, other_values): legal_values.extend(value) From e79a5dfedb4a897e3ae3c5078a0850a64cf7f629 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 10 Feb 2021 18:33:07 +0000 Subject: [PATCH 06/23] Fix command line building when using interpreter Partially revert commit efa9e0fdd1d11d58f4a504a3e8242cc59f3f1416 which broke tools which use `interpreter` and `&&` or environment variables in the ``. xref.: https://github.com/galaxyproject/galaxy/pull/10674/commits/efa9e0fdd1d11d58f4a504a3e8242cc59f3f1416#r573844945 --- lib/galaxy/tools/evaluation.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/tools/evaluation.py b/lib/galaxy/tools/evaluation.py index d1f8d85099f..fd931b1689f 100644 --- a/lib/galaxy/tools/evaluation.py +++ b/lib/galaxy/tools/evaluation.py @@ -495,12 +495,10 @@ class ToolEvaluator: raise if interpreter: # TODO: path munging for cluster/dataset server relocatability - command_line_tokens = shlex.split(command_line) - executable = command_line_tokens[0] + executable = command_line.split()[0] tool_dir = os.path.abspath(self.tool.tool_dir) abs_executable = os.path.join(tool_dir, executable) - command_line_tokens[0:1] = [interpreter, abs_executable] - command_line = ' '.join(map(shlex.quote, command_line_tokens)) + command_line = command_line.replace(executable, "{} {}".format(interpreter, shlex.quote(abs_executable)), 1) self.command_line = command_line def __build_config_files(self): From 5c56704b44e3428379d6b659ede34a52d8ca5d02 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 1 Mar 2021 21:53:44 +0100 Subject: [PATCH 07/23] use if max_num_job is not None --- lib/galaxy/tools/execute.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tools/execute.py b/lib/galaxy/tools/execute.py index 37eee5d8aed..4c9cd45e993 100644 --- a/lib/galaxy/tools/execute.py +++ b/lib/galaxy/tools/execute.py @@ -34,7 +34,7 @@ def execute(trans, tool, mapping_params, history, rerun_remap_job_id=None, colle Execute a tool and return object containing summary (output data, number of failures, etc...). """ - if max_num_jobs: + if max_num_jobs is not None: assert invocation_step is not None if rerun_remap_job_id: assert invocation_step is None @@ -96,7 +96,7 @@ def execute(trans, tool, mapping_params, history, rerun_remap_job_id=None, colle execution_slice = None for i, execution_slice in enumerate(execution_tracker.new_execution_slices()): - if max_num_jobs and jobs_executed >= max_num_jobs: + if max_num_jobs is not None and jobs_executed >= max_num_jobs: has_remaining_jobs = True break else: From 84647cbd0a05b8dd87a5ffe4662c033ad050b0ee Mon Sep 17 00:00:00 2001 From: Kaivan Kamali Date: Mon, 1 Mar 2021 17:36:42 -0500 Subject: [PATCH 08/23] Removed whitespace --- lib/galaxy/tools/parameters/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index b305da4fcc1..cec66a6eb14 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1362,7 +1362,7 @@ class ColumnListParameter(SelectToolParameter): value = other_values.get(self.name) if value is not None: - # There are cases where 'value' is a string of comma separated values. This ensures + # There are cases where 'value' is a string of comma separated values. This ensures # that it is converted into a list, with extra whitespace around items removed. value = util.listify(value, do_strip=True) if not set(value).issubset(set(legal_values)) and self.is_file_empty(trans, other_values): From 6f0de082a0c4a37fcfbeba106576e51da6747df4 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 2 Mar 2021 10:33:22 +0100 Subject: [PATCH 09/23] Add logging if installable tool config file not found Should make it easier to debug failing installations like this: ``` Mar 02 09:39:41 svvm0085 uwsgi[2626501]: galaxy.tool_shed.galaxy_install.install_manager ERROR 2021-03-02 09:39:41,329 [p:2626501,w:1,m:0] [uWSGIWorker1Core0] Error installing repository 'data_manager_fetch_genome_dbkeys_all_fasta' Mar 02 09:39:41 svvm0085 uwsgi[2626501]: Traceback (most recent call last): Mar 02 09:39:41 svvm0085 uwsgi[2626501]: File "/data/galaxy/galaxy//server/lib/galaxy/tool_shed/galaxy_install/install_manager.py", line 848, in install_repositories Mar 02 09:39:41 svvm0085 uwsgi[2626501]: self.install_tool_shed_repository(tool_shed_repository, Mar 02 09:39:41 svvm0085 uwsgi[2626501]: File "/data/galaxy/galaxy//server/lib/galaxy/tool_shed/galaxy_install/install_manager.py", line 926, in install_tool_shed_repository Mar 02 09:39:41 svvm0085 uwsgi[2626501]: self.__handle_repository_contents(tool_shed_repository=tool_shed_repository, Mar 02 09:39:41 svvm0085 uwsgi[2626501]: File "/data/galaxy/galaxy//server/lib/galaxy/tool_shed/galaxy_install/install_manager.py", line 574, in __handle_repository_contents Mar 02 09:39:41 svvm0085 uwsgi[2626501]: dmh.install_data_managers(self.app.config.shed_data_manager_config_file, Mar 02 09:39:41 svvm0085 uwsgi[2626501]: File "/data/galaxy/galaxy//server/lib/galaxy/tool_shed/galaxy_install/tools/data_manager.py", line 81, in install_data_managers Mar 02 09:39:41 svvm0085 uwsgi[2626501]: relative_repo_data_manager_dir = os.path.join(shed_config_dict.get('tool_path', ''), relative_install_dir) Mar 02 09:39:41 svvm0085 uwsgi[2626501]: AttributeError: 'NoneType' object has no attribute 'get' ``` In this case there was an extra slash in the tool_path section in the tool_path attribute of the shed_tool_config_file. Includes a small fix where we check both paths to be compared using the abspath value. --- lib/galaxy/tools/toolbox/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tools/toolbox/base.py b/lib/galaxy/tools/toolbox/base.py index d9dc196f536..ba2f27538a9 100644 --- a/lib/galaxy/tools/toolbox/base.py +++ b/lib/galaxy/tools/toolbox/base.py @@ -264,9 +264,13 @@ class AbstractToolBox(Dictifiable, ManagesIntegratedToolPanelMixin): def get_shed_config_dict_by_filename(self, filename): filename = os.path.abspath(filename) + dynamic_tool_conf_paths = [] for shed_config_dict in self._dynamic_tool_confs: - if shed_config_dict['config_filename'] == filename: + dynamic_tool_conf_path = os.path.abspath(shed_config_dict['config_filename']) + dynamic_tool_conf_paths.append(dynamic_tool_conf_path) + if dynamic_tool_conf_path == filename: return shed_config_dict + log.warning("'{}' not among installable tool config files ({})".format(filename, ', '.join(dynamic_tool_conf_paths))) return None def update_shed_config(self, shed_conf): From 6cfd858e134ebebcbdb5aff2db58a0602a2ac258 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 2 Mar 2021 11:21:31 +0100 Subject: [PATCH 10/23] Fix embedding subworkflow This broke in 88d7c4bb798d884b410213738f1bf21ae219070b. --- client/src/components/Workflow/Editor/Node.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Workflow/Editor/Node.vue b/client/src/components/Workflow/Editor/Node.vue index 1cbd9f3f31a..2392a623316 100644 --- a/client/src/components/Workflow/Editor/Node.vue +++ b/client/src/components/Workflow/Editor/Node.vue @@ -294,7 +294,7 @@ export default { }, setData(data) { this.config_form = data.config_form; - this.content_id = this.config_form?.id; + this.content_id = data.config_form?.id || data.content_id; this.tool_state = data.tool_state; this.errors = data.errors; this.annotation = data.annotation; From ae79ed685849c1fcb6b5e33485289b3df70cc396 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 2 Mar 2021 14:09:25 +0100 Subject: [PATCH 11/23] Test test workflow embedding in workflow editor --- .../src/components/Panels/ToolBoxWorkflow.vue | 1 + lib/galaxy/selenium/navigation.yml | 3 ++ .../selenium/test_workflow_editor.py | 31 +++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/client/src/components/Panels/ToolBoxWorkflow.vue b/client/src/components/Panels/ToolBoxWorkflow.vue index c1366af2071..ccb26197086 100644 --- a/client/src/components/Panels/ToolBoxWorkflow.vue +++ b/client/src/components/Panels/ToolBoxWorkflow.vue @@ -40,6 +40,7 @@ Date: Fri, 26 Feb 2021 13:24:46 -0500 Subject: [PATCH 12/23] OIDC Logout+Redirect fix. This was a nightmare to track down so I'm going to add extra logging for when we toss cookies. --- lib/galaxy/webapps/galaxy/controllers/authnz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/controllers/authnz.py b/lib/galaxy/webapps/galaxy/controllers/authnz.py index 4e377e3b9c4..41af6643ec7 100644 --- a/lib/galaxy/webapps/galaxy/controllers/authnz.py +++ b/lib/galaxy/webapps/galaxy/controllers/authnz.py @@ -16,7 +16,7 @@ from galaxy.webapps.base.controller import JSAppLauncher log = logging.getLogger(__name__) -PROVIDER_COOKIE_NAME = 'oidc-provider' +PROVIDER_COOKIE_NAME = 'galaxy-oidc-provider' class OIDC(JSAppLauncher): From d56d228a7ae51324e9893b63598b5e6ec7e2a262 Mon Sep 17 00:00:00 2001 From: Marius van den Beek Date: Tue, 2 Mar 2021 15:50:37 +0000 Subject: [PATCH 13/23] Add regression test for allowing data column selection on empty files A test for https://github.com/galaxyproject/galaxy/pull/10981. --- lib/galaxy_test/api/test_workflows.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/galaxy_test/api/test_workflows.py b/lib/galaxy_test/api/test_workflows.py index 4df8803c0bf..40119e12326 100644 --- a/lib/galaxy_test/api/test_workflows.py +++ b/lib/galaxy_test/api/test_workflows.py @@ -1193,6 +1193,26 @@ steps: invocation_id = self.__invoke_workflow(history_id, workflow_id, inputs) self.wait_for_invocation_and_jobs(history_id, workflow_id, invocation_id) + @skip_without_tool('column_param') + def test_empty_file_data_column_specified(self): + # Regression test for https://github.com/galaxyproject/galaxy/pull/10981 + with self.dataset_populator.test_history() as history_id: + self._run_jobs("""class: GalaxyWorkflow +steps: + empty_output: + tool_id: empty_output + outputs: + out_file1: + change_datatype: tabular + column_param: + tool_id: column_param + in: + input1: empty_output/out_file1 + state: + col: 2 + col_names: 'B' +""", history_id=history_id) + @skip_without_tool("mapper") @skip_without_tool("pileup") def test_workflow_metadata_validation_0(self): From 28c89ac9507593f488706d1eba5a8bf51b378d92 Mon Sep 17 00:00:00 2001 From: Kaivan Kamali Date: Tue, 2 Mar 2021 14:02:55 -0500 Subject: [PATCH 14/23] Added another test for when columns are a comma separated string --- lib/galaxy_test/api/test_workflows.py | 20 +++++++++ test/functional/tools/column_param_list.xml | 50 +++++++++++++++++++++ test/functional/tools/samples_tool_conf.xml | 1 + 3 files changed, 71 insertions(+) create mode 100644 test/functional/tools/column_param_list.xml diff --git a/lib/galaxy_test/api/test_workflows.py b/lib/galaxy_test/api/test_workflows.py index 40119e12326..9e609f39477 100644 --- a/lib/galaxy_test/api/test_workflows.py +++ b/lib/galaxy_test/api/test_workflows.py @@ -1213,6 +1213,26 @@ steps: col_names: 'B' """, history_id=history_id) + @skip_without_tool('column_param_list') + def test_comma_separated_columns(self): + # Regression test for https://github.com/galaxyproject/galaxy/pull/10981 + with self.dataset_populator.test_history() as history_id: + self._run_jobs("""class: GalaxyWorkflow +steps: + empty_output: + tool_id: empty_output + outputs: + out_file1: + change_datatype: tabular + column_param_list: + tool_id: column_param_list + in: + input1: empty_output/out_file1 + state: + col: '2,3' + col_names: 'B' +""", history_id=history_id) + @skip_without_tool("mapper") @skip_without_tool("pileup") def test_workflow_metadata_validation_0(self): diff --git a/test/functional/tools/column_param_list.xml b/test/functional/tools/column_param_list.xml new file mode 100644 index 00000000000..fba008db7c5 --- /dev/null +++ b/test/functional/tools/column_param_list.xml @@ -0,0 +1,50 @@ + + '$output1' && +echo "col $col" > '$output2' && +echo "col_names $col_names" >> '$output2' + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/functional/tools/samples_tool_conf.xml b/test/functional/tools/samples_tool_conf.xml index b01cd8f42af..1a53ca33bf6 100644 --- a/test/functional/tools/samples_tool_conf.xml +++ b/test/functional/tools/samples_tool_conf.xml @@ -114,6 +114,7 @@ + From a7dca34e315557589301d78ec5aecca90607ccc8 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Tue, 2 Mar 2021 14:04:43 -0500 Subject: [PATCH 15/23] Fix clearing of search inputs (slightly more robust selector usage resolves this and will hopefully be more durable to changes moving forward) --- client/src/ui/search-input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/ui/search-input.js b/client/src/ui/search-input.js index a5ea8ef5de2..b8106b8143c 100644 --- a/client/src/ui/search-input.js +++ b/client/src/ui/search-input.js @@ -37,7 +37,7 @@ function searchInput(parentNode, options) { // .................................................................... input rendering and events // visually clear the search, trigger an event, and call the callback function clearSearchInput(event) { - var $input = $(this).parent().children("input"); + var $input = $(this).closest(".search-control").children("input"); $input.val("").trigger("searchInput.clear").blur(); options.onclear(); } From 78bff36f4a0ae67c97c2142424b9456e7166562e Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 2 Mar 2021 14:20:11 -0500 Subject: [PATCH 16/23] Fix bug to prevent workflow refactor indices from being wrong. --- .../src/components/Workflow/Editor/Index.vue | 21 +++++++++++++++---- .../components/Workflow/Editor/Options.vue | 3 +++ .../Workflow/Editor/modules/services.js | 1 + 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue index ab7b79cddba..d45abbd0d3d 100644 --- a/client/src/components/Workflow/Editor/Index.vue +++ b/client/src/components/Workflow/Editor/Index.vue @@ -242,6 +242,7 @@ export default { hasChanges: false, nodeIndex: 0, nodes: {}, + requiresReindex: false, // track if node has been added or remove and backend may re-index nodes (hasChanges tracks a much more broad set of changes) datatypesMapper: null, datatypes: [], report: {}, @@ -346,6 +347,7 @@ export default { }, onAdd(node) { this.nodes[node.id] = node; + this.requiresReindex = true; }, onUpdate(node) { getModule({ @@ -366,6 +368,7 @@ export default { this.canvasManager.drawOverview(); this.activeNode = null; this.hasChanges = true; + this.requiresReindex = true; showAttributes(); }, onEditSubworkflow(contentId) { @@ -428,10 +431,20 @@ export default { node.onUnhighlight(); }, onLint() { - this._ensureParametersSet(); - // See notes in Lint.vue about why refresh is needed. - this.$refs.lint.refresh(); - showLint(); + if (this.requiresReindex) { + const r = window.confirm( + "Workflow steps have been added or removed since last save, the workflow needs to be saved before best practices can be analzyed. Save workflow?" + ); + if (r == false) { + return; + } + this.onSave(true); + } else { + this._ensureParametersSet(); + // See notes in Lint.vue about why refresh is needed. + this.$refs.lint.refresh(); + showLint(); + } }, onEdit() { this.isCanvas = true; diff --git a/client/src/components/Workflow/Editor/Options.vue b/client/src/components/Workflow/Editor/Options.vue index 66f4d728dab..b3a90a39594 100644 --- a/client/src/components/Workflow/Editor/Options.vue +++ b/client/src/components/Workflow/Editor/Options.vue @@ -92,6 +92,9 @@ export default { hasChanges: { type: Boolean, }, + requiredReindex: { + type: Boolean, + }, }, }; diff --git a/client/src/components/Workflow/Editor/modules/services.js b/client/src/components/Workflow/Editor/modules/services.js index 1da2ef2c86f..1783ffe5a51 100644 --- a/client/src/components/Workflow/Editor/modules/services.js +++ b/client/src/components/Workflow/Editor/modules/services.js @@ -55,6 +55,7 @@ export async function saveWorkflow(workflow) { const { data } = await axios.put(`${getAppRoot()}api/workflows/${workflow.id}`, requestData); workflow.name = data.name; workflow.hasChanges = false; + workflow.requiresReindex = false; workflow.stored = true; workflow.version = data.version; workflow.annotation = data.annotation; From e86216a64f15dc2733fd4fdec1817b3206c5e651 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Tue, 2 Mar 2021 17:21:20 -0500 Subject: [PATCH 17/23] Create pull_request_template.md Proposed PR Template based on Contributing Guidelines --- pull_request_template.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 pull_request_template.md diff --git a/pull_request_template.md b/pull_request_template.md new file mode 100644 index 00000000000..88f3238fc72 --- /dev/null +++ b/pull_request_template.md @@ -0,0 +1,18 @@ +## Why did you make this change? +(cite Issue # OR provide rationalization of changes if no issue exists) + + + +## What did you do? +- [add implementation details here] +- + + +## How to test the changes? +(select the most appropriate option; if the latter, provide steps for testing below) +- [ ] I've included a unit or integration test +- [ ] I've included instructions on how to test my changes + +## Steps for testing: +1. [add testing steps here or delete this section if you wrote a test for your changes] +2. From 423a95435ba125aec704072f01346188db614e0e Mon Sep 17 00:00:00 2001 From: Kaivan Kamali Date: Tue, 2 Mar 2021 17:35:42 -0500 Subject: [PATCH 18/23] Added a default value to fix a broken framework test. --- test/functional/tools/column_param_list.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/tools/column_param_list.xml b/test/functional/tools/column_param_list.xml index fba008db7c5..a3c8d99e4f6 100644 --- a/test/functional/tools/column_param_list.xml +++ b/test/functional/tools/column_param_list.xml @@ -6,7 +6,7 @@ echo "col_names $col_names" >> '$output2' ]]> - + From bd9a5e1dfbba936146c888241d80aa3a8dfcde4f Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Tue, 2 Mar 2021 22:36:16 -0500 Subject: [PATCH 19/23] Updates to pull_request_template.md Updates out of review --- pull_request_template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pull_request_template.md b/pull_request_template.md index 88f3238fc72..bd8e6d1ccc1 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -4,13 +4,13 @@ ## What did you do? -- [add implementation details here] +- [describe the proposed changes] - ## How to test the changes? (select the most appropriate option; if the latter, provide steps for testing below) -- [ ] I've included a unit or integration test +- [ ] I've included appropriate automated tests - [ ] I've included instructions on how to test my changes ## Steps for testing: From 699919c46b8dca5c60bf963c5a6635908b796598 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Wed, 3 Mar 2021 10:51:01 -0500 Subject: [PATCH 20/23] Update pull_request_template.md --- pull_request_template.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pull_request_template.md b/pull_request_template.md index bd8e6d1ccc1..4e274c0622b 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -10,9 +10,10 @@ ## How to test the changes? (select the most appropriate option; if the latter, provide steps for testing below) -- [ ] I've included appropriate automated tests +- [ ] I've included appropriate automated tests (https://docs.galaxyproject.org/en/latest/dev/writing_tests.html) - [ ] I've included instructions on how to test my changes + i. [add testing steps here or delete this section if you wrote a test for your changes] + ii. -## Steps for testing: -1. [add testing steps here or delete this section if you wrote a test for your changes] -2. +## For UI Components +- [ ] I've included a screenshot of the changes From 4f6d7b3a61af9524ca315551bc098866c5d5b347 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Wed, 3 Mar 2021 10:59:28 -0500 Subject: [PATCH 21/23] Update to pull_request_template.md --- pull_request_template.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pull_request_template.md b/pull_request_template.md index 4e274c0622b..4255c3e383e 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -11,9 +11,9 @@ ## How to test the changes? (select the most appropriate option; if the latter, provide steps for testing below) - [ ] I've included appropriate automated tests (https://docs.galaxyproject.org/en/latest/dev/writing_tests.html) -- [ ] I've included instructions on how to test my changes - i. [add testing steps here or delete this section if you wrote a test for your changes] - ii. +- [ ] Instructions for manual testing is as follows: + +1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes] ## For UI Components - [ ] I've included a screenshot of the changes From 84a33e6ecb2e3086d2b1f6f6ff3431ff6214d2dc Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Wed, 3 Mar 2021 11:01:35 -0500 Subject: [PATCH 22/23] Grammar edit --- pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pull_request_template.md b/pull_request_template.md index 4255c3e383e..2aa5a2b0707 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -11,7 +11,7 @@ ## How to test the changes? (select the most appropriate option; if the latter, provide steps for testing below) - [ ] I've included appropriate automated tests (https://docs.galaxyproject.org/en/latest/dev/writing_tests.html) -- [ ] Instructions for manual testing is as follows: +- [ ] Instructions for manual testing are as follows: 1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes] From aa00e58f083e97b4fa2c95f19dde96ce287bcbd0 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Wed, 3 Mar 2021 17:09:20 -0500 Subject: [PATCH 23/23] Updated order and added suggested changes to Why --- pull_request_template.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pull_request_template.md b/pull_request_template.md index 2aa5a2b0707..2affb105a5f 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -1,13 +1,13 @@ -## Why did you make this change? -(cite Issue # OR provide rationalization of changes if no issue exists) - - - ## What did you do? - [describe the proposed changes] - +## Why did you make this change? +(Cite Issue number OR provide rationalization of changes if no issue exists) +(If fixing a bug, please add any relevant error or traceback) + + ## How to test the changes? (select the most appropriate option; if the latter, provide steps for testing below) - [ ] I've included appropriate automated tests (https://docs.galaxyproject.org/en/latest/dev/writing_tests.html)