Skip to content

Commit fbfa88d

Browse files
authored
Update list new environment variables (#3062)
1 parent a600422 commit fbfa88d

File tree

6 files changed

+43
-9
lines changed

6 files changed

+43
-9
lines changed

.github/actions/get-latest-upstream/action.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,24 @@ runs:
1616
steps:
1717
- name: Get latest upstream
1818
shell: bash
19+
env:
20+
AUTHORS: ${{ vars.AUTHORS || 'SeleniumHQ' }}
1921
run: |
2022
sudo apt update
2123
sudo apt install jq
2224
AUTH_HEADER="Authorization: token ${{ inputs.gh_cli_token }}"
2325
if [ "${{ inputs.release }}" = "true" ]; then
2426
echo "Getting the latest stable release."
25-
RELEASE=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/SeleniumHQ/selenium/releases | jq -r '[.[]? | select(.prerelease == false)] | .[0].tag_name')
27+
RELEASE=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/${AUTHORS}/selenium/releases | jq -r '[.[]? | select(.prerelease == false)] | .[0].tag_name')
2628
else
2729
echo "Getting the latest Nightly release."
28-
RELEASE=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/SeleniumHQ/selenium/releases | jq -r '[.[]? | select(.prerelease == true)] | .[0].tag_name' || echo "")
30+
RELEASE=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/${AUTHORS}/selenium/releases | jq -r '[.[]? | select(.prerelease == true)] | .[0].tag_name' || echo "")
2931
if [ -z "${RELEASE}" ] || [ "${RELEASE}" = "null" ]; then
3032
echo "Nightly release not found, getting the latest stable release."
31-
RELEASE=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/SeleniumHQ/selenium/releases | jq -r '[.[]? | select(.prerelease == false)] | .[0].tag_name')
33+
RELEASE=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/${AUTHORS}/selenium/releases | jq -r '[.[]? | select(.prerelease == false)] | .[0].tag_name')
3234
fi
3335
fi
34-
jar_file=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/SeleniumHQ/selenium/releases/tags/${RELEASE} | jq -r '.assets[] | select(.name | endswith(".jar")) | .name' | tail -n 1)
36+
jar_file=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/${AUTHORS}/selenium/releases/tags/${RELEASE} | jq -r '.assets[] | select(.name | endswith(".jar")) | .name' | tail -n 1)
3537
echo "Server package: ${jar_file}"
3638
VERSION=$(echo $jar_file | sed 's/selenium-server-//;s/\.jar//')
3739
echo "BASE_RELEASE=${RELEASE} | BASE_VERSION=${VERSION} | VERSION=${VERSION}"

ENV_VARIABLES.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
| SE_NODE_ENABLE_CDP | | Enable CDP proxying in Grid. A Grid admin can disable CDP if the network doesnot allow websockets. True by default. | --enable-cdp |
8080
| SE_NODE_REGISTER_PERIOD | 120 | | --register-period |
8181
| SE_NODE_REGISTER_CYCLE | 10 | | --register-cycle |
82-
| SE_NODE_HEARTBEAT_PERIOD | 30 | | --heartbeat-period |
82+
| SE_NODE_HEARTBEAT_PERIOD | 15 | | --heartbeat-period |
8383
| SE_REGISTRATION_SECRET | | | --registration-secret |
8484
| SE_BROWSER_LEFTOVERS_PROCESSES_SECS | 7200 | | |
8585
| SE_BROWSER_LEFTOVERS_TEMPFILES_DAYS | 1 | | |
@@ -155,3 +155,7 @@
155155
| SE_NODE_DELETE_SESSION_ON_UI | true | Enable capability to support deleting session on Grid UI | --delete-session-on-ui |
156156
| SE_UPDATE_CHROME_COMPONENTS | | Applicable for node-chrome, standalone-chrome (arch linux/amd64). Update the latest version of Chrome and ChromeDriver at the beginning of the container startup. Read more: [#2872](https://github.com/SeleniumHQ/docker-selenium/pull/2872) | |
157157
| SE_DISTRIBUTOR_SLOT_SELECTOR | | Full class name of non-default slot selector. This is used to select a slot in a Node once the Node has been matched. Switch to built-in Greedy strategy, use class name `org.openqa.selenium.grid.distributor.selector.GreedySlotSelector` | --slot-selector |
158+
| SE_EVENT_BUS_HEARTBEAT_PERIOD | | How often, in seconds, will the EventBus socket send heartbeats | --eventbus-heartbeat-period |
159+
| SE_NODE_ENABLE_BROWSER | | Checkout usage of SE_NODE_ENABLE_BROWSER_* in below | |
160+
| SE_NODE_ENABLE_BROWSER_ | | This is used in node/standalone all browsers in one container, append suffix CHROME, FIREFOX or EDGE to disable correspoding browser in Node stereotypes. For example: SE_NODE_ENABLE_BROWSER_CHROME=false | |
161+
| SE_NODE_DOWN_FAILURE_THRESHOLD | 0 | Maximum number of consecutive session creation failures before the Node is marked as DOWN. This helps detect and isolate unhealthy Nodes that consistently fail to create sessions. A value of 0 (default) disables this feature, allowing unlimited retries. A value higher than zero enables this feature. | --node-down-failure-threshold |

NodeBase/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ ENV LANG_WHICH=${LANG_WHICH} \
4242
SE_EVENT_BUS_SUBSCRIBE_PORT="4443" \
4343
# Drain the Node after N sessions (a value higher than zero enables the feature)
4444
SE_DRAIN_AFTER_SESSION_COUNT="0" \
45+
SE_NODE_DOWN_FAILURE_THRESHOLD="0" \
4546
SE_NODE_MAX_SESSIONS="1" \
4647
SE_NODE_SESSION_TIMEOUT="300" \
4748
SE_NODE_OVERRIDE_MAX_SESSIONS="false" \
48-
SE_NODE_HEARTBEAT_PERIOD="30" \
49+
SE_NODE_HEARTBEAT_PERIOD="15" \
4950
SE_NODE_REGISTER_PERIOD="120" \
5051
SE_NODE_REGISTER_CYCLE="10" \
5152
SE_NODE_REGISTER_SHUTDOWN_ON_FAILURE="true" \

NodeBase/start-selenium-node.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ if [ ! -z "$SE_NODE_HEARTBEAT_PERIOD" ]; then
8888
append_se_opts "--heartbeat-period" "${SE_NODE_HEARTBEAT_PERIOD}"
8989
fi
9090

91+
if [ ! -z "$SE_NODE_DOWN_FAILURE_THRESHOLD" ]; then
92+
append_se_opts "--node-down-failure-threshold" "${SE_NODE_DOWN_FAILURE_THRESHOLD}"
93+
fi
94+
9195
if [ ! -z "$SE_LOG_LEVEL" ]; then
9296
append_se_opts "--log-level" "${SE_LOG_LEVEL}"
9397
fi

scripts/generate_list_env_vars/description.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,3 +494,20 @@
494494
a slot in a Node once the Node has been matched. Switch to built-in Greedy strategy,
495495
use class name `org.openqa.selenium.grid.distributor.selector.GreedySlotSelector`
496496
cli: --slot-selector
497+
- name: SE_EVENT_BUS_HEARTBEAT_PERIOD
498+
description: How often, in seconds, will the EventBus socket send heartbeats
499+
cli: --eventbus-heartbeat-period
500+
- name: SE_NODE_ENABLE_BROWSER
501+
description: Checkout usage of SE_NODE_ENABLE_BROWSER_* in below
502+
cli: ''
503+
- name: SE_NODE_ENABLE_BROWSER_
504+
description: 'This is used in node/standalone all browsers in one container, append
505+
suffix CHROME, FIREFOX or EDGE to disable correspoding browser in Node stereotypes.
506+
For example: SE_NODE_ENABLE_BROWSER_CHROME=false'
507+
cli: ''
508+
- name: SE_NODE_DOWN_FAILURE_THRESHOLD
509+
description: Maximum number of consecutive session creation failures before the
510+
Node is marked as DOWN. This helps detect and isolate unhealthy Nodes that consistently
511+
fail to create sessions. A value of 0 (default) disables this feature, allowing
512+
unlimited retries. A value higher than zero enables this feature.
513+
cli: --node-down-failure-threshold

scripts/generate_list_env_vars/value.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
default: 'false'
2929
- name: SE_ENABLE_TRACING
3030
default: 'true'
31+
- name: SE_EVENT_BUS_HEARTBEAT_PERIOD
32+
default: ''
3133
- name: SE_EVENT_BUS_HOST
3234
default: ''
3335
- name: SE_EVENT_BUS_PORT
@@ -92,18 +94,22 @@
9294
default: 'true'
9395
- name: SE_NODE_DOCKER_CONFIG_FILENAME
9496
default: docker.toml
97+
- name: SE_NODE_DOWN_FAILURE_THRESHOLD
98+
default: '0'
99+
- name: SE_NODE_ENABLE_BROWSER
100+
default: ''
101+
- name: SE_NODE_ENABLE_BROWSER_
102+
default: ''
95103
- name: SE_NODE_ENABLE_CDP
96104
default: ''
97105
- name: SE_NODE_ENABLE_MANAGED_DOWNLOADS
98106
default: 'true'
99107
- name: SE_NODE_GRACEFUL_SHUTDOWN
100108
default: ''
101-
- name: SE_NODE_GRID_GRAPHQL_URL
102-
default: ''
103109
- name: SE_NODE_GRID_URL
104110
default: ''
105111
- name: SE_NODE_HEARTBEAT_PERIOD
106-
default: '30'
112+
default: '15'
107113
- name: SE_NODE_HOST
108114
default: ''
109115
- name: SE_NODE_MAX_SESSIONS

0 commit comments

Comments
 (0)