Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(summary-widget): use upgraded or upgrade-target as summary version #565

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion argus/backend/plugins/sct/testrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def sut_timestamp(self) -> float:
except IndexError:
scylla_package_upgraded = None
try:
scylla_package = [package for package in self.packages if package.name == "scylla-server"][0]
scylla_package = scylla_package_upgraded or [package for package in self.packages if package.name == "scylla-server"][0]
except IndexError:
raise ValueError("Scylla package not found in packages - cannot determine SUT timestamp")
return (datetime.strptime(scylla_package.date, '%Y%m%d').replace(tzinfo=timezone.utc).timestamp()
Expand Down
16 changes: 8 additions & 8 deletions argus/backend/service/results_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,14 +593,14 @@ def get_tests_by_version(self, sut_package_name: str, test_ids: list[UUID]) -> d
test_method = row['test_method']
if not test_method:
continue
sut_version = next(
(f"{pkg.version}-{pkg.date}-{pkg.revision_id}" for pkg in packages if pkg.name == f"{sut_package_name}-upgraded"),
None
) or next(
(f"{pkg.version}-{pkg.date}-{pkg.revision_id}" for pkg in packages if pkg.name.startswith(sut_package_name)),
None
)

for sut_name in [f"{sut_package_name}-upgraded",
f"{sut_package_name}-upgrade-target",
sut_package_name,
f"{sut_package_name}-target"
]:
sut_version = next((f"{pkg.version}-{pkg.date}-{pkg.revision_id}" for pkg in packages if pkg.name == sut_name), None)
if sut_version:
break
if sut_version is None:
continue
method_name = test_method.rsplit('.', 1)[-1]
Expand Down
Loading