Skip to content

Commit

Permalink
Upgrade Vector (#453)
Browse files Browse the repository at this point in the history
* wip

* Update changelog

* Update changelog again

* Check for sentEventsTotal.

* Set test suite timeout to 2 minutes.

* Downgrade serde to version 1.0.171

serde 1.0.172+ cannot currently be built with Nix because it uses
precompiled macros (see serde-rs/serde#2538).

* Rename custom filters.

---------

Co-authored-by: Siegfried Weber <mail@siegfriedweber.net>
  • Loading branch information
razvan and siegfriedweber authored Aug 3, 2023
1 parent edd0d2b commit 342ef07
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 54 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ All notable changes to this project will be documented in this file.

- Let controller watch `AuthenticationClasses` ([#449]).

### Changed

- `operator-rs` `0.44.0` -> `0.45.1` ([#441], [#453]).
- `vector` `0.26.0` -> `0.31.0` ([#453]).

[#441]: https://github.com/stackabletech/trino-operator/pull/441
[#449]: https://github.com/stackabletech/trino-operator/pull/449
[#453]: https://github.com/stackabletech/trino-operator/pull/453

## [23.7.0] - 2023-07-14

Expand Down
62 changes: 31 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions tests/kuttl-test.yaml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,18 @@ testDirs:
startKIND: false
suppress: ["events"]
parallel: 2
# The timeout (in seconds) is used when namespaces are created or
# deleted, and, if not overridden, in TestSteps, TestAsserts, and
# Commands.
#
# The deletion of a namespace can take a while until all resources are
# gracefully shut down. If the timeout is reached in the meantime, even
# a successful test case is considered a failure.
#
# For instance, the termination grace period of the Vector aggregator in
# the logging tests is set to 60 seconds. If there are logs entries
# which could not be forwarded yet to the external aggregator defined in
# the VECTOR_AGGREGATOR environment variable, then the test aggregator
# uses this period of time by trying to forward the events. In this
# case, deleting a namespace with several Pods takes about 90 seconds.
timeout: 120
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ commands:
- script: >-
helm install trino-vector-aggregator vector
--namespace $NAMESPACE
--version 0.19.0
--version 0.23.0
--repo https://helm.vector.dev
--values trino-vector-aggregator-values.yaml
---
Expand Down
21 changes: 14 additions & 7 deletions tests/templates/kuttl/logging/test_log_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import requests


def check_processed_events():
def check_sent_events():
response = requests.post(
'http://trino-vector-aggregator:8686/graphql',
json={
Expand All @@ -12,8 +12,8 @@ def check_processed_events():
nodes {
componentId
metrics {
processedEventsTotal {
processedEventsTotal
sentEventsTotal {
sentEventsTotal
}
}
}
Expand All @@ -30,12 +30,19 @@ def check_processed_events():

transforms = result['data']['transforms']['nodes']
for transform in transforms:
processedEvents = transform['metrics']['processedEventsTotal']['processedEventsTotal']
sentEvents = transform['metrics']['sentEventsTotal']
componentId = transform['componentId']
assert processedEvents > 0, \
f'No events were processed in "{componentId}".'

if componentId == 'filteredInvalidEvents':
assert sentEvents is None or \
sentEvents['sentEventsTotal'] == 0, \
'Invalid log events were sent.'
else:
assert sentEvents is not None and \
sentEvents['sentEventsTotal'] > 0, \
f'No events were sent in "{componentId}".'


if __name__ == '__main__':
check_processed_events()
check_sent_events()
print('Test successful!')
Loading

0 comments on commit 342ef07

Please sign in to comment.