argus-alm 0.15.9__py3-none-any.whl → 0.15.11__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.9'
32
- __version_tuple__ = version_tuple = (0, 15, 9)
31
+ __version__ = version = '0.15.11'
32
+ __version_tuple__ = version_tuple = (0, 15, 11)
33
33
 
34
34
  __commit_id__ = commit_id = None
argus/client/base.py CHANGED
@@ -5,6 +5,8 @@ from typing import Any, Type
5
5
  from uuid import UUID
6
6
 
7
7
  import requests
8
+ from requests.adapters import HTTPAdapter
9
+ from urllib3.util.retry import Retry
8
10
 
9
11
  from argus.common.enums import TestStatus
10
12
  from argus.client.generic_result import GenericResultTable
@@ -33,11 +35,30 @@ class ArgusClient:
33
35
  FETCH_RESULTS = "/testrun/$type/$id/fetch_results"
34
36
  FINALIZE = "/testrun/$type/$id/finalize"
35
37
 
36
- def __init__(self, auth_token: str, base_url: str, api_version="v1", extra_headers: dict | None = None) -> None:
38
+ def __init__(self, auth_token: str, base_url: str, api_version="v1", extra_headers: dict | None = None,
39
+ timeout: int = 60, max_retries: int = 3) -> None:
37
40
  self._auth_token = auth_token
38
41
  self._base_url = base_url
39
42
  self._api_ver = api_version
43
+ self._timeout = timeout
40
44
  self.session = requests.Session()
45
+
46
+ # Configure retry strategy
47
+ retry_strategy = Retry(
48
+ total=max_retries,
49
+ connect=max_retries,
50
+ read=max_retries,
51
+ status=0,
52
+ backoff_factor=1,
53
+ status_forcelist=(),
54
+ allowed_methods=["GET"],
55
+ )
56
+
57
+ # Mount adapter with retry strategy for both http and https
58
+ adapter = HTTPAdapter(max_retries=retry_strategy)
59
+ self.session.mount("http://", adapter)
60
+ self.session.mount("https://", adapter)
61
+
41
62
  if extra_headers:
42
63
  self.session.headers.update(extra_headers)
43
64
 
@@ -101,7 +122,8 @@ class ArgusClient:
101
122
  response = self.session.get(
102
123
  url=url,
103
124
  params=params,
104
- headers=self.request_headers
125
+ headers=self.request_headers,
126
+ timeout=self._timeout
105
127
  )
106
128
  LOGGER.debug("GET Response: %s %s", response.status_code, response.url)
107
129
 
@@ -124,6 +146,7 @@ class ArgusClient:
124
146
  params=params,
125
147
  json=body,
126
148
  headers=self.request_headers,
149
+ timeout=self._timeout
127
150
  )
128
151
  LOGGER.debug("POST Response: %s %s", response.status_code, response.url)
129
152
 
@@ -12,8 +12,10 @@ class ArgusDriverMatrixClient(ArgusClient):
12
12
  SUBMIT_DRIVER_FAILURE = "/driver_matrix/result/fail"
13
13
  SUBMIT_ENV = "/driver_matrix/env/submit"
14
14
 
15
- def __init__(self, run_id: UUID, auth_token: str, base_url: str, api_version="v1", extra_headers: dict | None = None) -> None:
16
- super().__init__(auth_token, base_url, api_version, extra_headers=extra_headers)
15
+ def __init__(self, run_id: UUID, auth_token: str, base_url: str, api_version="v1", extra_headers: dict | None = None,
16
+ timeout: int = 60, max_retries: int = 3) -> None:
17
+ super().__init__(auth_token, base_url, api_version, extra_headers=extra_headers,
18
+ timeout=timeout, max_retries=max_retries)
17
19
  self.run_id = run_id
18
20
 
19
21
  def submit_driver_matrix_run(self, job_name: str, job_url: str) -> None:
@@ -12,8 +12,10 @@ class ArgusGenericClient(ArgusClient):
12
12
  class Routes(ArgusClient.Routes):
13
13
  TRIGGER_JOBS = "/planning/plan/trigger"
14
14
 
15
- def __init__(self, auth_token: str, base_url: str, api_version="v1", extra_headers: dict | None = None) -> None:
16
- super().__init__(auth_token, base_url, api_version, extra_headers=extra_headers)
15
+ def __init__(self, auth_token: str, base_url: str, api_version="v1", extra_headers: dict | None = None,
16
+ timeout: int = 180, max_retries: int = 3) -> None:
17
+ super().__init__(auth_token, base_url, api_version, extra_headers=extra_headers,
18
+ timeout=timeout, max_retries=max_retries)
17
19
 
