Skip to content

[build] use pinned browser and driver for starting grid in python and ruby tests#17610

Merged
titusfortner merged 5 commits into
trunkfrom
test_binaries
Jun 2, 2026
Merged

[build] use pinned browser and driver for starting grid in python and ruby tests#17610
titusfortner merged 5 commits into
trunkfrom
test_binaries

Conversation

@titusfortner

@titusfortner titusfortner commented Jun 2, 2026

Copy link
Copy Markdown
Member

Several long-running tests on GitHub actions are running out of disk space because #17602 deleted the installed browsers.

The expectation is that either browsers are pinned, or selenium manager caches the binaries on HOME.

Except there are 3 issues with this

  1. When Ruby and Python run tests against the grid they don't specify the pinned browser/driver locations so it always uses Selenium Manager
  2. Each test in Bazel creates its own home directory, so when using Selenium Manager it won't share the cache across runs.
  3. Our browser tests don't run in the Bazel sandbox, so things get unallocated but not actually deleted.

TL/DR: each test was downloading all the browsers and leaving them there.

💥 What does this PR do?

For both Ruby & Python

  1. When browsers and drivers are pinned, it passes in a stereotype to use them, bypassing selenium manager
  2. When browsers and drivers are not pinned, it uses selenium manager
  3. Fixed the documented flag for setting driver path

🔧 Implementation Notes

  • Python: Server gains an additive args param (defaulting to the Selenium Manager and Download Enabled flags to maintain backwards compatibility); conftest.py overrides it from --driver-binary / --browser-binary when pinned.
  • Ruby: test_environment.rb builds the same configuration from the pinned *_BINARY env vars.

Additional Considerations

  • I already addressed Selenium Manager not sharing across test runs with: a212f13
  • I started a PR to implement test --run_under=//scripts:test_tmp_cleanup since we don't get that behavior like we would if we were running in the bazel sandbox, but I'm not sure we need belt, suspenders and duct tape for this.

🤖 AI assistance

  • AI assisted (complete below)
    • Tool(s): Claude Code
    • What was generated:
    • I reviewed all AI output and can explain the change

🔄 Types of changes

  • Bug fix (backwards compatible)

@selenium-ci selenium-ci added C-py Python Bindings C-rb Ruby Bindings labels Jun 2, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Pin browser and driver binaries for remote Grid tests

🐞 Bug fix ✨ Enhancement

Grey Divider

Walkthroughs

Description
• Pins browser and driver binaries for remote Grid tests to avoid Selenium Manager downloads
• Reduces disk space usage by reusing cached binaries across test runs
• Adds configurable args parameter to Server class for custom Grid configuration
• Implements stereotype-based driver configuration for both Python and Ruby test environments
Diagram
flowchart LR
  A["Test Config<br/>--driver-binary<br/>--browser-binary"] -->|Python conftest| B["_pinned_grid_args()"]
  A -->|Ruby test_environment| C["driver_configuration()"]
  B -->|Creates stereotype| D["Server args"]
  C -->|Creates stereotype| D
  D -->|Passes to Grid| E["Grid Node<br/>Skips Selenium Manager"]
  F["Selenium Manager<br/>Default behavior"] -->|When no binaries| D

Loading

Grey Divider

File Changes

1. py/conftest.py ✨ Enhancement +39/-1

Add pinned binary configuration for Python Grid tests

• Added _pinned_grid_args() function to generate Grid driver configuration from pinned binaries
• Maps driver names to browser names and vendor option keys for stereotype creation
• Resolves Bazel paths and constructs JSON stereotype with binary locations
• Passes computed args to Server initialization when binaries are pinned

py/conftest.py


2. py/selenium/webdriver/remote/server.py ✨ Enhancement +8/-4

Make Server Grid arguments configurable

• Added args parameter to Server.__init__() for custom Grid command arguments
• Defined DEFAULT_ARGS class constant with Selenium Manager and managed downloads flags
• Replaced hardcoded flags with unpacked self.args in command construction
• Maintains backward compatibility by defaulting to Selenium Manager behavior

py/selenium/webdriver/remote/server.py


3. rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb ✨ Enhancement +27/-16

