Skip to content

Commit a3387f5

Browse files
authored
Upgrade vector (#378)
* adapt to vector upgrade * changelog * bump operator-rs * stackable image version * fix tests * fix linter * pr review
1 parent f254205 commit a3387f5

5 files changed

+36
-13
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ All notable changes to this project will be documented in this file.
88

99
- Default stackableVersion to operator version ([#381]).
1010

11+
### Changed
12+
13+
- `vector` `0.26.0` -> `0.31.0` ([#378]).
14+
- `operator-rs` `0.44.0` -> `0.45.1` ([#381]).
15+
16+
[#378]: https://github.com/stackabletech/hdfs-operator/pull/378
1117
[#381]: https://github.com/stackabletech/hdfs-operator/pull/381
1218

1319
## [23.7.0] - 2023-07-14

tests/kuttl-test.yaml.jinja2

+16
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,19 @@ testDirs:
99
startKIND: false
1010
suppress: ["events"]
1111
parallel: 2
12+
13+
# The timeout (in seconds) is used when namespaces are created or
14+
# deleted, and, if not overridden, in TestSteps, TestAsserts, and
15+
# Commands. If not set, the timeout is 30 seconds by default.
16+
#
17+
# The deletion of a namespace can take a while until all resources are
18+
# gracefully shut down. If the timeout is reached in the meantime, even
19+
# a successful test case is considered a failure.
20+
#
21+
# For instance, the termination grace period of the Vector aggregator in
22+
# the logging tests is set to 60 seconds. If there are logs entries
23+
# which could not be forwarded yet to the external aggregator defined in
24+
# the VECTOR_AGGREGATOR environment variable, then the test aggregator
25+
# uses this period of time by trying to forward the events. In this
26+
# case, deleting a namespace with several Pods takes about 90 seconds.
27+
timeout: 120

tests/templates/kuttl/logging/01-install-hdfs-vector-aggregator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ commands:
55
- script: >-
66
helm install hdfs-vector-aggregator vector
77
--namespace $NAMESPACE
8-
--version 0.20.1
8+
--version 0.23.0
99
--repo https://helm.vector.dev
1010
--values hdfs-vector-aggregator-values.yaml
1111
---

tests/templates/kuttl/logging/hdfs-vector-aggregator-values.yaml.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ customConfig:
192192
type: filter
193193
inputs: [vector]
194194
condition: |-
195-
.timestamp == to_timestamp!(0) ||
195+
.timestamp == from_unix_timestamp!(0) ||
196196
is_null(.level) ||
197197
is_null(.logger) ||
198198
is_null(.message)

tests/templates/kuttl/logging/test_log_aggregation.py

+12-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import requests
33

44

5-
def check_processed_events():
5+
def check_sent_events():
66
response = requests.post(
77
'http://hdfs-vector-aggregator:8686/graphql',
88
json={
@@ -12,8 +12,8 @@ def check_processed_events():
1212
nodes {
1313
componentId
1414
metrics {
15-
processedEventsTotal {
16-
processedEventsTotal
15+
sentEventsTotal {
16+
sentEventsTotal
1717
}
1818
}
1919
}
@@ -30,18 +30,19 @@ def check_processed_events():
3030

3131
transforms = result['data']['transforms']['nodes']
3232
for transform in transforms:
33+
sentEvents = transform['metrics']['sentEventsTotal']
3334
componentId = transform['componentId']
34-
processedEvents = transform['metrics']['processedEventsTotal']
35+
3536
if componentId == 'filteredInvalidEvents':
36-
assert processedEvents is None or \
37-
processedEvents['processedEventsTotal'] == 0, \
38-
'Invalid log events were processed.'
37+
assert sentEvents is None or \
38+
sentEvents['sentEventsTotal'] == 0, \
39+
'Invalid log events were sent.'
3940
else:
40-
assert processedEvents is not None and \
41-
processedEvents['processedEventsTotal'] > 0, \
42-
f'No events were processed in "{componentId}".'
41+
assert sentEvents is not None and \
42+
sentEvents['sentEventsTotal'] > 0, \
43+
f'No events were sent in "{componentId}".'
4344

4445

4546
if __name__ == '__main__':
46-
check_processed_events()
47+
check_sent_events()
4748
print('Test successful!')

0 commit comments

Comments
 (0)