18
20
  def submit_generic_run(self, build_id: str, run_id: str, started_by: str, build_url: str, sub_type: str = None, scylla_version: str | None = None):
19
21
  request_body = {
@@ -28,10 +28,13 @@ class ArgusSCTClient(ArgusClient):
28
28
  SUBMIT_EVENTS = "/sct/$id/events/submit"
29
29
  SUBMIT_EVENT = "/sct/$id/event/submit"
30
30
  SUBMIT_JUNIT_REPORT = "/sct/$id/junit/submit"
31
+ SUBMIT_STRESS_CMD = "/sct/$id//stress_cmd/submit"
31
32
  SUBMIT_EMAIL = "/testrun/report/email"
32
33
 
33
- def __init__(self, run_id: UUID, auth_token: str, base_url: str, api_version="v1", extra_headers: dict | None = None) -> None:
34
- super().__init__(auth_token, base_url, api_version, extra_headers=extra_headers)
34
+ def __init__(self, run_id: UUID, auth_token: str, base_url: str, api_version="v1", extra_headers: dict | None = None,
35
+ timeout: int = 60, max_retries: int = 3) -> None:
36
+ super().__init__(auth_token, base_url, api_version, extra_headers=extra_headers,
37
+ timeout=timeout, max_retries=max_retries)
35
38
  self.run_id = run_id
36
39
 
37
40
  def submit_sct_run(self, job_name: str, job_url: str, started_by: str, commit_id: str,
@@ -124,6 +127,22 @@ class ArgusSCTClient(ArgusClient):
124
127
  )
125
128
  self.check_response(response)
126
129
 
130
+ def add_stress_command(self, command: str, log_name: str, loader_name: str) -> None:
131
+ """
132
+ Submits stress command information to be viewed inside Argus.
133
+ """
134
+ response = self.post(
135
+ endpoint=self.Routes.SUBMIT_STRESS_CMD,
136
+ location_params={"id": str(self.run_id)},
137
+ body={
138
+ **self.generic_body,
139
+ "cmd": command,
140
+ "log_name": log_name,
141
+ "loader_name": loader_name,
142
+ }
143
+ )
144
+ self.check_response(response)
145
+
127
146
  def submit_screenshots(self, screenshot_links: list[str]) -> None:
128
147
  """
129
148
  Submits links to the screenshots from grafana, taken at the end of the test.
@@ -258,7 +277,8 @@ class ArgusSCTClient(ArgusClient):
258
277
  self.check_response(response)
259
278
 
260
279
  def submit_nemesis(self, name: str, class_name: str, start_time: int,
261
- target_name: str, target_ip: str, target_shards: int) -> None:
280
+ target_name: str, target_ip: str, target_shards: int,
281
+ description: str | None = None) -> None:
262
282
  """
263
283
  Submits a nemesis record. Should then be finalized by
264
284
  .finalize_nemesis method on nemesis completion.
@@ -275,6 +295,7 @@ class ArgusSCTClient(ArgusClient):
275
295
  "node_name": target_name,
276
296
  "node_ip": target_ip,
277
297
  "node_shards": target_shards,
298
+ "description": description,
278
299
  }
279
300
  }
280
301
  )
@@ -45,9 +45,11 @@ class ArgusSirenadaClient(ArgusClient):
45
45
  "skipped": "skipped"
46
46
  }
47
47
 
48
- def __init__(self, auth_token: str, base_url: str, api_version="v1", extra_headers: dict | None = None) -> None:
48
+ def __init__(self, auth_token: str, base_url: str, api_version="v1", extra_headers: dict | None = None,
49
+ timeout: int = 60, max_retries: int = 3) -> None:
49
50
  self.results_path: Path | None = None
50
- super().__init__(auth_token, base_url, api_version, extra_headers=extra_headers)
51
+ super().__init__(auth_token, base_url, api_version, extra_headers=extra_headers,
52
+ timeout=timeout, max_retries=max_retries)
51
53
 
52
54
  def _verify_required_files_exist(self, results_path: Path):
53
55
  assert (results_path / self._junit_xml_filename).exists(), "Missing jUnit XML results file!"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: argus-alm
