argus-alm 0.15.7__py3-none-any.whl → 0.15.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
argus/_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.15.7'
32
- __version_tuple__ = version_tuple = (0, 15, 7)
31
+ __version__ = version = '0.15.8'
32
+ __version_tuple__ = version_tuple = (0, 15, 8)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -2,6 +2,7 @@ import base64
2
2
  from typing import Any
3
3
  from uuid import UUID
4
4
  from dataclasses import asdict
5
+ from argus.common.email import RawAttachment, ReportSection, ReportSectionShortHand
5
6
  from argus.common.sct_types import GeminiResultsRequest, PerformanceResultsRequest, RawEventPayload
6
7
  from argus.common.enums import ResourceState, TestStatus
7
8
  from argus.client.base import ArgusClient
@@ -27,6 +28,7 @@ class ArgusSCTClient(ArgusClient):
27
28
  SUBMIT_EVENTS = "/sct/$id/events/submit"
28
29
  SUBMIT_EVENT = "/sct/$id/event/submit"
29
30
  SUBMIT_JUNIT_REPORT = "/sct/$id/junit/submit"
31
+ SUBMIT_EMAIL = "/testrun/report"
30
32
 
31
33
  def __init__(self, run_id: UUID, auth_token: str, base_url: str, api_version="v1", extra_headers: dict | None = None) -> None:
32
34
  super().__init__(auth_token, base_url, api_version, extra_headers=extra_headers)
@@ -136,6 +138,25 @@ class ArgusSCTClient(ArgusClient):
136
138
  )
137
139
  self.check_response(response)
138
140
 
141
+ def send_email(self, recipients: list[str], title: str = "#auto", sections: list[ReportSection | ReportSectionShortHand] = None, attachments: list[RawAttachment] | None = None) -> None:
142
+ """
143
+ Send a testrun report email using Argus.
144
+ Documentation: https://github.com/scylladb/argus/blob/master/docs/api_usage.md#L124
145
+ """
146
+ response = self.post(
147
+ endpoint=self.Routes.SUBMIT_EMAIL,
148
+ location_params={},
149
+ body={
150
+ **self.generic_body,
151
+ "run_id": self.run_id,
152
+ "title": title,
153
+ "recipients": recipients,
154
+ "sections": sections or [],
155
+ "attachments": attachments or [],
156
+ }
157
+ )
158
+ self.check_response(response)
159
+
139
160
  def submit_gemini_results(self, gemini_data: GeminiResultsRequest) -> None:
