Skip to content

Commit

Permalink
bug(#2038): Rollback io.opentelemetry 1.31.0 - add test tracing enabl…
Browse files Browse the repository at this point in the history
…ed (#2040)

Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
  • Loading branch information
VietND96 committed Dec 1, 2023
1 parent 113bb0a commit 8fd00ef
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 28 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/helm-chart-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ name: Lint and Test Helm Charts

on:
push:
paths:
- 'charts/selenium-grid/**'
pull_request:
paths:
- 'charts/selenium-grid/**'
workflow_dispatch:

permissions:
Expand Down
5 changes: 4 additions & 1 deletion Base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ RUN curl -fLo /tmp/cs https://github.com/coursier/launchers/raw/master/coursier
&& mkdir -p /external_jars \
&& chmod -R 775 /external_jars

RUN /tmp/cs fetch --classpath --cache /external_jars io.opentelemetry:opentelemetry-exporter-otlp:1.32.0 io.opentelemetry:opentelemetry-exporter-jaeger:1.32.0 io.grpc:grpc-netty:1.59.0 > /external_jars/.classpath.txt
RUN /tmp/cs fetch --classpath --cache /external_jars \
io.opentelemetry:opentelemetry-exporter-otlp:1.31.0 \
io.opentelemetry:opentelemetry-exporter-jaeger:1.31.0 \
io.grpc:grpc-netty:1.59.0 > /external_jars/.classpath.txt

RUN chmod 664 /external_jars/.classpath.txt
RUN rm -fr /root/.cache/*
Expand Down
4 changes: 2 additions & 2 deletions Distributor/start-selenium-grid-distributor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
Expand Down
4 changes: 2 additions & 2 deletions EventBus/start-selenium-grid-eventbus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
Expand Down
5 changes: 2 additions & 3 deletions Hub/start-selenium-grid-hub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
echo "Tracing is disabled"
fi


java ${JAVA_OPTS:-$SE_JAVA_OPTS} \
-jar /opt/selenium/selenium-server.jar \
${EXTRA_LIBS} hub \
Expand Down
4 changes: 2 additions & 2 deletions NodeBase/start-selenium-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
Expand Down
2 changes: 1 addition & 1 deletion NodeChrome/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ USER root
# google-chrome-unstable
#============================================
ARG CHROME_VERSION="google-chrome-stable"
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor | tee /etc/apt/trusted.gpg.d/google.gpg >/dev/null \
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update -qqy \
&& apt-get -qqy install \
Expand Down
4 changes: 2 additions & 2 deletions NodeDocker/start-selenium-grid-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
Expand Down
4 changes: 2 additions & 2 deletions Router/start-selenium-grid-router.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
Expand Down
4 changes: 2 additions & 2 deletions SessionQueue/start-selenium-grid-session-queue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
Expand Down
4 changes: 2 additions & 2 deletions Sessions/start-selenium-grid-sessions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
Expand Down
4 changes: 2 additions & 2 deletions Standalone/start-selenium-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
Expand Down
4 changes: 2 additions & 2 deletions StandaloneDocker/start-selenium-grid-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
Expand Down
4 changes: 4 additions & 0 deletions charts/selenium-grid/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ All related testing to this helm chart will be documented in this file.
| | Auto scaling with `scalingType` is `deployment` | &cross; |
| | Auto scaling with `autoscaling.scaledOptions.minReplicaCount` is `0` | &check; |
| Ingress | Ingress is enabled without `hostname` | &check; |
| | Ingress is enabled with `hostname` is set | &cross; |
| | Hub `sub-path` is set with Ingress `ImplementationSpecific` paths | &check; |
| Distributed components | `isolateComponents` is enabled | &check; |
| | `isolateComponents` is disabled | &cross; |
| Browser Nodes | Node `nameOverride` is set | &check; |
| | Sanity tests in node | &check; |
| | Video recorder is enabled in node | &cross; |
| | Node `extraEnvironmentVariables` is set value | &check; |
| General | Set new image registry via `global.seleniumGrid.imageRegistry` | &check; |
| Tracing | Enable tracing via `SE_ENABLE_TRACING` | &check; |
| | Disable tracing via `SE_ENABLE_TRACING` | &cross; |

## Build & test Docker images with Helm charts
Noted: These `make` commands are composed and tested on Linux x86_64.
Expand Down
13 changes: 13 additions & 0 deletions charts/selenium-grid/ci/tracing-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
hub:
extraEnvironmentVariables:
- name: SE_ENABLE_TRACING
value: "true"
- name: SE_JAVA_OPTS
value: "-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://{{ .Release.Name }}-jaeger-all-in-one-headless:14250 -Dotel.resource.attributes=service.name=selenium -Dotel.java.global-autoconfigure.enabled=true"

components:
extraEnvironmentVariables:
- name: SE_ENABLE_TRACING
value: "true"
- name: SE_JAVA_OPTS
value: "-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://{{ .Release.Name }}-jaeger-all-in-one-headless:14250 -Dotel.resource.attributes=service.name=selenium -Dotel.java.global-autoconfigure.enabled=true"
3 changes: 2 additions & 1 deletion tests/K8s/chart_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ trap 'on_failure' ERR
echo "Deploy Selenium Grid Chart"
helm upgrade --install ${RELEASE_NAME} \
-f ${TEST_VALUES_PATH}/auth-ingress-values.yaml \
-f ${TEST_VALUES_PATH}/autoscaling-values.yaml \
-f ${TEST_VALUES_PATH}/tracing-values.yaml \
-f ${TEST_VALUES_PATH}/${MATRIX_BROWSER}-values.yaml \
-f ${TEST_VALUES_PATH}/autoscaling-values.yaml \
--set autoscaling.enableWithExistingKEDA=${SELENIUM_GRID_AUTOSCALING} \
--set autoscaling.scaledOptions.minReplicaCount=${SELENIUM_GRID_AUTOSCALING_MIN_REPLICA} \
--set global.seleniumGrid.imageTag=${VERSION} --set global.seleniumGrid.imageRegistry=${NAMESPACE} \
Expand Down

0 comments on commit 8fd00ef

Please sign in to comment.