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

Adding SLOs alert to chaos summary output [Telemetry] #136

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

shahsahil264
Copy link
Collaborator

No description provided.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I see here you added to the test the sloalert data structure, and that's fine, but you didn't test that it is correctly deserialized in the telemetry object through assertions. you should assert that slo_alert len is 2 and that sloalert[0].timestamp == 2024-10-23T15:25:47 and asloalert[0].severity == "high" etc.

@@ -426,6 +457,7 @@ def __init__(self, json_dict: any = None):
self.network_plugins = json_dict.get("network_plugins")
self.run_uuid = json_dict.get("run_uuid")
self.timestamp = json_dict.get("timestamp")
self.slo_alert = [SloAlert(a) for a in json_dict.get("slo_alert")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure that the SloAlert constructor accepts a dictionary? for what I see it accept three params. I'm not sure that python is able to automatically map a dictionary and even if it's able would be better that you explicitly set the value of each of the three params(readability) OR you set a special named parameter calle json_dict=nil and you perform the deserialization in the constructor (See all the other data models)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants