From fa52acc1c66d80e478af42dbae5acf273d5319b9 Mon Sep 17 00:00:00 2001 From: Benjamin Pelletier Date: Mon, 4 Mar 2024 10:01:34 -0800 Subject: [PATCH] [uss_qualifier/reports] Show codebase version that generated artifacts (#528) Show codebase version that generated artifacts --- monitoring/uss_qualifier/reports/sequence_view/generate.py | 2 ++ .../reports/templates/sequence_view/overview.html | 1 + .../uss_qualifier/reports/templates/sequence_view/style.html | 4 ++++ .../tested_requirements/participant_tested_requirements.html | 5 +++++ .../uss_qualifier/reports/tested_requirements/generate.py | 3 ++- 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/monitoring/uss_qualifier/reports/sequence_view/generate.py b/monitoring/uss_qualifier/reports/sequence_view/generate.py index 9e5583429b..12503ee7ba 100644 --- a/monitoring/uss_qualifier/reports/sequence_view/generate.py +++ b/monitoring/uss_qualifier/reports/sequence_view/generate.py @@ -7,6 +7,7 @@ from loguru import logger from monitoring.monitorlib.errors import stacktrace_string +from monitoring.monitorlib.versioning import get_code_version from monitoring.uss_qualifier.action_generators.action_generator import ( action_generator_type_from_name, ) @@ -318,5 +319,6 @@ def generate_sequence_view( UNATTRIBUTED_PARTICIPANT=UNATTRIBUTED_PARTICIPANT, len=len, Severity=Severity, + codebase_version=get_code_version(), ) ) diff --git a/monitoring/uss_qualifier/reports/templates/sequence_view/overview.html b/monitoring/uss_qualifier/reports/templates/sequence_view/overview.html index dc97d7a3ed..86d22dccbd 100644 --- a/monitoring/uss_qualifier/reports/templates/sequence_view/overview.html +++ b/monitoring/uss_qualifier/reports/templates/sequence_view/overview.html @@ -52,6 +52,7 @@

Sequence view of uss_qualifier test run

{{ report.commit_hash }} +
Artifact generated by {{ codebase_version }}
diff --git a/monitoring/uss_qualifier/reports/templates/sequence_view/style.html b/monitoring/uss_qualifier/reports/templates/sequence_view/style.html index 05095c4925..6f962d0ea5 100644 --- a/monitoring/uss_qualifier/reports/templates/sequence_view/style.html +++ b/monitoring/uss_qualifier/reports/templates/sequence_view/style.html @@ -68,5 +68,9 @@ .failed_check_summary { font-style: italic; } + .minor_note { + font-style: italic; + font-size: 10px; + } diff --git a/monitoring/uss_qualifier/reports/templates/tested_requirements/participant_tested_requirements.html b/monitoring/uss_qualifier/reports/templates/tested_requirements/participant_tested_requirements.html index 26b245cf9e..178017e063 100644 --- a/monitoring/uss_qualifier/reports/templates/tested_requirements/participant_tested_requirements.html +++ b/monitoring/uss_qualifier/reports/templates/tested_requirements/participant_tested_requirements.html @@ -65,6 +65,10 @@ .has_todo { background-color: rgb(255, 255, 192); } + .minor_note { + font-style: italic; + font-size: 10px; + } @@ -129,6 +133,7 @@

Test run

+
Artifact generated by {{ codebase_version }}

Tested requirements

diff --git a/monitoring/uss_qualifier/reports/tested_requirements/generate.py b/monitoring/uss_qualifier/reports/tested_requirements/generate.py index abf01b9be6..3ca14c2b3d 100644 --- a/monitoring/uss_qualifier/reports/tested_requirements/generate.py +++ b/monitoring/uss_qualifier/reports/tested_requirements/generate.py @@ -8,7 +8,7 @@ from implicitdict import ImplicitDict, StringBasedDateTime from monitoring.monitorlib.inspection import import_submodules -from monitoring.monitorlib.versioning import repo_url_of +from monitoring.monitorlib.versioning import repo_url_of, get_code_version from monitoring.uss_qualifier import scenarios, suites, action_generators from monitoring.uss_qualifier.action_generators.documentation.definitions import ( PotentialGeneratedAction, @@ -308,6 +308,7 @@ def generate_tested_requirements( overall_status=overall_status, system_version=system_version, ParticipantVerificationStatus=ParticipantVerificationStatus, + codebase_version=get_code_version(), ) )