140
161
  """
141
162
  Submits gemini results such as oracle node information and gemini command & its results
argus/common/email.py ADDED
@@ -0,0 +1,33 @@
1
+
2
+ from typing import Any, Literal, TypedDict
3
+
4
+
5
+ class ReportSection(TypedDict):
6
+ type: str
7
+ options: dict[str, Any]
8
+
9
+
10
+ ReportSectionShortHand = Literal["main",
11
+ "header",
12
+ "packages",
13
+ "logs",
14
+ "cloud",
15
+ "nemesis",
16
+ "events",
17
+ "screenshots",
18
+ "custom_table",
19
+ "custom_html",]
20
+
21
+
22
+ class RawAttachment(TypedDict):
23
+ filename: str
24
+ data: str # Base64 string
25
+
26
+
27
+ class RawReportSendRequest(TypedDict):
28
+ schema_version: str
29
+ run_id: str
30
+ title: str
31
+ recipients: list[str]
32
+ sections: list[ReportSection]
33
+ attachments: list[RawAttachment]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: argus-alm
3
- Version: 0.15.7
3
+ Version: 0.15.8
4
4
  Summary: Argus
5
5
  Author-email: Alexey Kartashov <alexey.kartashov@scylladb.com>, Łukasz Sójka <lukasz.sojka@scylladb.com>
6
6
  License-Expression: Apache-2.0
@@ -1,5 +1,5 @@
1
1
  argus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- argus/_version.py,sha256=1O-7DXv_QP9x_lKXMnZu-0Tvd9ZtVB4QqmLlRj7ZHIk,706
2
+ argus/_version.py,sha256=OZz2ObefAkpiEMaFTa9SJuKISgl89HYDOVrF-rvuYh8,706
3
3
  argus/client/__init__.py,sha256=bO9_j5_jK5kvTHR46KEZ0Y-p0li7CBW8QSd-K5Ez4vA,42
4
4
  argus/client/base.py,sha256=FZ9-quDXwViWbz892XnuZlWJiAmzpnTgvkRXV9i8HlE,8423
5
5
  argus/client/generic_result.py,sha256=9D0zrpfEDiIL7PjL12TZnqk5Mi_1T1UvesF5wWeMfz0,6264
@@ -7,16 +7,17 @@ argus/client/driver_matrix_tests/cli.py,sha256=JpI0v1hzRQr9KkrxO7D4hEbkzumexFFC_
7
7
  argus/client/driver_matrix_tests/client.py,sha256=fFucqwog6WnDnje1xB-4ERfwHXblXP4upmtt9RtOkls,2806
8
8
  argus/client/generic/cli.py,sha256=jsdSwzwzefX1POyrZ4lFTRcjWPmTauuXBGjceM54Zk4,4707
9
9
  argus/client/generic/client.py,sha256=3MONtLIcF7rZ5x5OaAQKi4YGHCHb3-9ooCUhWtKs4C4,1971
10
- argus/client/sct/client.py,sha256=rlsuy6I3zZYKUUjJ07PaBlIfCyCpXB2l4eZoJ4waE-g,11943
10
+ argus/client/sct/client.py,sha256=3qn_2ioFEleg8XzZWXFvythTIpCwMPvLzXMBxf57fR8,12866
11
11
  argus/client/sct/types.py,sha256=VLgVe7qPmJtCLqtPnuX8N8kMKZq-iY3SKz68nvU6nJ4,371
12
12
  argus/client/sirenada/client.py,sha256=lzhmBFAUnvPSAJfCjeQ0L5nbp50Q0YLHwIondO9rvt4,6321
13
13
  argus/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ argus/common/email.py,sha256=YUgin4yA3-1bH6HbtXIh09SLAzYSzSJPKM9sIvroAMA,842
14
15
  argus/common/enums.py,sha256=FM308aseXxsaeOqoiyM-NIDWKHpbceLysd-sLDh7TkI,1287
15
16
  argus/common/sct_types.py,sha256=GX0S1_eH3eBOO17WqBVtsDKzz86vgL2VUM7gi9Cjrmc,1649
16
17
  argus/common/sirenada_types.py,sha256=CZH2JXA1KYUj29eXYe8rIAAWdN1XPqOsDPAXvM25bVQ,698
17
- argus_alm-0.15.7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
18
- argus_alm-0.15.7.dist-info/METADATA,sha256=k8ORcUno_hpWYcGefrNk1uHrkAKAuMuetlDswrBnVCY,5098
19
- argus_alm-0.15.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- argus_alm-0.15.7.dist-info/entry_points.txt,sha256=5mSBLLPndhFHKY5M9SCF8WhDBAArrj-S2IL-uoiaJiE,140
21
- argus_alm-0.15.7.dist-info/top_level.txt,sha256=Pea173vTU-Et8xmNCctS34REW4cH0Xmjyiztu0HuM0c,6
22
- argus_alm-0.15.7.dist-info/RECORD,,
18
+ argus_alm-0.15.8.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
19
+ argus_alm-0.15.8.dist-info/METADATA,sha256=fn-TaUp-ZELmGImVprz5aQxhcvm-vTPd9o9I9ZYF1bI,5098
20
+ argus_alm-0.15.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ argus_alm-0.15.8.dist-info/entry_points.txt,sha256=5mSBLLPndhFHKY5M9SCF8WhDBAArrj-S2IL-uoiaJiE,140
22
+ argus_alm-0.15.8.dist-info/top_level.txt,sha256=Pea173vTU-Et8xmNCctS34REW4cH0Xmjyiztu0HuM0c,6
23
+ argus_alm-0.15.8.dist-info/RECORD,,