Refactor Ruby Grid configuration for pinned binaries

• Replaced driver-specific system properties with --detect-drivers false flag when binaries pinned
• Refactored version_stereotype_args() into driver_configuration() with conditional binary
 inclusion
• Added driver_path() helper to resolve pinned driver binary from environment variables
• Added browser_path() helper to resolve pinned browser binary from environment variables
• Added options_key() helper to map browser type to vendor-specific options key

rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (5) 📘 Rule violations (1)

Grey Divider


Action required

1. Empty cache path uses CWD 🐞 Bug ☼ Reliability
Description
.bazelrc.remote forces SE_CACHE_PATH to an empty string for test:rbe, which the Java
SeleniumManager does not treat as “unset” and instead resolves to the current working directory.
This can cause Selenium Manager binaries to be extracted into the Bazel execroot/workspace,
reintroducing disk bloat and leftover files.
Code

.bazelrc.remote[R44-45]

Evidence
The PR sets SE_CACHE_PATH to an empty value for RBE tests. Java’s SeleniumManager reads
SE_CACHE_PATH and only uses the default when the value is null; when it is the empty string,
Paths.get("") resolves to the process working directory, so the cache location becomes CWD.

.bazelrc.remote[44-46]
java/src/org/openqa/selenium/manager/SeleniumManager.java[292-311]
.bazelrc[97-108]
.github/workflows/bazel.yml[98-101]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`.bazelrc.remote` sets `SE_CACHE_PATH` to an empty string for `test:rbe`. In Java, an empty cache path is treated as a real path and becomes the current working directory, which can make Selenium Manager extract/cache binaries into the workspace/execroot.

## Issue Context
Java `SeleniumManager#getBinaryInCache` falls back to the default cache path only when `SE_CACHE_PATH` is `null`, not when it is `""`.

## Fix Focus Areas
- .bazelrc.remote[44-46]

Suggested fix:
- Replace `test:rbe --test_env=SE_CACHE_PATH=` with an explicit safe cache path for remote runs, e.g. `test:rbe --test_env=SE_CACHE_PATH=/home/dev/.cache/selenium` (matching the `HOME=/home/dev` already set), or remove this override and instead ensure a valid remote path is provided for RBE runs.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Pinned args ignore drivers 🐞 Bug ≡ Correctness
Description
Python’s _pinned_grid_args selects only the first matching driver from --driver/--browser (which
can be provided multiple times) and then sets --detect-drivers false, so any additional requested
drivers will not be configured on the Grid node. This can cause multi-driver remote test runs to
fail session creation for all but the first driver when binaries are pinned.
Code

py/conftest.py[R220-246]

Evidence
The CLI explicitly allows multiple drivers, but the pinned Grid arg builder picks only the first and
disables autodetection; the server fixture then starts a single Grid process for the entire session.

py/conftest.py[113-129]
py/conftest.py[220-246]
py/conftest.py[579-593]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
When pinned binaries are provided, `_pinned_grid_args` chooses only one driver (`next(...)`) but also disables autodetection (`--detect-drivers false`). If the user passes multiple `--driver` values, the Grid will be started configured for only one driver, and the rest of the run can fail.

### Issue Context
`--driver` is defined as `action='append'`, so multi-driver runs are supported by the CLI. The Grid server is started once per session, so it cannot adapt per-test/parametrized driver.

### Fix Focus Areas
- py/conftest.py[113-172]
- py/conftest.py[220-246]
- py/conftest.py[579-593]

### Suggested change
Implement one of:
- Fail fast with a clear error when pinned binaries are set and more than one driver is provided.
- Or, if you intend to support multi-driver pinned runs, extend `_pinned_grid_args` to generate multiple `--driver-configuration` blocks (requires passing per-driver driver/browser binary locations, which the current CLI does not model).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Overbroad REMOTE_BUILD skip 🐞 Bug ≡ Correctness ⭐ New
Description
test_download_latest_server is skipped whenever REMOTE_BUILD exists in the environment, even if it
is set to a falsey value, which can unintentionally suppress the test in non-remote runs that
forward REMOTE_BUILD. Elsewhere the repo treats REMOTE_BUILD as a "1"/unset flag, so this check
should match that value semantics.
Code

