Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit 496b79a

Browse files
committed
Merge pull request #72 from seleniumhq-community/4.19.1 [deploy]
Sync upstream 4.19.1 Signed-off-by: Viet Nguyen Duc <[email protected]>
2 parents 80438d8 + 2339d4a commit 496b79a

File tree

17 files changed

+129
-29
lines changed

17 files changed

+129
-29
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ workflows:
338338
jobs:
339339
- deploy-multi-arch-full-grid:
340340
name: deploy-multi-arch-base
341-
platforms: linux/arm64,linux/amd64,linux/arm/v7
341+
platforms: linux/arm64,linux/amd64
342342
build-args: --push
343343
make-targets: base_multi
344344
machine-type: ubuntu2004arm64large
@@ -349,7 +349,7 @@ workflows:
349349
- deploy-multi-arch-full-grid:
350350
name: deploy-multi-arch-full-grid
351351
requires: [deploy-multi-arch-base]
352-
platforms: linux/arm64,linux/amd64,linux/arm/v7
352+
platforms: linux/arm64,linux/amd64
353353
build-args: --push
354354
make-targets: grid_multi
355355
machine-type: ubuntu2004arm64
@@ -360,7 +360,7 @@ workflows:
360360
- deploy-multi-arch-full-grid:
361361
name: deploy-multi-arch-node-base
362362
requires: [deploy-multi-arch-base]
363-
platforms: linux/arm64,linux/amd64,linux/arm/v7
363+
platforms: linux/arm64,linux/amd64
364364
build-args: --push
365365
make-targets: node_base_multi
366366
machine-type: ubuntu2004arm64large
@@ -371,7 +371,7 @@ workflows:
371371
- deploy-multi-arch-full-grid:
372372
name: deploy-multi-arch-firefox
373373
requires: [deploy-multi-arch-node-base]
374-
platforms: linux/arm64,linux/amd64,linux/arm/v7
374+
platforms: linux/arm64,linux/amd64
375375
build-args: --push
376376
make-targets: firefox_multi
377377
machine-type: ubuntu2004arm64large
@@ -382,7 +382,7 @@ workflows:
382382
- deploy-multi-arch-full-grid:
383383
name: deploy-multi-arch-chromium
384384
requires: [deploy-multi-arch-node-base]
385-
platforms: linux/arm64,linux/amd64,linux/arm/v7
385+
platforms: linux/arm64,linux/amd64
386386
build-args: --push
387387
make-targets: chromium_multi
388388
machine-type: ubuntu2004arm64large
@@ -393,7 +393,7 @@ workflows:
393393
- deploy-multi-arch-full-grid:
394394
name: deploy-multi-arch-release-notes
395395
requires: [deploy-multi-arch-firefox,deploy-multi-arch-chromium]
396-
platforms: linux/arm64,linux/amd64,linux/arm/v7
396+
platforms: linux/arm64,linux/amd64
397397
build-args: --push
398398
make-targets: tag_and_push_multi_arch_browser_images
399399
machine-type: ubuntu2004arm64

.github/workflows/test-video.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test video files
1+
name: Test Docker Selenium
22
concurrency:
33
group: ${{ github.workflow }}
44

@@ -36,7 +36,7 @@ jobs:
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
test-strategy: [test_video, test_parallel]
39+
test-strategy: [test_video, test_parallel, test_node_docker]
4040
steps:
4141
- uses: actions/checkout@main
4242
- name: Output Docker info

Base/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ LABEL authors="Selenium <[email protected]>"
66
ARG VERSION
77
ARG RELEASE=selenium-${VERSION}
88
# Default value should be aligned with upstream Selenium (https://github.com/SeleniumHQ/selenium/blob/trunk/java/maven_deps.bzl)
9-
ARG OPENTELEMETRY_VERSION=1.35.0
10-
ARG GRPC_VERSION=1.61.1
9+
ARG OPENTELEMETRY_VERSION=1.36.0
10+
ARG GRPC_VERSION=1.62.2
1111

1212
#Arguments to define the user running Selenium
1313
ARG SEL_USER=seluser

Makefile

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ NAME := $(or $(NAME),$(NAME),selenium)
22
CURRENT_DATE := $(shell date '+%Y%m%d')
33
BUILD_DATE := $(or $(BUILD_DATE),$(BUILD_DATE),$(CURRENT_DATE))
44
BASE_RELEASE := $(or $(BASE_RELEASE),$(BASE_RELEASE),selenium-4.19.0)
5-
BASE_VERSION := $(or $(BASE_VERSION),$(BASE_VERSION),4.19.0)
5+
BASE_VERSION := $(or $(BASE_VERSION),$(BASE_VERSION),4.19.1)
66
BASE_RELEASE_NIGHTLY := $(or $(BASE_RELEASE_NIGHTLY),$(BASE_RELEASE_NIGHTLY),nightly)
77
BASE_VERSION_NIGHTLY := $(or $(BASE_VERSION_NIGHTLY),$(BASE_VERSION_NIGHTLY),4.20.0-SNAPSHOT)
8-
VERSION := $(or $(VERSION),$(VERSION),4.19.0)
8+
VERSION := $(or $(VERSION),$(VERSION),4.19.1)
99
TAG_VERSION := $(VERSION)-$(BUILD_DATE)
1010
CHART_VERSION_NIGHTLY := $(or $(CHART_VERSION_NIGHTLY),$(CHART_VERSION_NIGHTLY),1.0.0-nightly)
1111
NAMESPACE := $(or $(NAMESPACE),$(NAMESPACE),$(NAME))
@@ -569,6 +569,25 @@ test_video: video hub chrome firefox edge
569569
docker run -u $$(id -u) -v $$(pwd):$$(pwd) -w $$(pwd) $(FFMPEG_BASED_NAME)/ffmpeg:$(FFMPEG_BASED_TAG) -v error -i ./tests/videos/firefox_video.mp4 -f null - 2>error.log
570570
docker run -u $$(id -u) -v $$(pwd):$$(pwd) -w $$(pwd) $(FFMPEG_BASED_NAME)/ffmpeg:$(FFMPEG_BASED_TAG) -v error -i ./tests/videos/edge_video.mp4 -f null - 2>error.log
571571

572+
test_node_docker: docker hub chrome firefox edge
573+
rm -rf ./tests/videos; mkdir -p ./tests/videos
574+
for node in StandaloneChrome StandaloneFirefox StandaloneEdge ; do \
575+
cd tests || true ; \
576+
echo NAMESPACE=$(NAME) > .env ; \
577+
echo TAG=$(TAG_VERSION) >> .env ; \
578+
echo VIDEO_TAG=$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) >> .env ; \
579+
echo TEST_DRAIN_AFTER_SESSION_COUNT=$(or $(TEST_DRAIN_AFTER_SESSION_COUNT), 0) >> .env ; \
580+
echo TEST_PARALLEL_HARDENING=$(or $(TEST_PARALLEL_HARDENING), "false") >> .env ; \
581+
echo LOG_LEVEL=$(or $(LOG_LEVEL), "INFO") >> .env ; \
582+
echo REQUEST_TIMEOUT=$(or $(REQUEST_TIMEOUT), 30) >> .env ; \
583+
echo NODE=$$node >> .env ; \
584+
echo UID=$$(id -u) >> .env ; \
585+
export $$(cat .env | xargs) ; \
586+
envsubst < config.toml > ./videos/config.toml ; \
587+
docker-compose -f docker-compose-v3-test-node-docker.yaml up --no-log-prefix --exit-code-from tests --build ; \
588+
if [ $$? -ne 0 ]; then exit 1; fi ; \
589+
done
590+
572591
test_custom_ca_cert:
573592
VERSION=$(TAG_VERSION) NAMESPACE=$(NAMESPACE) ./tests/customCACert/bootstrap.sh
574593

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Docker images for Selenium, built for Debian ARM64, ARM/v7, and AMD64
23

