diff --git a/monitoring/uss_qualifier/scenarios/scenario.py b/monitoring/uss_qualifier/scenarios/scenario.py index 73bc509531..6b8827fa3a 100644 --- a/monitoring/uss_qualifier/scenarios/scenario.py +++ b/monitoring/uss_qualifier/scenarios/scenario.py @@ -280,6 +280,14 @@ def record_note(self, key: str, message: str) -> None: ) if "notes" not in self._scenario_report: self._scenario_report.notes = {} + + if key in self._scenario_report.notes: + # prevent notes from being overriden by adding a suffix if key is a duplicate + suffix = 1 + while f"{key}_{suffix}" in self._scenario_report.notes: + suffix += 1 + key += f"_{suffix}" + self._scenario_report.notes[key] = Note( message=message, timestamp=StringBasedDateTime(arrow.utcnow().datetime),