From 72b5d36478409a40d7462a74aa5e546f126dfbc2 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Thu, 24 Oct 2024 11:48:38 +0200 Subject: [PATCH] Fix post-rebase failures --- reframe/frontend/cli.py | 5 +++-- reframe/frontend/reporting/__init__.py | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/reframe/frontend/cli.py b/reframe/frontend/cli.py index 3f4df662a..d3952af6d 100644 --- a/reframe/frontend/cli.py +++ b/reframe/frontend/cli.py @@ -1060,10 +1060,11 @@ def restrict_logging(): for rpt in reports: uuid = rpt.store() - printer.info(f'Successfully imported session {uuid}') + printer.verbose(f'Successfully imported session {uuid}') + printer.info(f'Successfully imported {len(reports)} sessions') if not reports: - printer.info('No sessions have been imported') + printer.warning('No sessions have been imported') sys.exit(0) diff --git a/reframe/frontend/reporting/__init__.py b/reframe/frontend/reporting/__init__.py index 6e40761f8..b4be35ef5 100644 --- a/reframe/frontend/reporting/__init__.py +++ b/reframe/frontend/reporting/__init__.py @@ -31,7 +31,8 @@ from reframe.core.warnings import suppress_deprecations from reframe.utility import nodelist_abbrev, nodelist_expand, OrderedSet from .storage import StorageBackend -from .utility import Aggregator, parse_cmp_spec, parse_query_spec +from .utility import (Aggregator, parse_cmp_spec, + parse_query_spec, parse_time_period) # The schema data version # Major version bumps are expected to break the validation of previous schemas @@ -406,7 +407,7 @@ def create_from_sqlite_db(cls, *dbfiles, exclude_sessions=None, start = time_period.get('start', '19700101T0000+0000') end = time_period.get('end', 'now') - ts_start, ts_end = parse_time_period(f'{start}:{end}') + qs = parse_query_spec(f'{start}:{end}') include_sessions = set(include_sessions) if include_sessions else set() exclude_sessions = set(exclude_sessions) if exclude_sessions else set() reports = [] @@ -420,8 +421,7 @@ def create_from_sqlite_db(cls, *dbfiles, exclude_sessions=None, ) continue - sessions = src_backend.fetch_sessions_time_period(ts_start, ts_end) - for sess in sessions: + for sess in src_backend.fetch_sessions(qs): uuid = sess['session_info']['uuid'] if include_sessions and uuid not in include_sessions: continue