py/test/selenium/webdriver/remote/remote_server_tests.py[R41-44]

Evidence
The new test uses a presence check for REMOTE_BUILD, but other repo code gates remote-build behavior
by requiring REMOTE_BUILD to equal "1"; additionally Bazel test rules inherit REMOTE_BUILD from the
host environment, so it may be forwarded even when not set to "1".

py/test/selenium/webdriver/remote/remote_server_tests.py[41-44]
java/test/org/openqa/selenium/testing/SeleniumExtension.java[388-391]
java/private/selenium_test.bzl[93-98]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`pytest.mark.skipif` currently skips whenever `REMOTE_BUILD` is present in the environment. If `REMOTE_BUILD` is forwarded but set to a non-remote value (e.g., `0`/empty), the test will still be skipped and coverage is reduced.

### Issue Context
In other parts of the repo, `REMOTE_BUILD` is treated as enabled only when its value is exactly `"1"`.

### Fix Focus Areas
- py/test/selenium/webdriver/remote/remote_server_tests.py[41-44]

### Suggested change
Replace the condition with a value check, e.g.:
```py
@pytest.mark.skipif(
   os.environ.get("REMOTE_BUILD") == "1",
   reason="Downloads the Selenium Server from the network, which is unavailable on RBE",
)
```

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. max-sessions differs across bindings 📘 Rule violation ⚙ Maintainability
Description
When drivers/browsers are pinned, Python configures Grid node --driver-configuration with
max-sessions=1 while Ruby uses max-sessions=5, creating inconsistent cross-binding behavior for
the same test scenario. This may cause different concurrency/session-availability behavior between
bindings when running against the same Grid setup.
Code

py/conftest.py[R241-246]

Evidence
Rule 5 requires cross-binding consistency for user-visible/shared behavior changes. The PR
introduces the pinned --driver-configuration path in both bindings, but the configured
max-sessions value differs (1 in Python vs 5 in Ruby), indicating inconsistent behavior under
the same pinned-binaries scenario.

AGENTS.md: Cross-Binding Consistency for User-Visible or Shared Low-Level Behavior Changes
py/conftest.py[241-246]
rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb[121-126]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Pinned Grid node configuration is inconsistent across bindings: Python sets `max-sessions=1` while Ruby sets `max-sessions=5` for similar `--driver-configuration` usage.

## Issue Context
This PR introduces pinned driver/browser configuration for both Python and Ruby to bypass Selenium Manager. For cross-binding consistency, equivalent configurations should either match or have an explicit rationale documented.

## Fix Focus Areas
- py/conftest.py[241-246]
- rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb[121-126]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Args string splits chars 🐞 Bug ≡ Correctness
Description
In Python Server.__init__, args is cast with list(args) without validating type, so if a
caller passes a string (e.g. "--detect-drivers false") it becomes a list of single-character
arguments and produces an invalid server command at runtime.
Code

py/selenium/webdriver/remote/server.py[77]

Evidence
The implementation converts args with list(args) (which will split strings into characters),
while the docstring/tests indicate args is intended to be a list of argument tokens.

py/selenium/webdriver/remote/server.py[47-78]
py/test/unit/selenium/webdriver/remote/remote_server_tests.py[52-62]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`Server(args=...)` is documented as taking a list of CLI arguments, but the implementation accepts any iterable and blindly calls `list(args)`. If a user passes a string, it will be split into characters and later expanded into the Java command, causing confusing startup failures.

### Issue Context
- This is a public API surface (`selenium.webdriver.remote.server.Server`).
- Current unit tests only cover list usage and don’t guard against string misuse.

### Fix Focus Areas
- Add a type check that rejects `str`/`bytes` and non-sequence iterables (or, at minimum, explicitly rejects `str`/`bytes`).
- Consider adding a lightweight type hint (`args: Optional[Sequence[str]]`) and a clear `TypeError` message.
- Add a unit test asserting `Server(args="--detect-drivers false")` raises `TypeError`.