34
[![seleniumhq-community](https://circleci.com/gh/seleniumhq-community/docker-seleniarm.svg?style=shield)](https://app.circleci.com/pipelines/github/seleniumhq-community/docker-seleniarm)

build-and-push.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RELEASE=$(grep BASE_RELEASE Makefile | sed 's/.*,\([^)]*\))/\1/p' | head -n 1)
55
NAME="${NAME:-seleniarm}"
66
VERSION="${VERSION:-$SELENIUM_VERSION}"
77
BUILD_DATE="${BUILD_DATE:-$(date '+%Y%m%d')}"
8-
PLATFORMS="${PLATFORMS:-linux/arm64,linux/arm/v7,linux/amd64}"
8+
PLATFORMS="${PLATFORMS:-linux/arm64,linux/amd64}"
99
BUILD_ARGS=--push
1010

1111
FROM_IMAGE_ARGS="--build-arg NAMESPACE=$NAME --build-arg VERSION=$VERSION-$BUILD_DATE"

build-locally.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RELEASE=$(grep BASE_RELEASE Makefile | sed 's/.*,\([^)]*\))/\1/p' | head -n 1)
55
NAME="${NAME:-seleniarm}"
66
VERSION="${VERSION:-$SELENIUM_VERSION}"
77
BUILD_DATE="${BUILD_DATE:-$(date '+%Y%m%d')}"
8-
PLATFORMS="${PLATFORMS:-linux/arm64,linux/arm/v7,linux/amd64}"
8+
PLATFORMS="${PLATFORMS:-linux/arm64,linux/amd64}"
99
#BUILD_ARGS=--push
1010

1111
FROM_IMAGE_ARGS="--build-arg NAMESPACE=$NAME --build-arg VERSION=$VERSION-$BUILD_DATE"

charts/selenium-grid/configs/node/nodePreStop.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
probe_name="lifecycle.${1:-"preStop"}"
44

55
max_time=3
6+
retry_time=5
67

78
ID=$(echo $RANDOM)
89
tmp_node_file="/tmp/nodeProbe${ID}"
910

1011
function on_exit() {
1112
rm -rf ${tmp_node_file}
13+
echo "$(date +%FT%T%Z) [${probe_name}] - Exiting Node preStop..."
1214
}
1315
trap on_exit EXIT
1416

@@ -89,8 +91,12 @@ if curl -m ${max_time} -sfk ${SE_SERVER_PROTOCOL}://127.0.0.1:${SE_NODE_PORT}/st
8991
fi
9092
signal_node_to_drain
9193
# Wait for the current session to be finished if any
92-
while curl -m ${max_time} -sfk ${SE_SERVER_PROTOCOL}://127.0.0.1:${SE_NODE_PORT}/status -o ${tmp_node_file};
93-
do
94+
while true; do
95+
# Attempt the cURL request and capture the exit status
96+
endpoint_http_code=$(curl --retry ${retry_time} -m ${max_time} -sfk ${SE_SERVER_PROTOCOL}://127.0.0.1:${SE_NODE_PORT}/status -o ${tmp_node_file} -w "%{http_code}")
97+
endpoint_status=$?
98+
echo "$(date +%FT%T%Z) [${probe_name}] - Fetch the Node status via cURL with exit status: ${endpoint_status}, HTTP code: ${endpoint_http_code}"
99+
94100
SLOT_HAS_SESSION=$(jq -e ".value.node.slots[]|select(.session != null).id.id" ${tmp_node_file} | tr -d '"' || "")
95101
if [ -z "${SLOT_HAS_SESSION}" ]; then
96102
echo "$(date +%FT%T%Z) [${probe_name}] - There is no session running. Node is ready to be terminated."
@@ -99,7 +105,13 @@ if curl -m ${max_time} -sfk ${SE_SERVER_PROTOCOL}://127.0.0.1:${SE_NODE_PORT}/st
99105
exit 0
100106
else
101107
echo "$(date +%FT%T%Z) [${probe_name}] - Node preStop is waiting for current session on slot ${SLOT_HAS_SESSION} to be finished. Node details: message: $(jq -r '.value.message' ${tmp_node_file} || "unknown"), availability: $(jq -r '.value.node.availability' ${tmp_node_file} || "unknown")"
102-
sleep 1;
108+
sleep 2;
109+
fi
110+
111+
# If the cURL command failed, break the loop
112+
if [ ${endpoint_status} -ne 0 ] || [ "${endpoint_http_code}" != "200" ]; then
113+
echo "$(date +%FT%T%Z) [${probe_name}] - Node endpoint returned status ${endpoint_http_code:-"exit ${endpoint_status}"}, probably Node draining complete!"
114+
break
103115
fi
104116
done
105117
else

charts/selenium-grid/values.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ nodeConfigMap:
113113
# Directory where the extra scripts are mounted to
114114
extraScriptsDirectory: "/opt/selenium"
115115
extraScripts:
116-
nodePreStop.sh:
117-
nodeProbe.sh:
116+
nodePreStop.sh: ""
117+
nodeProbe.sh: ""
118118
# Name of volume mount is used to mount scripts in the ConfigMap
119119
scriptVolumeMountName:
120120
# Automatic browser leftovers cleanup stuck browser processes, tmp files
@@ -136,8 +136,8 @@ recorderConfigMap:
136136
extraScriptsDirectory: "/opt/bin"
137137
# List of extra scripts to be mounted to the container. Format as `filename: content`
138138
extraScripts:
139-
# video.sh:
140-
# video_graphQLQuery.sh:
139+
# video.sh: ""
140+
# video_graphQLQuery.sh: ""
141141
# Name of volume mount is used to mount scripts in the ConfigMap
142142
scriptVolumeMountName:
143143
videoVolumeMountName: videos
@@ -154,7 +154,7 @@ uploaderConfigMap:
154154
extraScriptsDirectory: "/opt/bin"
155155
# List of extra scripts to be mounted to the container. Format as `filename: content`
156156
extraScripts:
157-
upload.sh:
157+
upload.sh: ""
158158
# Extra files stored in Secret to be mounted to the container.
159159
secretFiles:
160160
upload.conf: "[sample]"

tests/bootstrap.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ if [ "${CI:-false}" = "false" ]; then
88
fi
99

1010
python -m pip install selenium==4.19.0 \
11-
docker===6.1.3 \
11+
docker===7.0.0 \
12+
chardet \
1213
| grep -v 'Requirement already satisfied'
1314

1415
if [ "${SELENIUM_GRID_PROTOCOL}" = "https" ]; then

0 commit comments

Comments
 (0)