From 2a59acb4c408ed1bb73d0065e951959e9bf3ec81 Mon Sep 17 00:00:00 2001 From: David Butenhof Date: Fri, 21 Apr 2023 07:24:12 -0400 Subject: [PATCH] A few tweaks more --- jenkins/run-server-func-tests | 2 +- lib/pbench/server/api/resources/datasets_list.py | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/jenkins/run-server-func-tests b/jenkins/run-server-func-tests index ccd6a49647..c55ab3417f 100755 --- a/jenkins/run-server-func-tests +++ b/jenkins/run-server-func-tests @@ -93,7 +93,7 @@ fi if [[ ${exit_status} -ne 0 ]]; then dump_journal - printf -- "\nFunctional tests exited with code %s\n" ${exit_status} + printf -- "\nFunctional tests exited with code %s\n" ${exit_status} >&2 fi if [[ -z "${cleanup_flag}" ]]; then diff --git a/lib/pbench/server/api/resources/datasets_list.py b/lib/pbench/server/api/resources/datasets_list.py index 76eed314f9..af49172bba 100644 --- a/lib/pbench/server/api/resources/datasets_list.py +++ b/lib/pbench/server/api/resources/datasets_list.py @@ -197,16 +197,20 @@ def _next_token(self, optional: bool = False) -> str: return next def parse_filter(self) -> "Term": - """Parse a filter term like ":[][:]" + """Parse a filter term like ":[][:]" - Returns a dictionary with "key", "operator" (default "="), "value", and - "type" fields. + Separates the "key", "operator", "value", and "type" fields of a filter + expression. The key and value can be quoted to include mixed case and symbols, - including the ":"character, by starting and starting and ending the key - or value with the "'" or '"' character, e.g., + including the ":" character, by starting and starting and ending the + key or value with the "'" or '"' character, e.g., "'dataset.metalog.tool/iteration:1':'foo:1#bar':str". + The "operator", if omitted, defaults to "=", and "type" defaults to + "str" (string), so that `dataset.name:foo` has the same effect as + `dataset.name:=foo:str`. + Returns: self """