- py/selenium/webdriver/remote/server.py[47-78]
- py/test/unit/selenium/webdriver/remote/remote_server_tests.py[52-62]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
6. Null binary in stereotype 🐞 Bug ≡ Correctness
Description
In Ruby, driver_configuration adds vendor options with {binary: browser_path} guarded by
driver_path, so if the driver binary env var is set but the browser binary env var is not, the
generated stereotype JSON will contain "binary": null. This can lead to invalid/meaningless node
configuration and potentially session creation/startup failures depending on how the node consumes
the stereotype.
Code

rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb[R116-126]

Evidence
The stereotype’s vendor options binary value is sourced from browser_path, but insertion is
controlled by driver_path; since browser_path returns nil when the env var is absent, the JSON
can contain a null binary.

rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb[116-127]
rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb[129-137]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`driver_configuration` currently adds a vendor options `binary` field whenever `driver_path` is present, but the value comes from `browser_path`. If `browser_path` is unset, the stereotype JSON includes `"binary": null`, which is an invalid/pointless pinning configuration and may break node behavior.

### Issue Context
This logic is used to pin browser/driver binaries for Grid runs.

### Fix Focus Areas
- rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb[116-141]

### Suggested change
- Change the condition to only add the vendor options binary when `browser_path` is present (e.g., `if browser_path`).
- Optionally, when `driver_path` is set but `browser_path` is missing, keep `--detect-drivers` enabled (or raise a clear error) to avoid starting a node with a half-pinned configuration.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Previous review results

Review updated until commit 1c0b3c9

Results up to commit ff9acf9


🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0)


Action required
1. Pinned args ignore drivers 🐞 Bug ≡ Correctness
Description
Python’s _pinned_grid_args selects only the first matching driver from --driver/--browser (which
can be provided multiple times) and then sets --detect-drivers false, so any additional requested
drivers will not be configured on the Grid node. This can cause multi-driver remote test runs to
fail session creation for all but the first driver when binaries are pinned.
Code

py/conftest.py[R220-246]

Evidence
The CLI explicitly allows multiple drivers, but the pinned Grid arg builder picks only the first and
disables autodetection; the server fixture then starts a single Grid process for the entire session.

py/conftest.py[113-129]
py/conftest.py[220-246]
py/conftest.py[579-593]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
When pinned binaries are provided, `_pinned_grid_args` chooses only one driver (`next(...)`) but also disables autodetection (`--detect-drivers false`). If the user passes multiple `--driver` values, the Grid will be started configured for only one driver, and the rest of the run can fail.

### Issue Context
`--driver` is defined as `action='append'`, so multi-driver runs are supported by the CLI. The Grid server is started once per session, so it cannot adapt per-test/parametrized driver.

### Fix Focus Areas
- py/conftest.py[113-172]
- py/conftest.py[220-246]
- py/conftest.py[579-593]

### Suggested change
Implement one of:
- Fail fast with a clear error when pinned binaries are set and more than one driver is provided.
- Or, if you intend to support multi-driver pinned runs, extend `_pinned_grid_args` to generate multiple `--driver-configuration` blocks (requires passing per-driver driver/browser binary locations, which the current CLI does not model).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended
2. Null binary in stereotype 🐞 Bug ≡ Correctness
Description
In Ruby, driver_configuration adds vendor options with {binary: browser_path} guarded by
driver_path, so if the driver binary env var is set but the browser binary env var is not, the
generated stereotype JSON will contain "binary": null. This can lead to invalid/meaningless node
configuration and potentially session creation/startup failures depending on how the node consumes
the stereotype.
Code

rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb[R116-126]

Evidence
The stereotype’s vendor options binary value is sourced from browser_path, but insertion is
controlled by driver_path; since browser_path returns nil when the env var is absent, the JSON
can contain a null binary.

rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb[116-127]
rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb[129-137]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`driver_configuration` currently adds a vendor options `binary` field whenever `driver_path` is present, but the value comes from `browser_path`. If `browser_path` is unset, the stereotype JSON includes `"binary": null`, which is an invalid/pointless pinning configuration and may break node behavior.

### Issue Context
This logic is used to pin browser/driver binaries for Grid runs.