3
- Version: 0.15.9
3
+ Version: 0.15.11
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
@@ -11,19 +11,22 @@ Description-Content-Type: text/markdown
11
11
  License-File: LICENSE
12
12
  Requires-Dist: requests>=2.26.0
13
13
  Requires-Dist: click>=8.1.3
14
+ Requires-Dist: lz4>=4.4.4
14
15
  Provides-Extra: web-backend
15
16
  Requires-Dist: PyYAML~=6.0.0; extra == "web-backend"
16
- Requires-Dist: scylla-driver>=3.26.8; extra == "web-backend"
17
+ Requires-Dist: scylla-driver>=3.29.4; extra == "web-backend"
17
18
  Requires-Dist: Flask~=3.0.0; extra == "web-backend"
18
19
  Requires-Dist: Flask-WTF~=1.0.0; extra == "web-backend"
19
20
  Requires-Dist: Flask-Login~=0.5.0; extra == "web-backend"
20
21
  Requires-Dist: humanize~=3.13.1; extra == "web-backend"
22
+ Requires-Dist: PyJWT[crypto]>=2.10.0; extra == "web-backend"
21
23
  Requires-Dist: python-magic~=0.4.24; extra == "web-backend"
22
24
  Requires-Dist: uwsgi~=2.0.20; extra == "web-backend"
23
25
  Requires-Dist: python-jenkins>=1.7.0; extra == "web-backend"
24
26
  Requires-Dist: python-slugify~=6.1.1; extra == "web-backend"
25
27
  Requires-Dist: pygithub>=2.6.1; extra == "web-backend"
26
28
  Requires-Dist: boto3~=1.38.9; extra == "web-backend"
29
+ Requires-Dist: jira>=3.10.5; extra == "web-backend"
27
30
  Requires-Dist: prometheus-flask-exporter>=0.23.2; extra == "web-backend"
28
31
  Provides-Extra: docker-image
29
32
  Requires-Dist: supervisor~=4.2.4; extra == "docker-image"
@@ -42,6 +45,8 @@ Requires-Dist: nox~=2025.5.1; extra == "dev"
42
45
  Requires-Dist: pytest-xdist~=3.7.0; extra == "dev"
43
46
  Requires-Dist: pytest-subtests~=0.14.1; extra == "dev"
44
47
  Requires-Dist: boto3-stubs~=1.38.9; extra == "dev"
48
+ Provides-Extra: ai
49
+ Requires-Dist: chromadb>=1.0.15; extra == "ai"
45
50
  Dynamic: license-file
46
51
 
47
52
  # Argus
@@ -0,0 +1,23 @@
1
+ argus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ argus/_version.py,sha256=zqWRzERP6dOOqpx9dfBOtMHiguUEuDl-DLBGfsrdxYQ,708
3
+ argus/client/__init__.py,sha256=bO9_j5_jK5kvTHR46KEZ0Y-p0li7CBW8QSd-K5Ez4vA,42
4
+ argus/client/base.py,sha256=M39ShKHcyIlpnFkvHgzpyUUBAf5BTTocYR8qOVg0pHA,9178
5
+ argus/client/generic_result.py,sha256=9D0zrpfEDiIL7PjL12TZnqk5Mi_1T1UvesF5wWeMfz0,6264
6
+ argus/client/driver_matrix_tests/cli.py,sha256=JpI0v1hzRQr9KkrxO7D4hEbkzumexFFC_iRM8558zHU,8375
7
+ argus/client/driver_matrix_tests/client.py,sha256=6wRRDO8tyM_1c3cP0vD-I4xkI8wKczb6-NPE-yvqy1g,2931
8
+ argus/client/generic/cli.py,sha256=jsdSwzwzefX1POyrZ4lFTRcjWPmTauuXBGjceM54Zk4,4707
9
+ argus/client/generic/client.py,sha256=-OLeLyXN5BBrv-QouDYH3IL3W17BhywiUrLEBA-CJzw,2097
10
+ argus/client/sct/client.py,sha256=Nk6zwvW9HE5HDHxpwpuYlg9dvYfa_8_6woDY7byZvYg,13714
11
+ argus/client/sct/types.py,sha256=VLgVe7qPmJtCLqtPnuX8N8kMKZq-iY3SKz68nvU6nJ4,371
12
+ argus/client/sirenada/client.py,sha256=RGgx4uSGI3LN55gJC4-DbCamVidA8IE2CQmU3-P9tx8,6446
13
+ argus/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ argus/common/email.py,sha256=YUgin4yA3-1bH6HbtXIh09SLAzYSzSJPKM9sIvroAMA,842
15
+ argus/common/enums.py,sha256=FM308aseXxsaeOqoiyM-NIDWKHpbceLysd-sLDh7TkI,1287
16
+ argus/common/sct_types.py,sha256=GX0S1_eH3eBOO17WqBVtsDKzz86vgL2VUM7gi9Cjrmc,1649
17
+ argus/common/sirenada_types.py,sha256=CZH2JXA1KYUj29eXYe8rIAAWdN1XPqOsDPAXvM25bVQ,698
18
+ argus_alm-0.15.11.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
19
+ argus_alm-0.15.11.dist-info/METADATA,sha256=cGDaU1VRC11FBFJZIaw6e7YYa2CQ2LPfyol4UXXR1R0,5304
20
+ argus_alm-0.15.11.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
21
+ argus_alm-0.15.11.dist-info/entry_points.txt,sha256=5mSBLLPndhFHKY5M9SCF8WhDBAArrj-S2IL-uoiaJiE,140
22
+ argus_alm-0.15.11.dist-info/top_level.txt,sha256=Pea173vTU-Et8xmNCctS34REW4cH0Xmjyiztu0HuM0c,6
23
+ argus_alm-0.15.11.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,23 +0,0 @@
1
- argus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- argus/_version.py,sha256=gt5tj7OMwRgQ07dEoPgpJ7sNJramWlO9Z6s7DoXbldM,706
3
- argus/client/__init__.py,sha256=bO9_j5_jK5kvTHR46KEZ0Y-p0li7CBW8QSd-K5Ez4vA,42
4
- argus/client/base.py,sha256=FZ9-quDXwViWbz892XnuZlWJiAmzpnTgvkRXV9i8HlE,8423
5
- argus/client/generic_result.py,sha256=9D0zrpfEDiIL7PjL12TZnqk5Mi_1T1UvesF5wWeMfz0,6264
6
- argus/client/driver_matrix_tests/cli.py,sha256=JpI0v1hzRQr9KkrxO7D4hEbkzumexFFC_iRM8558zHU,8375
7
- argus/client/driver_matrix_tests/client.py,sha256=fFucqwog6WnDnje1xB-4ERfwHXblXP4upmtt9RtOkls,2806
8
- argus/client/generic/cli.py,sha256=jsdSwzwzefX1POyrZ4lFTRcjWPmTauuXBGjceM54Zk4,4707
9
- argus/client/generic/client.py,sha256=3MONtLIcF7rZ5x5OaAQKi4YGHCHb3-9ooCUhWtKs4C4,1971
10
- argus/client/sct/client.py,sha256=xRiLZz8uUrF3ItqQ7LXne4vwDJ5M53VHIieHJDpUIZs,12872
11
- argus/client/sct/types.py,sha256=VLgVe7qPmJtCLqtPnuX8N8kMKZq-iY3SKz68nvU6nJ4,371
12
- argus/client/sirenada/client.py,sha256=lzhmBFAUnvPSAJfCjeQ0L5nbp50Q0YLHwIondO9rvt4,6321
13
- argus/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- argus/common/email.py,sha256=YUgin4yA3-1bH6HbtXIh09SLAzYSzSJPKM9sIvroAMA,842
15
- argus/common/enums.py,sha256=FM308aseXxsaeOqoiyM-NIDWKHpbceLysd-sLDh7TkI,1287
16
- argus/common/sct_types.py,sha256=GX0S1_eH3eBOO17WqBVtsDKzz86vgL2VUM7gi9Cjrmc,1649
17
- argus/common/sirenada_types.py,sha256=CZH2JXA1KYUj29eXYe8rIAAWdN1XPqOsDPAXvM25bVQ,698
18
- argus_alm-0.15.9.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
19
- argus_alm-0.15.9.dist-info/METADATA,sha256=YJFLIiE1FQkw_8A2gWCuZbeQl5MbhLCGmXPKNMc7qcc,5098
20
- argus_alm-0.15.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
- argus_alm-0.15.9.dist-info/entry_points.txt,sha256=5mSBLLPndhFHKY5M9SCF8WhDBAArrj-S2IL-uoiaJiE,140
22
- argus_alm-0.15.9.dist-info/top_level.txt,sha256=Pea173vTU-Et8xmNCctS34REW4cH0Xmjyiztu0HuM0c,6
23
- argus_alm-0.15.9.dist-info/RECORD,,