From 34e8fb68d8d3a3e8d12badb54c277b79bfac3e67 Mon Sep 17 00:00:00 2001 From: Brad Deam <54515790+b-deam@users.noreply.github.com> Date: Tue, 13 Dec 2022 12:08:42 +1030 Subject: [PATCH] Add detailed-results to ccs workflows (#349) --- elastic/logs/challenges/cross-clusters-search.json | 2 ++ elastic/shared/parameter_sources/workflow_selector.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/elastic/logs/challenges/cross-clusters-search.json b/elastic/logs/challenges/cross-clusters-search.json index a56b123c..2e9693a5 100644 --- a/elastic/logs/challenges/cross-clusters-search.json +++ b/elastic/logs/challenges/cross-clusters-search.json @@ -57,6 +57,7 @@ "param-source": "workflow-selector", "workflow": {{workflow | tojson }}, "workflow-target": {{ target_index | tojson }}, + "detailed-results": true, "task-offset": {{ loop.index }}, "request-params": {{ p_query_request_params | tojson(indent=2) }} }, @@ -73,6 +74,7 @@ "param-source": "workflow-selector", "workflow": {{workflow | tojson }}, "workflow-target": {{ target_index | tojson }}, + "detailed-results": true, "task-offset": {{ loop.index }}, "request-params": { "ccs_minimize_roundtrips": false diff --git a/elastic/shared/parameter_sources/workflow_selector.py b/elastic/shared/parameter_sources/workflow_selector.py index fb6c33d9..446f504e 100644 --- a/elastic/shared/parameter_sources/workflow_selector.py +++ b/elastic/shared/parameter_sources/workflow_selector.py @@ -62,7 +62,9 @@ def __init__(self, track, params, **kwargs): # for testing purposes only we allow a configurable now function self._utc_now = kwargs.get("utc_now", datetime.utcnow) self._init_date = self._utc_now().replace(tzinfo=timezone.utc) - self._detailed_results = track.selected_challenge_or_default.parameters.get("detailed-results", False) + self._detailed_results = params.get( + "detailed-results", track.selected_challenge_or_default.parameters.get("detailed-results", False) + ) self._workflow_target = params.get( "workflow-target", track.selected_challenge_or_default.parameters.get("workflow-target"),