### Fix Focus Areas
- rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb[116-141]

### Suggested change
- Change the condition to only add the vendor options binary when `browser_path` is present (e.g., `if browser_path`).
- Optionally, when `driver_path` is set but `browser_path` is missing, keep `--detect-drivers` enabled (or raise a clear error) to avoid starting a node with a half-pinned configuration.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Results up to commit 320bb44


🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0)


Remediation recommended
1. Args string splits chars 🐞 Bug ≡ Correctness
Description
In Python Server.__init__, args is cast with list(args) without validating type, so if a
caller passes a string (e.g. "--detect-drivers false") it becomes a list of single-character
arguments and produces an invalid server command at runtime.
Code

py/selenium/webdriver/remote/server.py[77]

Evidence
The implementation converts args with list(args) (which will split strings into characters),
while the docstring/tests indicate args is intended to be a list of argument tokens.

py/selenium/webdriver/remote/server.py[47-78]
py/test/unit/selenium/webdriver/remote/remote_server_tests.py[52-62]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`Server(args=...)` is documented as taking a list of CLI arguments, but the implementation accepts any iterable and blindly calls `list(args)`. If a user passes a string, it will be split into characters and later expanded into the Java command, causing confusing startup failures.

### Issue Context
- This is a public API surface (`selenium.webdriver.remote.server.Server`).
- Current unit tests only cover list usage and don’t guard against string misuse.

### Fix Focus Areas
- Add a type check that rejects `str`/`bytes` and non-sequence iterables (or, at minimum, explicitly rejects `str`/`bytes`).
- Consider adding a lightweight type hint (`args: Optional[Sequence[str]]`) and a clear `TypeError` message.
- Add a unit test asserting `Server(args="--detect-drivers false")` raises `TypeError`.

- py/selenium/webdriver/remote/server.py[47-78]
- py/test/unit/selenium/webdriver/remote/remote_server_tests.py[52-62]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Results up to commit c1d2926


🐞 Bugs (1) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0)


Action required
1. Empty cache path uses CWD 🐞 Bug ☼ Reliability
Description
.bazelrc.remote forces SE_CACHE_PATH to an empty string for test:rbe, which the Java
SeleniumManager does not treat as “unset” and instead resolves to the current working directory.
This can cause Selenium Manager binaries to be extracted into the Bazel execroot/workspace,
reintroducing disk bloat and leftover files.
Code

.bazelrc.remote[R44-45]

Evidence
The PR sets SE_CACHE_PATH to an empty value for RBE tests. Java’s SeleniumManager reads
SE_CACHE_PATH and only uses the default when the value is null; when it is the empty string,
Paths.get("") resolves to the process working directory, so the cache location becomes CWD.

.bazelrc.remote[44-46]
java/src/org/openqa/selenium/manager/SeleniumManager.java[292-311]
.bazelrc[97-108]
.github/workflows/bazel.yml[98-101]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`.bazelrc.remote` sets `SE_CACHE_PATH` to an empty string for `test:rbe`. In Java, an empty cache path is treated as a real path and becomes the current working directory, which can make Selenium Manager extract/cache binaries into the workspace/execroot.

## Issue Context
Java `SeleniumManager#getBinaryInCache` falls back to the default cache path only when `SE_CACHE_PATH` is `null`, not when it is `""`.

## Fix Focus Areas
- .bazelrc.remote[44-46]

Suggested fix:
- Replace `test:rbe --test_env=SE_CACHE_PATH=` with an explicit safe cache path for remote runs, e.g. `test:rbe --test_env=SE_CACHE_PATH=/home/dev/.cache/selenium` (matching the `HOME=/home/dev` already set), or remove this override and instead ensure a valid remote path is provided for RBE runs.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended
2. max-sessions differs across bindings 📘 Rule violation ⚙ Maintainability
Description
When drivers/browsers are pinned, Python configures Grid node --driver-configuration with
max-sessions=1 while Ruby uses max-sessions=5, creating inconsistent cross-binding behavior for
the same test scenario. This may cause different concurrency/session-availability behavior between
bindings when running against the same Grid setup.
Code

py/conftest.py[R241-246]

