Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OpenTelemetry jobs #49894

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ tests:
steps:
env:
SKIP_TESTS: tests/e2e-targetallocator/targetallocator-features tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer
tests/e2e-openshift/otlp-metrics-traces
test:
- as: install
cli: latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ tests:
steps:
env:
SKIP_TESTS: tests/e2e-targetallocator/targetallocator-features tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer
tests/e2e-openshift/otlp-metrics-traces
test:
- ref: operatorhub-subscribe-amq-streams
- ref: distributed-tracing-install-jaeger-product
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ tests:
env:
BASE_DOMAIN: qe.devcluster.openshift.com
SKIP_TESTS: tests/e2e-targetallocator/targetallocator-features tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer
tests/e2e-openshift/otlp-metrics-traces
test:
- ref: cucushift-hypershift-extended-health-check
- ref: cucushift-pre
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ tests:
steps:
env:
SKIP_TESTS: tests/e2e-targetallocator/targetallocator-features tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer
tests/e2e-openshift/otlp-metrics-traces
test:
- ref: operatorhub-subscribe-amq-streams
- ref: distributed-tracing-install-jaeger-product
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ else
rm -rf $SKIP_TESTS_TO_REMOVE
fi

# Enable required feature gates.
# Initialize a variable to keep track of errors
any_errors=false

# Set the operator args required for tests execution.
OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator | grep "opentelemetry-operator" | awk '{print $1}')
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\"]}]"
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\"]}]"
sleep 10
oc wait --for condition=Available -n opentelemetry-operator deployment opentelemetry-operator-controller-manager

Expand All @@ -127,9 +130,9 @@ else
tests/e2e-instrumentation \
tests/e2e-pdb \
tests/e2e-opampbridge \
tests/e2e-targetallocator
tests/e2e-targetallocator || any_errors=true

# Enable required feature gates.
# Set the operator args required for tests execution.
OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator | grep "opentelemetry-operator" | awk '{print $1}')
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\"]}]"
sleep 10
Expand All @@ -141,5 +144,27 @@ else
--report-path "$ARTIFACT_DIR" \
--report-format "XML" \
--test-dir \
tests/e2e-multi-instrumentation
tests/e2e-multi-instrumentation || any_errors=true

# Set the operator args required for tests execution.
OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator | grep "opentelemetry-operator" | awk '{print $1}')
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\"]}]"
sleep 10
oc wait --for condition=Available -n opentelemetry-operator deployment opentelemetry-operator-controller-manager

# Execute OpenTelemetry e2e tests
chainsaw test \
--report-name "$REPORT_NAME" \
--report-path "$ARTIFACT_DIR" \
--report-format "XML" \
--test-dir \
tests/e2e-metadata-filters || any_errors=true

# Check if any errors occurred
if $any_errors; then
echo "Tests failed, check the logs for more details."
exit 1
else
echo "All the tests passed."
fi
fi