diff --git a/CHANGELOG.md b/CHANGELOG.md index d8e98b00..dc0f55a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,7 +46,7 @@ All notable changes to this project will be documented in this file. - Bump stackable-operator to 0.119.0 ([#949]). - Bump `stackable-operator` to 0.121.0 and replace the unmaintained `serde_yaml` with `yaml_serde` ([#957]). - All pods now set `securityContext.seccompProfile.type` to `RuntimeDefault` ([#957]). -- test: Bump vector-aggregator to 0.58.0 ([#953]). +- Support Vector 0.58.0 ([#953], [#959]). ### Fixed @@ -83,6 +83,7 @@ All notable changes to this project will be documented in this file. [#953]: https://github.com/stackabletech/trino-operator/pull/953 [#956]: https://github.com/stackabletech/trino-operator/pull/956 [#957]: https://github.com/stackabletech/trino-operator/pull/957 +[#959]: https://github.com/stackabletech/trino-operator/pull/959 ## [26.7.0] - 2026-07-21 diff --git a/rust/operator-binary/src/controller/build/properties/product_logging/test-vector.sh b/rust/operator-binary/src/controller/build/properties/product_logging/test-vector.sh index a5cb4314..d4ed706f 100755 --- a/rust/operator-binary/src/controller/build/properties/product_logging/test-vector.sh +++ b/rust/operator-binary/src/controller/build/properties/product_logging/test-vector.sh @@ -1,15 +1,19 @@ #!/usr/bin/env sh -# Trino emits airlift timestamps as UTC (trailing `Z`). The shared transform matches the `Z` -# literally, so `parse_timestamp` assumes the host timezone; pin it to UTC (as the pods run) to -# keep the tests deterministic regardless of the host's timezone. -TZ=UTC \ -DATA_DIR=/stackable/log/_vector-state \ -LOG_DIR=/stackable/log \ -NAMESPACE=default \ -CLUSTER_NAME=trino \ -ROLE_NAME=coordinator \ -ROLE_GROUP_NAME=default \ -VECTOR_AGGREGATOR_ADDRESS=vector-aggregator \ -VECTOR_FILE_LOG_LEVEL=info \ +set -eu + +export DATA_DIR=/stackable/log/_vector-state +export LOG_DIR=/stackable/log +export NAMESPACE=default +export CLUSTER_NAME=trino +export ROLE_NAME=coordinator +export ROLE_GROUP_NAME=default +export VECTOR_AGGREGATOR_ADDRESS=http://vector-aggregator:6000 +export VECTOR_FILE_LOG_LEVEL=info + +# Required because vector.yaml contains ${...} placeholders +export VECTOR_DANGEROUSLY_ALLOW_ENV_VAR_INTERPOLATION=true + +vector validate --no-environment vector.yaml + vector test vector.yaml vector-test.yaml diff --git a/rust/operator-binary/src/controller/build/properties/product_logging/vector-test.yaml b/rust/operator-binary/src/controller/build/properties/product_logging/vector-test.yaml index f6af98be..fb50158e 100644 --- a/rust/operator-binary/src/controller/build/properties/product_logging/vector-test.yaml +++ b/rust/operator-binary/src/controller/build/properties/product_logging/vector-test.yaml @@ -17,6 +17,7 @@ tests: timestamp: 2025-10-02T09:27:28.582Z outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -47,6 +48,7 @@ tests: timestamp: 2025-10-02T09:27:28.582Z outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -76,6 +78,7 @@ tests: source_type: file outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -116,6 +119,7 @@ tests: version: 0.49.0 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -144,6 +148,7 @@ tests: level: INFO outputs: - extract_from: filtered_logs_vector + expected_event_count: 1 conditions: - type: vrl source: | diff --git a/rust/operator-binary/src/controller/build/properties/product_logging/vector.yaml b/rust/operator-binary/src/controller/build/properties/product_logging/vector.yaml index 0d922ac5..591952d9 100644 --- a/rust/operator-binary/src/controller/build/properties/product_logging/vector.yaml +++ b/rust/operator-binary/src/controller/build/properties/product_logging/vector.yaml @@ -71,7 +71,7 @@ transforms: timestamp_string, err = string(event.timestamp) if err == null { - parsed_timestamp, err = parse_timestamp(timestamp_string, "%Y-%m-%dT%H:%M:%S.%fZ") + parsed_timestamp, err = parse_timestamp(timestamp_string, "%Y-%m-%dT%H:%M:%S.%fZ", timezone: "Etc/UTC") if err == null { .timestamp = parsed_timestamp } else { @@ -108,7 +108,9 @@ transforms: # Extends the processed files with the fields "container" and "file" extended_logs_files: inputs: - - processed_files_* + - processed_files_stdout + - processed_files_stderr + - processed_files_airlift type: remap source: | del(.source_type) @@ -146,7 +148,8 @@ transforms: # Add the fields "namespace", "cluster", "role" and "roleGroup" to all logs extended_logs: inputs: - - extended_logs_* + - extended_logs_files + - extended_logs_vector type: remap source: | .namespace = "${NAMESPACE}" @@ -160,4 +163,8 @@ sinks: inputs: - extended_logs type: vector - address: ${VECTOR_AGGREGATOR_ADDRESS} + routing: + endpoints: + - ${VECTOR_AGGREGATOR_ADDRESS} + compression: zstd + keepalive: {} diff --git a/tests/templates/kuttl/logging/01-install-trino-vector-aggregator.yaml b/tests/templates/kuttl/logging/01-install-trino-vector-aggregator.yaml index 5e4d9ec1..a74346ee 100644 --- a/tests/templates/kuttl/logging/01-install-trino-vector-aggregator.yaml +++ b/tests/templates/kuttl/logging/01-install-trino-vector-aggregator.yaml @@ -14,4 +14,4 @@ kind: ConfigMap metadata: name: trino-vector-aggregator-discovery data: - ADDRESS: trino-vector-aggregator:6123 + ADDRESS: http://trino-vector-aggregator:6123