Evidence
Rule 5 requires cross-binding consistency for user-visible/shared behavior changes. The PR
introduces the pinned --driver-configuration path in both bindings, but the configured
max-sessions value differs (1 in Python vs 5 in Ruby), indicating inconsistent behavior under
the same pinned-binaries scenario.

AGENTS.md: Cross-Binding Consistency for User-Visible or Shared Low-Level Behavior Changes
py/conftest.py[241-246]
rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb[121-126]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Pinned Grid node configuration is inconsistent across bindings: Python sets `max-sessions=1` while Ruby sets `max-sessions=5` for similar `--driver-configuration` usage.

## Issue Context
This PR introduces pinned driver/browser configuration for both Python and Ruby to bypass Selenium Manager. For cross-binding consistency, equivalent configurations should either match or have an explicit rationale documented.

## Fix Focus Areas
- py/conftest.py[241-246]
- rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb[121-126]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Qodo Logo

Comment thread py/conftest.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Ruby and Python Grid test harnesses to prefer pinned browser/driver binaries (when provided) by passing an explicit Grid --driver-configuration stereotype, avoiding repeated Selenium Manager downloads that can exhaust disk space in CI.

Changes:

  • Ruby remote Grid startup now builds a --driver-configuration from pinned *_BINARY env vars (and only uses Selenium Manager when not pinned).
  • Python Server gains an additive args parameter (defaulting to Selenium Manager + managed downloads), and py/conftest.py overrides args when --driver-binary/--browser-binary are provided.
  • Java Grid node flag documentation corrects the example key to webdriver-executable.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb Builds Grid startup args/driver-configuration to use pinned driver/browser paths where available.
py/selenium/webdriver/remote/server.py Adds args parameter to control standalone server CLI flags while preserving existing defaults.
py/conftest.py Detects pinned binaries from pytest options and passes a matching Grid driver configuration stereotype.
java/src/org/openqa/selenium/grid/node/config/NodeFlags.java Fixes the documented driver-configuration example key to webdriver-executable.

Comment thread rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb Outdated
Comment thread py/selenium/webdriver/remote/server.py
@qodo-code-review

qodo-code-review Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 320bb44

@qodo-code-review

qodo-code-review Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit c1d2926

Comment thread .bazelrc.remote
@qodo-code-review

qodo-code-review Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 1c0b3c9

@titusfortner titusfortner changed the title Use pinned browser and driver for remote Grid tests instead of Selenium Manager [build] use pinned browser and driver for starting grid in python and ruby tests Jun 2, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: CI Success

Failed stage: Verify required jobs succeeded [❌]

Failed test name: ""

Failure summary:

The workflow failed because a gating step in the CI Success job intentionally exited with a non-zero
code when it detected that required upstream job(s) had failed.
- The step printed One or more
required jobs failed and then ran exit 1, producing Process completed with exit code 1 (lines
29–35).
- This log does not include which specific required job(s) failed; that information would be
in the logs of the upstream jobs.

Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

14:  Image: ubuntu-24.04
15:  Version: 20260525.161.1
16:  Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260525.161/images/ubuntu/Ubuntu2404-Readme.md
17:  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260525.161
18:  ##[endgroup]
19:  ##[group]GITHUB_TOKEN Permissions
20:  Contents: read
21:  Metadata: read
22:  ##[endgroup]
23:  Secret source: Actions
24:  Prepare workflow directory
25:  Prepare all required actions
26:  Complete job name: CI Success
27:  ##[group]Run if true; then
28:  �[36;1mif true; then�[0m
29:  �[36;1m  echo "One or more required jobs failed"�[0m
30:  �[36;1m  exit 1�[0m
31:  �[36;1mfi�[0m
32:  shell: /usr/bin/bash -e {0}
33:  ##[endgroup]
34:  One or more required jobs failed
35:  ##[error]Process completed with exit code 1.
36:  Cleaning up orphan processes

@titusfortner titusfortner merged commit aba540c into trunk Jun 2, 2026
62 of 64 checks passed
@titusfortner titusfortner deleted the test_binaries branch June 2, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-py Python Bindings C-rb Ruby Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants