From 3f802873726e082d689245d573b02b2bdd6bf644 Mon Sep 17 00:00:00 2001 From: Sanjay Kumar Srikakulam Date: Tue, 24 Oct 2023 12:48:56 +0000 Subject: [PATCH 1/2] fix remote resource check TPV rule and enable it --- files/galaxy/tpv/tool_defaults.yml | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/files/galaxy/tpv/tool_defaults.yml b/files/galaxy/tpv/tool_defaults.yml index 3938e7c25..eaa99413a 100644 --- a/files/galaxy/tpv/tool_defaults.yml +++ b/files/galaxy/tpv/tool_defaults.yml @@ -42,24 +42,24 @@ tools: entity.tpv_tags = entity.tpv_tags.combine( TagSetManager(tags=[pulsar_tag]) ) - # - id: removed_remote_resources - # # This rule displays a meaningful error message when users that have selected remote resources that are no longer available (e.g. because they have been removed) attempt to send jobs to them. - # if: | - # retval = False - # remote_resource_tag = None - # if user is not None: - # try: - # user_preferences = user.extra_preferences - # remote_resource_tag = user_preferences.get("distributed_compute|remote_resources") - # except AttributeError: - # pass - # remote_resource_destination = [d.dest_name for d in mapper.destinations.values() if any(d.tpv_dest_tags.filter(tag_value=remote_resource_tag))] + - id: removed_remote_resources + # This rule displays a meaningful error message when users that have selected remote resources that are no longer available (e.g. because they have been removed) attempt to send jobs to them. + if: | + retval = False + remote_resource_tag = None + if user is not None: + try: + user_preferences = user.extra_preferences + remote_resource_tag = None if user_preferences.get("distributed_compute|remote_resources") == "None" else user_preferences.get("distributed_compute|remote_resources") + except AttributeError: + pass + remote_resource_destination = [d.dest_name for d in mapper.destinations.values() if any(d.tpv_dest_tags.filter(tag_value=remote_resource_tag))] - # if not remote_resource_destination: - # retval = True - # retval - # fail: | - # Invalid 'Remote resources id' selected in the config menu under 'User -> Preferences -> Manage Information'. Please reselect either 'default' or an appropriate remote resource. + if not remote_resource_destination: + retval = True + retval + fail: | + Invalid 'Remote resources id' selected in the config menu under 'User -> Preferences -> Manage Information -> Use distributed compute resources'. Please reselect either 'default' or an appropriate remote resource then save and rerun your job. rank: | final_destinations = helpers.weighted_random_sampling(candidate_destinations) From 6d7160c37aa636125a2a23e9fc7c0f0ce0022488 Mon Sep 17 00:00:00 2001 From: Sanjay Kumar Srikakulam Date: Tue, 24 Oct 2023 15:14:28 +0200 Subject: [PATCH 2/2] Update files/galaxy/tpv/tool_defaults.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Manuel Domínguez <43052541+kysrpex@users.noreply.github.com> --- files/galaxy/tpv/tool_defaults.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/galaxy/tpv/tool_defaults.yml b/files/galaxy/tpv/tool_defaults.yml index eaa99413a..e443f8a1d 100644 --- a/files/galaxy/tpv/tool_defaults.yml +++ b/files/galaxy/tpv/tool_defaults.yml @@ -59,7 +59,7 @@ tools: retval = True retval fail: | - Invalid 'Remote resources id' selected in the config menu under 'User -> Preferences -> Manage Information -> Use distributed compute resources'. Please reselect either 'default' or an appropriate remote resource then save and rerun your job. + Invalid 'Remote resources id' selected in the config menu under 'User -> Preferences -> Manage Information -> Use distributed compute resources'. Please reselect either 'default' or an appropriate remote resource then click 'Save' and rerun your job. rank: | final_destinations = helpers.weighted_random_sampling(candidate_destinations)