Skip to content

Commit

Permalink
Merge pull request #621 from launchableinc/change-warning-error-event
Browse files Browse the repository at this point in the history
Define Warning as an error instead of normal event
  • Loading branch information
ono-max authored Sep 4, 2023
2 parents c77f92a + 10a4594 commit 55be8eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions launchable/commands/subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion launchable/utils/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 55be8eb

Please sign in to comment.