From 10a4594282eba37bf914bb61fd63cadfd780a954 Mon Sep 17 00:00:00 2001 From: Naoto Ono Date: Mon, 4 Sep 2023 10:50:26 +0900 Subject: [PATCH] Define Warning as an error instead of normal event --- launchable/commands/subset.py | 6 +++--- launchable/utils/tracking.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/launchable/commands/subset.py b/launchable/commands/subset.py index 678987744..bfb80021c 100644 --- a/launchable/commands/subset.py +++ b/launchable/commands/subset.py @@ -206,9 +206,9 @@ def subset( fg="yellow"), err=True, ) - tracking_client.send_event( - event_name=Tracking.Event.WARNING, - metadata={"warningMessage": msg} + tracking_client.send_error_event( + event_name=Tracking.ErrorEvent.WARNING_ERROR, + stack_trace=msg ) if prioritize_tests_failed_within_hours is not None and prioritize_tests_failed_within_hours > 0: diff --git a/launchable/utils/tracking.py b/launchable/utils/tracking.py index e30c93642..532862f9b 100644 --- a/launchable/utils/tracking.py +++ b/launchable/utils/tracking.py @@ -11,13 +11,13 @@ class Tracking: # General events class Event(Enum): - WARNING = 'WARNING' SHALLOW_CLONE = 'shallow_clone' # this event is an example # Error events class ErrorEvent(Enum): UNKNOWN_ERROR = 'UNKNOWN_ERROR' INTERNAL_CLI_ERROR = 'INTERNAL_CLI_ERROR' + WARNING_ERROR = 'WARNING_ERROR' # Errors related to requests package NETWORK_ERROR = 'NETWORK_ERROR' TIMEOUT_ERROR = 'TIMEOUT_ERROR'