Skip to content

Commit fa0428c

Browse files
committed
chore(argus): Update client to 0.15.6
This is an update to the client that brings in new event system.
1 parent d07d943 commit fa0428c

File tree

4 files changed

+45
-5
lines changed

4 files changed

+45
-5
lines changed

argus/_version.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
11
# file generated by setuptools-scm
22
# don't change, don't track in version control
33

4-
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4+
__all__ = [
5+
"__version__",
6+
"__version_tuple__",
7+
"version",
8+
"version_tuple",
9+
"__commit_id__",
10+
"commit_id",
11+
]
512

613
TYPE_CHECKING = False
714
if TYPE_CHECKING:
815
from typing import Tuple
916
from typing import Union
1017

1118
VERSION_TUPLE = Tuple[Union[int, str], ...]
19+
COMMIT_ID = Union[str, None]
1220
else:
1321
VERSION_TUPLE = object
22+
COMMIT_ID = object
1423

1524
version: str
1625
__version__: str
1726
__version_tuple__: VERSION_TUPLE
1827
version_tuple: VERSION_TUPLE
28+
commit_id: COMMIT_ID
29+
__commit_id__: COMMIT_ID
1930

20-
__version__ = version = '0.15.5'
21-
__version_tuple__ = version_tuple = (0, 15, 5)
31+
__version__ = version = '0.15.6'
32+
__version_tuple__ = version_tuple = (0, 15, 6)
33+
34+
__commit_id__ = commit_id = 'g46c898c68'

argus/client/sct/client.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing import Any
33
from uuid import UUID
44
from dataclasses import asdict
5-
from argus.common.sct_types import GeminiResultsRequest, PerformanceResultsRequest
5+
from argus.common.sct_types import GeminiResultsRequest, PerformanceResultsRequest, RawEventPayload
66
from argus.common.enums import ResourceState, TestStatus
77
from argus.client.base import ArgusClient
88
from argus.client.sct.types import EventsInfo, LogLink, Package
@@ -25,6 +25,7 @@ class Routes(ArgusClient.Routes):
2525
SUBMIT_PERFORMANCE_RESULTS = "/sct/$id/performance/submit"
2626
FINALIZE_NEMESIS = "/sct/$id/nemesis/finalize"
2727
SUBMIT_EVENTS = "/sct/$id/events/submit"
28+
SUBMIT_EVENT = "/sct/$id/event/submit"
2829
SUBMIT_JUNIT_REPORT = "/sct/$id/junit/submit"
2930

3031
def __init__(self, run_id: UUID, auth_token: str, base_url: str, api_version="v1", extra_headers: dict | None = None) -> None:
@@ -81,6 +82,17 @@ def update_scylla_version(self, version: str) -> None:
8182
response = super().update_product_version(run_type=self.test_type, run_id=self.run_id, product_version=version)
8283
self.check_response(response)
8384

85+
def submit_event(self, event_data: RawEventPayload | list[RawEventPayload]):
86+
response = self.post(
87+
endpoint=self.Routes.SUBMIT_EVENT,
88+
location_params={"id": str(self.run_id)},
89+
body={
90+
**self.generic_body,
91+
"data": event_data,
92+
}
93+
)
94+
self.check_response(response)
95+
8496
def submit_sct_logs(self, logs: list[LogLink]) -> None:
8597
"""
8698
Submits links to logs collected from nodes by SCT

argus/common/sct_types.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
from typing import TypedDict
22

33

4+
class RawEventPayload(TypedDict):
5+
run_id: str
6+
severity: str
7+
ts: float
8+
message: str
9+
event_type: str
10+
received_timestamp: str | None
11+
nemesis_name: str | None
12+
duration: float | None
13+
node: str | None
14+
target_node: str | None
15+
known_issue: str | None
16+
nemesis_status: str | None
17+
18+
419
class RawHDRHistogram(TypedDict):
520
start_time: int
621
percentile_90: float

argus/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.15.5
1+
0.15.6

0 commit comments

Comments
 (0)