Skip to content

Commit 30fcd68

Browse files
committed
Fix format
1 parent f9767e6 commit 30fcd68

1 file changed

Lines changed: 12 additions & 17 deletions

File tree

website_and_docs/content/blog/2026/selenium-grid-4-41-deep-dive.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@ description: >
1111
We are excited to ship Selenium Grid 4.41.0 — and this release brings something meaningful for you
1212
---
1313

14-
# Selenium Grid 4.41.0: What's New and Why It Matters
14+
We are excited to ship Selenium Grid **4.41.0** 🎉 — and this might be one of impactful releases in recent memory. Whether you are running Grid in a bare-metal lab, a Docker Compose stack, or a sprawling Kubernetes cluster, this release brings something meaningful for you. From a brand-new **Dynamic Grid for Kubernetes**, a powerful **Session Event API**, to smarter video recording and a rock-solid Distributor, let's dig in.
1515

16-
---
17-
18-
## Overview
19-
20-
We are excited to ship Selenium Grid **4.41.0** — and this might be one of impactful releases in recent memory. Whether you are running Grid in a bare-metal lab, a Docker Compose stack, or a sprawling Kubernetes cluster, this release brings something meaningful for you. From a brand-new **Dynamic Grid for Kubernetes**, a powerful **Session Event API**, to smarter video recording and a rock-solid Distributor, let's dig in.
2116

2217
---
2318

