Skip to content

Commit be50ba3

Browse files
committed
run precommit
1 parent 3d9ffe0 commit be50ba3

4 files changed

Lines changed: 16 additions & 18 deletions

File tree

docs/modules/hdfs/pages/usage-guide/monitoring.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Starting with Stackable Data Platform 25.7, the built-in Prometheus metrics are
1212
The JMX exporter metrics are now deprecated and will be removed in a future release.
1313
====
1414

15-
This endpoint, in the case of the Namenode service, is reachable via the the `metrics` service:
15+
This endpoint, in the case of the Namenode service, is reachable via the the `metrics` service:
1616
[source,shell]
1717
----
1818
http://<hdfs-stacklet>-namenode-<rolegroup-name>-metrics:9870/prom

tests/templates/kuttl/logging/test_log_aggregation.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def check_sent_events():
2323
},
2424
)
2525

26-
assert (
27-
response.status_code == 200
28-
), "Cannot access the API of the vector aggregator."
26+
assert response.status_code == 200, (
27+
"Cannot access the API of the vector aggregator."
28+
)
2929

3030
result = response.json()
3131

@@ -35,13 +35,13 @@ def check_sent_events():
3535
componentId = transform["componentId"]
3636

3737
if componentId == "filteredInvalidEvents":
38-
assert (
39-
sentEvents is None or sentEvents["sentEventsTotal"] == 0
40-
), "Invalid log events were sent."
38+
assert sentEvents is None or sentEvents["sentEventsTotal"] == 0, (
39+
"Invalid log events were sent."
40+
)
4141
else:
42-
assert (
43-
sentEvents is not None and sentEvents["sentEventsTotal"] > 0
44-
), f'No events were sent in "{componentId}".'
42+
assert sentEvents is not None and sentEvents["sentEventsTotal"] > 0, (
43+
f'No events were sent in "{componentId}".'
44+
)
4545

4646

4747
if __name__ == "__main__":

tests/templates/kuttl/profiling/run-profiler.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
def start_profiling_and_get_refresh_header(service_url):
1010
prof_page = requests.get(
11-
f"{service_url}/prof"
12-
f"?event={EVENT_TYPE}&duration={PROFILING_DURATION_IN_SEC}"
11+
f"{service_url}/prof?event={EVENT_TYPE}&duration={PROFILING_DURATION_IN_SEC}"
1312
)
1413

1514
assert prof_page.ok, f"""Profiling could not be started.
@@ -56,7 +55,7 @@ def fetch_flamegraph(service_url, refresh_path):
5655

5756
def test_profiling(role, port):
5857
service_url = (
59-
f"http://test-hdfs-{role}-default-0.test-hdfs-{role}-default-headless" f":{port}"
58+
f"http://test-hdfs-{role}-default-0.test-hdfs-{role}-default-headless:{port}"
6059
)
6160

6261
print(f"Test profiling on {service_url}")

tests/templates/kuttl/smoke/test_native_metrics.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111

1212
def check_metrics(
13-
namespace: str,
14-
role: str,
15-
port: int,
16-
expected_metrics: list[str]
13+
namespace: str, role: str, port: int, expected_metrics: list[str]
1714
) -> None:
1815
response = requests.get(
1916
f"http://hdfs-{role}-default-metrics.{namespace}.svc.cluster.local:{port}/prom",
@@ -23,7 +20,9 @@ def check_metrics(
2320

2421
for metric in expected_metrics:
2522
regex = re.compile(metric, re.MULTILINE)
26-
assert regex.search(response.text) is not None, f"Metric '{metric}' not found for {role}"
23+
assert regex.search(response.text) is not None, (
24+
f"Metric '{metric}' not found for {role}"
25+
)
2726

2827

2928
def check_namenode_metrics(namespace: str) -> None:

0 commit comments

Comments
 (0)