Skip to content

Commit 91fcc8c

Browse files
authored
Update OpenTelemetry jobs (#49894)
1 parent 187740c commit 91fcc8c

5 files changed

+34
-5
lines changed

ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ tests:
8383
steps:
8484
env:
8585
SKIP_TESTS: tests/e2e-targetallocator/targetallocator-features tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer
86+
tests/e2e-openshift/otlp-metrics-traces
8687
test:
8788
- as: install
8889
cli: latest

ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.13-amd64-upgrade.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ tests:
8181
steps:
8282
env:
8383
SKIP_TESTS: tests/e2e-targetallocator/targetallocator-features tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer
84+
tests/e2e-openshift/otlp-metrics-traces
8485
test:
8586
- ref: operatorhub-subscribe-amq-streams
8687
- ref: distributed-tracing-install-jaeger-product

ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.13-hypershift.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ tests:
8080
env:
8181
BASE_DOMAIN: qe.devcluster.openshift.com
8282
SKIP_TESTS: tests/e2e-targetallocator/targetallocator-features tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer
83+
tests/e2e-openshift/otlp-metrics-traces
8384
test:
8485
- ref: cucushift-hypershift-extended-health-check
8586
- ref: cucushift-pre

ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.14-amd64.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ tests:
7777
steps:
7878
env:
7979
SKIP_TESTS: tests/e2e-targetallocator/targetallocator-features tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer
80+
tests/e2e-openshift/otlp-metrics-traces
8081
test:
8182
- ref: operatorhub-subscribe-amq-streams
8283
- ref: distributed-tracing-install-jaeger-product

ci-operator/step-registry/distributed-tracing/tests/opentelemetry/distributed-tracing-tests-opentelemetry-commands.sh

+30-5
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,12 @@ else
108108
rm -rf $SKIP_TESTS_TO_REMOVE
109109
fi
110110

111-
# Enable required feature gates.
111+
# Initialize a variable to keep track of errors
112+
any_errors=false
113+
114+
# Set the operator args required for tests execution.
112115
OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator | grep "opentelemetry-operator" | awk '{print $1}')
113-
oc -n opentelemetry-operator patch csv $OTEL_CSV_NAME --type=json -p "[{\"op\":\"replace\",\"path\":\"/spec/install/spec/deployments/0/spec/template/spec/containers/0/args\",\"value\":[\"--metrics-addr=127.0.0.1:8080\", \"--enable-leader-election\", \"--zap-log-level=info\", \"--zap-time-encoding=rfc3339nano\", \"--target-allocator-image=${TARGETALLOCATOR_IMG}\", \"--operator-opamp-bridge-image=${OPERATOROPAMPBRIDGE_IMG}\", \"--feature-gates=+operator.autoinstrumentation.go,+operator.observability.prometheus,+operator.autoinstrumentation.nginx\"]}]"
116+
oc -n opentelemetry-operator patch csv $OTEL_CSV_NAME --type=json -p "[{\"op\":\"replace\",\"path\":\"/spec/install/spec/deployments/0/spec/template/spec/containers/0/args\",\"value\":[\"--metrics-addr=127.0.0.1:8080\", \"--enable-leader-election\", \"--zap-log-level=info\", \"--zap-time-encoding=rfc3339nano\", \"--target-allocator-image=${TARGETALLOCATOR_IMG}\", \"--operator-opamp-bridge-image=${OPERATOROPAMPBRIDGE_IMG}\", \"--feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx\"]}]"
114117
sleep 10
115118
oc wait --for condition=Available -n opentelemetry-operator deployment opentelemetry-operator-controller-manager
116119

@@ -127,9 +130,9 @@ else
127130
tests/e2e-instrumentation \
128131
tests/e2e-pdb \
129132
tests/e2e-opampbridge \
130-
tests/e2e-targetallocator
133+
tests/e2e-targetallocator || any_errors=true
131134

132-
# Enable required feature gates.
135+
# Set the operator args required for tests execution.
133136
OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator | grep "opentelemetry-operator" | awk '{print $1}')
134137
oc -n opentelemetry-operator patch csv $OTEL_CSV_NAME --type=json -p "[{\"op\":\"replace\",\"path\":\"/spec/install/spec/deployments/0/spec/template/spec/containers/0/args\",\"value\":[\"--metrics-addr=127.0.0.1:8080\", \"--enable-leader-election\", \"--zap-log-level=info\", \"--zap-time-encoding=rfc3339nano\", \"--target-allocator-image=${TARGETALLOCATOR_IMG}\", \"--operator-opamp-bridge-image=${OPERATOROPAMPBRIDGE_IMG}\", \"--enable-multi-instrumentation\"]}]"
135138
sleep 10
@@ -141,5 +144,27 @@ else
141144
--report-path "$ARTIFACT_DIR" \
142145
--report-format "XML" \
143146
--test-dir \
144-
tests/e2e-multi-instrumentation
147+
tests/e2e-multi-instrumentation || any_errors=true
148+
149+
# Set the operator args required for tests execution.
150+
OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator | grep "opentelemetry-operator" | awk '{print $1}')
151+
oc -n opentelemetry-operator patch csv $OTEL_CSV_NAME --type=json -p "[{\"op\":\"replace\",\"path\":\"/spec/install/spec/deployments/0/spec/template/spec/containers/0/args\",\"value\":[\"--metrics-addr=127.0.0.1:8080\", \"--enable-leader-election\", \"--zap-log-level=info\", \"--zap-time-encoding=rfc3339nano\", \"--target-allocator-image=${TARGETALLOCATOR_IMG}\", \"--operator-opamp-bridge-image=${OPERATOROPAMPBRIDGE_IMG}\", \"--annotations-filter=*filter.out\", \"--labels=*filter.out\"]}]"
152+
sleep 10
153+
oc wait --for condition=Available -n opentelemetry-operator deployment opentelemetry-operator-controller-manager
154+
155+
# Execute OpenTelemetry e2e tests
156+
chainsaw test \
157+
--report-name "$REPORT_NAME" \
158+
--report-path "$ARTIFACT_DIR" \
159+
--report-format "XML" \
160+
--test-dir \
161+
tests/e2e-metadata-filters || any_errors=true
162+
163+
# Check if any errors occurred
164+
if $any_errors; then
165+
echo "Tests failed, check the logs for more details."
166+
exit 1
167+
else
168+
echo "All the tests passed."
169+
fi
145170
fi

0 commit comments

Comments
 (0)