@@ -408,23 +403,23 @@ A new [`traefik-servers-transport.yaml`](https://github.com/SeleniumHQ/docker-se
408403

409404
Three significant Distributor fixes ship in 4.41.0, addressing real concurrency issues that could manifest under load.
410405

411-
### Fix 1: Thread exhaustion in health-check cycle ([selenium#17104](https://github.com/SeleniumHQ/selenium/pull/17104), commit [`d8195c8`](https://github.com/SeleniumHQ/selenium/commit/d8195c8aa617c54d191523a5210f972978965b93))
406+
**Fix 1: Thread exhaustion in health-check cycle ([selenium#17104](https://github.com/SeleniumHQ/selenium/pull/17104), commit [`d8195c8`](https://github.com/SeleniumHQ/selenium/commit/d8195c8aa617c54d191523a5210f972978965b93))**
412407

413408
The `LocalDistributor` runs periodic health checks against all registered nodes. Under high node counts, a subtle bug caused the health-check executor thread pool to accumulate tasks faster than they were being consumed, eventually exhausting threads and causing new session requests to stall.
414409

415410
The fix refactors [`LocalNodeRegistry.java`](https://github.com/SeleniumHQ/selenium/blob/selenium-4.41.0/java/src/org/openqa/selenium/grid/distributor/local/LocalNodeRegistry.java) to decouple the health-check scheduling from the main distribution path, with 295 lines of new tests specifically exercising concurrent health-check scenarios.
416411

417-
### Fix 2: WebSocket connection counter leaks ([selenium#17106](https://github.com/SeleniumHQ/selenium/pull/17106), commit [`741fe01`](https://github.com/SeleniumHQ/selenium/commit/741fe01d276aa67a44b4a6c3590c060fd47d4f2f))
412+
**Fix 2: WebSocket connection counter leaks ([selenium#17106](https://github.com/SeleniumHQ/selenium/pull/17106), commit [`741fe01`](https://github.com/SeleniumHQ/selenium/commit/741fe01d276aa67a44b4a6c3590c060fd47d4f2f))**
418413

419414
[`ProxyNodeWebsockets`](https://github.com/SeleniumHQ/selenium/blob/selenium-4.41.0/java/src/org/openqa/selenium/grid/node/ProxyNodeWebsockets.java) tracks active WebSocket connections per node to respect `maxSessions`. A race condition in the connection bookkeeping could cause the counter to drift upward, making slots appear occupied when they were free. Over time this would cause nodes to appear artificially full.
420415

421416
The fix tightens the lifecycle management with try-finally guards around counter decrements, backed by 406 lines of dedicated unit tests.
422417

423-
### Fix 3: Retry session on executor shutdown ([selenium#17109](https://github.com/SeleniumHQ/selenium/pull/17109), commit [`527a40b`](https://github.com/SeleniumHQ/selenium/commit/527a40b30f01b272c1b7df1de122f8b16e3f79ce))
418+
**Fix 3: Retry session on executor shutdown ([selenium#17109](https://github.com/SeleniumHQ/selenium/pull/17109), commit [`527a40b`](https://github.com/SeleniumHQ/selenium/commit/527a40b30f01b272c1b7df1de122f8b16e3f79ce))**
424419

425420
When a [`RemoteNode`](https://github.com/SeleniumHQ/selenium/blob/selenium-4.41.0/java/src/org/openqa/selenium/grid/node/remote/RemoteNode.java)'s thread executor enters a shutdown state (e.g., during a graceful drain), session creation requests could be silently dropped instead of being returned to the queue for redistribution. The Distributor now detects `RejectedExecutionException` from a shutting-down executor and transparently retries the session on another available node.
426421

427-
### Deadlock prevention ([selenium#17022](https://github.com/SeleniumHQ/selenium/pull/17022), commit [`a47041a`](https://github.com/SeleniumHQ/selenium/commit/a47041a5398c7465bc52cac66e3e7d198c5befb5))
422+
**Deadlock prevention ([selenium#17022](https://github.com/SeleniumHQ/selenium/pull/17022), commit [`a47041a`](https://github.com/SeleniumHQ/selenium/commit/a47041a5398c7465bc52cac66e3e7d198c5befb5))**
428423

429424
[`LocalGridModel`](https://github.com/SeleniumHQ/selenium/blob/selenium-4.41.0/java/src/org/openqa/selenium/grid/distributor/local/LocalGridModel.java) contained a lock inversion risk between its internal state lock and the event bus listener lock. Under specific timing conditions this could deadlock the Distributor entirely. The fix restructures lock acquisition order with a dedicated test ([`LocalGridModelDeadlockTest.java`](https://github.com/SeleniumHQ/selenium/blob/selenium-4.41.0/java/test/org/openqa/selenium/grid/distributor/local/LocalGridModelDeadlockTest.java), 275 lines) that explicitly reproduces the hazard.
430425

@@ -455,27 +450,27 @@ This makes docker-selenium the go-to tool whenever you need to:
455450
- Run a cross-version compatibility sweep in CI across a range of browser versions in parallel
456451
- Pin a version in a test environment and guarantee it never changes until you deliberately upgrade
457452

458-
### Interactive debugging with Fluxbox browser menu ([docker-selenium#3085](https://github.com/SeleniumHQ/docker-selenium/pull/3085), commit [`bc1e6fd`](https://github.com/SeleniumHQ/docker-selenium/commit/bc1e6fda1cfbdd32e91ef3699e92d9044b3086ae))
453+
**Interactive debugging with Fluxbox browser menu ([docker-selenium#3085](https://github.com/SeleniumHQ/docker-selenium/pull/3085), commit [`bc1e6fd`](https://github.com/SeleniumHQ/docker-selenium/commit/bc1e6fda1cfbdd32e91ef3699e92d9044b3086ae))**
459454

460455
Complementing the above, the Fluxbox desktop inside every node and standalone image now has a right-click menu with browser launchers and a lightweight terminal (xterm). Connect to the container via VNC or noVNC, right-click the desktop, and launch the browser directly — no command line needed. When you are debugging a test failure visually against a specific image version, this removes the last friction from the interactive workflow.
461456

462457
---
463458

464459
## 7. More Improvements Worth Knowing About
465460

466-
### Unified Dynamic Grid configuration (Docker & Kubernetes) ([docker-selenium#3088](https://github.com/SeleniumHQ/docker-selenium/pull/3088), commit [`f90d1ee`](https://github.com/SeleniumHQ/docker-selenium/commit/f90d1eed07bfb6409577035f7f06528d0272ce6c))
461+
**Unified Dynamic Grid configuration (Docker & Kubernetes) ([docker-selenium#3088](https://github.com/SeleniumHQ/docker-selenium/pull/3088), commit [`f90d1ee`](https://github.com/SeleniumHQ/docker-selenium/commit/f90d1eed07bfb6409577035f7f06528d0272ce6c))**
467462

468463
Configuration environment variables are now shared across [`NodeDocker`](https://github.com/SeleniumHQ/docker-selenium/tree/4.41.0-20260222/NodeDocker), [`StandaloneDocker`](https://github.com/SeleniumHQ/docker-selenium/tree/4.41.0-20260222/StandaloneDocker), [`NodeKubernetes`](https://github.com/SeleniumHQ/docker-selenium/tree/4.41.0-20260222/NodeKubernetes), and [`StandaloneKubernetes`](https://github.com/SeleniumHQ/docker-selenium/tree/4.41.0-20260222/StandaloneKubernetes) images. Variables like `SE_NODE_GRID_URL`, `SE_NODE_MAX_SESSIONS`, and video-related settings behave identically regardless of whether the Dynamic Grid backend is Docker or Kubernetes.
469464

470-
### Basic auth support in Dynamic Grid Standalone ([selenium#17072](https://github.com/SeleniumHQ/selenium/pull/17072), commit [`7278252`](https://github.com/SeleniumHQ/selenium/commit/7278252badc14d9d036df8ca20d6927b5f546a49))
465+
**Basic auth support in Dynamic Grid Standalone ([selenium#17072](https://github.com/SeleniumHQ/selenium/pull/17072), commit [`7278252`](https://github.com/SeleniumHQ/selenium/commit/7278252badc14d9d036df8ca20d6927b5f546a49))**
471466

472467
When Grid Standalone is secured with HTTP basic auth, [`DockerSessionFactory`](https://github.com/SeleniumHQ/selenium/blob/selenium-4.41.0/java/src/org/openqa/selenium/grid/node/docker/DockerSessionFactory.java) now correctly forwards credentials when communicating with the node's own status endpoint during session setup. A small but important fix that unblocks secured Dynamic Grid deployments.
473468

474-
### Restore stereotype capability merging in RelaySessionFactory ([selenium#17097](https://github.com/SeleniumHQ/selenium/pull/17097), commit [`ac74b7e`](https://github.com/SeleniumHQ/selenium/commit/ac74b7e263e1308c3f5f8c666c8c2cb97da3e417))
469+
**Restore stereotype capability merging in RelaySessionFactory ([selenium#17097](https://github.com/SeleniumHQ/selenium/pull/17097), commit [`ac74b7e`](https://github.com/SeleniumHQ/selenium/commit/ac74b7e263e1308c3f5f8c666c8c2cb97da3e417))**
475470

476471
A regression introduced in a prior release caused [`RelaySessionFactory`](https://github.com/SeleniumHQ/selenium/blob/selenium-4.41.0/java/src/org/openqa/selenium/grid/node/relay/RelaySessionFactory.java) to ignore stereotype capabilities during session creation, which broke mobile relay sessions that relied on custom capabilities from the stereotype being merged into the session request. Restored and covered by 156 lines of new tests.
477472

478-
### Kubernetes: structured logs support ([docker-selenium#3087](https://github.com/SeleniumHQ/docker-selenium/pull/3087), commit [`ccd697c`](https://github.com/SeleniumHQ/docker-selenium/commit/ccd697cef2b13904c628b5d968447df1e7c30ed4))
473+
**Kubernetes: structured logs support ([docker-selenium#3087](https://github.com/SeleniumHQ/docker-selenium/pull/3087), commit [`ccd697c`](https://github.com/SeleniumHQ/docker-selenium/commit/ccd697cef2b13904c628b5d968447df1e7c30ed4))**
479474

480475
Structured logging (`global.seleniumGrid.structuredLogs`) already existed, but plain-text logs were always emitted alongside it with no way to suppress them. This PR adds `SE_PLAIN_LOGS` (`--plain-logs`, default `true`) as an independent toggle. Both modes can run simultaneously — to get pure JSON output for a log aggregation pipeline (Loki, Elasticsearch), enable structured logs and turn plain logs off:
481476

@@ -493,7 +488,7 @@ Or via environment variable on any component directly:
493488
SE_PLAIN_LOGS=false
494489
```
495490

496-
### Kubernetes: tolerations fix for monitoring exporter ([docker-selenium#3086](https://github.com/SeleniumHQ/docker-selenium/pull/3086), commit [`56e0192`](https://github.com/SeleniumHQ/docker-selenium/commit/56e0192c))
491+
**Kubernetes: tolerations fix for monitoring exporter ([docker-selenium#3086](https://github.com/SeleniumHQ/docker-selenium/pull/3086), commit [`56e0192`](https://github.com/SeleniumHQ/docker-selenium/commit/56e0192c))**
497492

498493
The Helm chart's monitoring exporter deployment was missing `tolerations`, which caused it to fail scheduling on tainted nodes (a common pattern in production clusters with dedicated node pools). This is now fixed.
499494

@@ -507,7 +502,7 @@ The Helm chart's monitoring exporter deployment was missing `tolerations`, which
507502
# Pull latest images
508503
docker pull selenium/hub:4.41.0-20260222
509504
docker pull selenium/node-chrome:4.41.0-20260222
510-
docker pull selenium/video:ffmpeg-7.1-20260222
505+
docker pull selenium/video:ffmpeg-8.1-20260222
511506
```
512507

513508
Or update your compose file:

0 commit comments

Comments
 (0)