Skip to content

Commit 0b6d365

Browse files
committed
Merge remote-tracking branch 'origin/rb_fix_network_issue' into rb_fix_network_issue
2 parents 396d55a + 0f186b9 commit 0b6d365

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+675
-379
lines changed

.github/workflows/bazel.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ on:
5151
required: false
5252
type: string
5353
default: ''
54+
python-version:
55+
description: Custom Python version to use
56+
required: false
57+
type: string
58+
default: ''
5459
ruby-version:
5560
description: Custom Ruby version to use
5661
required: false
@@ -101,6 +106,9 @@ jobs:
101106
if: inputs.os != 'windows'
102107
run: |
103108
sudo rm -rf "$CHROMEWEBDRIVER" "$EDGEWEBDRIVER" "$GECKOWEBDRIVER"
109+
- name: Set Python version
110+
if: inputs.python-version != ''
111+
run: echo '${{ inputs.python-version }}' > py/.python-version
104112
- name: Set Ruby version
105113
if: inputs.ruby-version != ''
106114
run: echo '${{ inputs.ruby-version }}' > rb/.ruby-version

.github/workflows/ci-python.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,38 @@ jobs:
1616
1717
docs:
1818
name: Documentation
19-
needs: build
2019
runs-on: ubuntu-latest
2120
steps:
2221
- name: Checkout source tree
2322
uses: actions/checkout@v4
24-
- name: Set up Python 3.9
23+
- name: Set up Python 3.10
2524
uses: actions/setup-python@v6
2625
with:
27-
python-version: 3.9
26+
python-version: '3.10'
2827
- name: Install dependencies
2928
run: |
3029
python -m pip install --upgrade pip
31-
pip install tox==4.30.2
30+
pip install tox
3231
- name: Generate docs
3332
run: |
3433
tox -c py/tox.ini
3534
env:
3635
TOXENV: docs
3736

38-
mypy:
39-
name: Mypy
40-
needs: build
37+
typing:
38+
name: Type Checker
4139
runs-on: ubuntu-latest
4240
steps:
4341
- name: Checkout source tree
4442
uses: actions/checkout@v4
45-
- name: Set up Python 3.9
43+
- name: Set up Python 3.10
4644
uses: actions/setup-python@v6
4745
with:
48-
python-version: 3.9
46+
python-version: '3.10'
4947
- name: Install dependencies
5048
run: |
5149
python -m pip install --upgrade pip
52-
pip install tox==4.30.2
50+
pip install tox
5351
- name: Run type checking
5452
run: |
5553
tox -c py/tox.ini || true
@@ -64,12 +62,19 @@ jobs:
6462
fail-fast: false
6563
matrix:
6664
include:
67-
- os: ubuntu
68-
- os: macos
65+
- python-version: '3.10'
66+
os: ubuntu
67+
- python-version: '3.10'
68+
os: macos
69+
- python-version: '3.14'
70+
os: ubuntu
71+
- python-version: '3.14'
72+
os: macos
6973
with:
70-
name: Unit Tests (${{ matrix.os }})
74+
name: Unit Tests (${{ matrix.python-version }}, ${{ matrix.os }})
7175
os: ${{ matrix.os }}
72-
cache-key: python-unit-test-${{ matrix.os }}
76+
python-version: ${{ matrix.python-version }}
77+
cache-key: python-unit-test-${{ matrix.python-version }}
7378
run: |
7479
bazel test //py:unit
7580
@@ -81,7 +86,7 @@ jobs:
8186
fail-fast: false
8287
matrix:
8388
include:
84-
- browser: firefox
89+
- browser: chrome
8590
with:
8691
name: Integration Tests (remote, ${{ matrix.browser }})
8792
browser: ${{ matrix.browser }}

.github/workflows/update-documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ jobs:
6666
with:
6767
java-version: 17
6868
distribution: 'temurin'
69-
- name: Set up Python 3.9
69+
- name: Set up Python 3.10
7070
if: ${{ inputs.language == 'py' || inputs.language == 'all' }}
7171
uses: actions/setup-python@v6
7272
with:
73-
python-version: 3.9
73+
python-version: '3.10'
7474
- name: Install dependencies
7575
if: ${{ inputs.language == 'py' || inputs.language == 'all' }}
7676
run: |

MODULE.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ bazel_dep(name = "rules_multitool", version = "1.3.0")
2424
bazel_dep(name = "rules_nodejs", version = "6.3.2")
2525
bazel_dep(name = "rules_oci", version = "1.8.0")
2626
bazel_dep(name = "rules_pkg", version = "1.0.1")
27-
bazel_dep(name = "rules_python", version = "1.5.0")
27+
bazel_dep(name = "rules_python", version = "1.6.3")
2828
bazel_dep(name = "rules_proto", version = "7.0.2")
2929
bazel_dep(name = "rules_ruby", version = "0.19.0")
3030

@@ -123,12 +123,12 @@ use_repo(oci, "chrome_standalone", "firefox_standalone", "java_image_base")
123123
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
124124
python.toolchain(
125125
is_default = True,
126-
python_version = "3.9",
126+
python_version = "3.10",
127127
)
128-
python.toolchain(python_version = "3.10")
129128
python.toolchain(python_version = "3.11")
130129
python.toolchain(python_version = "3.12")
131130
python.toolchain(python_version = "3.13")
131+
python.toolchain(python_version = "3.14")
132132
use_repo(python, "pythons_hub")
133133

134134
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
@@ -140,11 +140,11 @@ pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
140140
requirements_lock = "//py:requirements_lock.txt",
141141
)
142142
for version in [
143-
"3.9",
144143
"3.10",
145144
"3.11",
146145
"3.12",
147146
"3.13",
147+
"3.14",
148148
]
149149
]
150150

@@ -307,8 +307,8 @@ ruby.bundle_fetch(
307307
"io-console-0.8.1-java": "9457a61a7b23aab11e9e9ff67f71ae81d7f1a6a2e582bb5d65d754cbb546c06f",
308308
"irb-1.15.2": "222f32952e278da34b58ffe45e8634bf4afc2dc7aa9da23fed67e581aa50fdba",
309309
"jar-dependencies-0.5.5": "2972b9fcba4b014e6446a84b5c09674a3e8648b95b71768e729f0e8e40568059",
310-
"json-2.13.2": "02e1f118d434c6b230a64ffa5c8dee07e3ec96244335c392eaed39e1199dbb68",
311-
"json-2.13.2-java": "2e1292c45598a3642216820a821cba89c623f99387b8cb90adb345878f4e5c7d",
310+
"json-2.15.1": "b1c1b2e7c116eb1903e0ce0c374783e6ead8747a0f9eca132d274018ebb80b89",
311+
"json-2.15.1-java": "a6185eebe724a6937f60729e4998276d6b3de3ecc35be34f8e47c1eb40903ecf",
312312
"language_server-protocol-3.17.0.5": "fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc",
313313
"lint_roller-1.1.0": "2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87",
314314
"listen-3.9.0": "db9e4424e0e5834480385197c139cb6b0ae0ef28cc13310cfd1ca78377d59c67",

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ namespace :py do
685685
end
686686
end
687687

688-
desc 'Python Remote tests with Firefox'
688+
desc 'Python Remote tests with Chrome'
689689
task :remote do
690690
Rake::Task['py:clean'].invoke
691691
Bazel.execute('test', [], '//py:test-remote')

common/repositories.bzl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ js_library(
5050

5151
http_archive(
5252
name = "linux_beta_firefox",
53-
url = "https://ftp.mozilla.org/pub/firefox/releases/145.0b1/linux-x86_64/en-US/firefox-145.0b1.tar.xz",
54-
sha256 = "f92c1704ab741bd2d663ae3bed8178a8ad00c84b664bef6fe4fdf486d3edaa4d",
53+
url = "https://ftp.mozilla.org/pub/firefox/releases/145.0b2/linux-x86_64/en-US/firefox-145.0b2.tar.xz",
54+
sha256 = "2299c53a2cea673194324c7e696986f0f319f5ac7b0ed0c08ff141b8dd95b2b5",
5555
build_file_content = """
5656
load("@aspect_rules_js//js:defs.bzl", "js_library")
5757
package(default_visibility = ["//visibility:public"])
@@ -72,8 +72,8 @@ js_library(
7272

7373
dmg_archive(
7474
name = "mac_beta_firefox",
75-
url = "https://ftp.mozilla.org/pub/firefox/releases/145.0b1/mac/en-US/Firefox%20145.0b1.dmg",
76-
sha256 = "be24adf3ec50c911b2b1ee5b66e0c42418d981e2c484f4d09db7e7dd29563479",
75+
url = "https://ftp.mozilla.org/pub/firefox/releases/145.0b2/mac/en-US/Firefox%20145.0b2.dmg",
76+
sha256 = "3f4da534b1f443a83d2c96e91a1ff9d953534054096fe8c8272cda6f614fa74c",
7777
build_file_content = """
7878
load("@aspect_rules_js//js:defs.bzl", "js_library")
7979
package(default_visibility = ["//visibility:public"])
@@ -277,8 +277,8 @@ js_library(
277277

278278
http_archive(
279279
name = "linux_beta_chrome",
280-
url = "https://storage.googleapis.com/chrome-for-testing-public/142.0.7444.23/linux64/chrome-linux64.zip",
281-
sha256 = "8cfb9247d87419bd750c68b6f29424ad91474e0ee848c3f3cde04da76fbf9c2e",
280+
url = "https://storage.googleapis.com/chrome-for-testing-public/142.0.7444.34/linux64/chrome-linux64.zip",
281+
sha256 = "332faacf49d45f6d6c5f50a3407b70e908304e7944d60bc6fd1c0ed11062d9a0",
282282
build_file_content = """
283283
load("@aspect_rules_js//js:defs.bzl", "js_library")
284284
package(default_visibility = ["//visibility:public"])
@@ -298,8 +298,8 @@ js_library(
298298
)
299299
http_archive(
300300
name = "mac_beta_chrome",
301-
url = "https://storage.googleapis.com/chrome-for-testing-public/142.0.7444.23/mac-x64/chrome-mac-x64.zip",
302-
sha256 = "2024bc564c4e7e26514b8cb4740d9f3760b2f8545d573c0ba08bd2ed3f6fd85f",
301+
url = "https://storage.googleapis.com/chrome-for-testing-public/142.0.7444.34/mac-x64/chrome-mac-x64.zip",
302+
sha256 = "3745e1a1eba0287cb1762145a3a6abeefe98579b6de5715215854f92eee26d04",
303303
strip_prefix = "chrome-mac-x64",
304304
patch_cmds = [
305305
"mv 'Google Chrome for Testing.app' Chrome.app",
@@ -319,8 +319,8 @@ js_library(
319319
)
320320
http_archive(
321321
name = "linux_beta_chromedriver",
322-
url = "https://storage.googleapis.com/chrome-for-testing-public/142.0.7444.23/linux64/chromedriver-linux64.zip",
323-
sha256 = "6309f4601340d2a0c8df04e239a4696f1f5427be8e53545a2a321b640be2a0de",
322+
url = "https://storage.googleapis.com/chrome-for-testing-public/142.0.7444.34/linux64/chromedriver-linux64.zip",
323+
sha256 = "33850b3337bc92c6621e013af03323e0d6ae1e450aa1ff6b5776d47dd4d9b600",
324324
strip_prefix = "chromedriver-linux64",
325325
build_file_content = """
326326
load("@aspect_rules_js//js:defs.bzl", "js_library")
@@ -337,8 +337,8 @@ js_library(
337337

338338
http_archive(
339339
name = "mac_beta_chromedriver",
340-
url = "https://storage.googleapis.com/chrome-for-testing-public/142.0.7444.23/mac-x64/chromedriver-mac-x64.zip",
341-
sha256 = "695d4c4d71f31df7ea9d8bfccd19075662212b7fed9f9487fa2fa2aaa790faa6",
340+
url = "https://storage.googleapis.com/chrome-for-testing-public/142.0.7444.34/mac-x64/chromedriver-mac-x64.zip",
341+
sha256 = "840101066642b930b937ba5e8d7506d9a71bbb6a9a45b5a4c11c05d83aace12c",
342342
strip_prefix = "chromedriver-mac-x64",
343343
build_file_content = """
344344
load("@aspect_rules_js//js:defs.bzl", "js_library")

java/src/org/openqa/selenium/bidi/permissions/BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//java:defs.bzl", "java_library")
1+
load("//java:defs.bzl", "artifact", "java_library")
22

33
java_library(
44
name = "permissions",
@@ -14,4 +14,7 @@ java_library(
1414
"//java/test/org/openqa/selenium/bidi:__subpackages__",
1515
"//java/test/org/openqa/selenium/grid:__subpackages__",
1616
],
17+
deps = [
18+
artifact("org.jspecify:jspecify"),
19+
],
1720
)

java/src/org/openqa/selenium/bidi/permissions/PermissionState.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717

1818
package org.openqa.selenium.bidi.permissions;
1919

20+
import org.jspecify.annotations.NullMarked;
21+
import org.jspecify.annotations.Nullable;
22+
23+
@NullMarked
2024
public enum PermissionState {
2125
GRANTED("granted"),
2226
DENIED("denied"),
@@ -33,7 +37,7 @@ public String toString() {
3337
return state;
3438
}
3539

36-
public static PermissionState findByName(String name) {
40+
public static @Nullable PermissionState findByName(String name) {
3741
PermissionState result = null;
3842
for (PermissionState state : values()) {
3943
if (state.toString().equalsIgnoreCase(name)) {

java/src/org/openqa/selenium/events/zeromq/BoundZmqEventBus.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.net.Inet6Address;
2121
import java.net.InetAddress;
2222
import java.net.UnknownHostException;
23+
import java.time.Duration;
2324
import java.util.concurrent.ExecutorService;
2425
import java.util.concurrent.Executors;
2526
import java.util.logging.Level;
@@ -43,7 +44,11 @@ class BoundZmqEventBus implements EventBus {
4344
private final ExecutorService executor;
4445

4546
BoundZmqEventBus(
46-
ZContext context, String publishConnection, String subscribeConnection, Secret secret) {
47+
ZContext context,
48+
String publishConnection,
49+
String subscribeConnection,
50+
Secret secret,
51+
Duration heartbeatPeriod) {
4752
String address = new NetworkUtils().getHostAddress();
4853
Addresses xpubAddr = deriveAddresses(address, publishConnection);
4954
Addresses xsubAddr = deriveAddresses(address, subscribeConnection);
@@ -53,11 +58,13 @@ class BoundZmqEventBus implements EventBus {
5358
xpub = context.createSocket(SocketType.XPUB);
5459
xpub.setIPv6(xpubAddr.isIPv6);
5560
xpub.setImmediate(true);
61+
ZmqUtils.configureHeartbeat(xpub, heartbeatPeriod, "XPUB");
5662
xpub.bind(xpubAddr.bindTo);
5763

5864
xsub = context.createSocket(SocketType.XSUB);
5965
xsub.setIPv6(xsubAddr.isIPv6);
6066
xsub.setImmediate(true);
67+
ZmqUtils.configureHeartbeat(xsub, heartbeatPeriod, "XSUB");
6168
xsub.bind(xsubAddr.bindTo);
6269

6370
executor =
@@ -68,8 +75,9 @@ class BoundZmqEventBus implements EventBus {
6875
return thread;
6976
});
7077
executor.submit(() -> ZMQ.proxy(xsub, xpub, null));
71-
72-
delegate = new UnboundZmqEventBus(context, xpubAddr.advertise, xsubAddr.advertise, secret);
78+
delegate =
79+
new UnboundZmqEventBus(
80+
context, xpubAddr.advertise, xsubAddr.advertise, secret, heartbeatPeriod);
7381
}
7482

7583
@Override

java/src/org/openqa/selenium/events/zeromq/UnboundZmqEventBus.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.net.URI;
2828
import java.net.URISyntaxException;
2929
import java.net.UnknownHostException;
30+
import java.time.Duration;
3031
import java.time.temporal.ChronoUnit;
3132
import java.util.ArrayList;
3233
import java.util.LinkedList;
@@ -76,7 +77,11 @@ class UnboundZmqEventBus implements EventBus {
7677
private ZMQ.Socket sub;
7778

7879
UnboundZmqEventBus(
79-
ZContext context, String publishConnection, String subscribeConnection, Secret secret) {
80+
ZContext context,
81+
String publishConnection,
82+
String subscribeConnection,
83+
Secret secret,
84+
Duration heartbeatPeriod) {
8085
Require.nonNull("Secret", secret);
8186
StringBuilder builder = new StringBuilder();
8287
try (JsonOutput out = JSON.newOutput(builder)) {
@@ -136,11 +141,13 @@ class UnboundZmqEventBus implements EventBus {
136141
() -> {
137142
sub = context.createSocket(SocketType.SUB);
138143
sub.setIPv6(isSubAddressIPv6(publishConnection));
144+
ZmqUtils.configureHeartbeat(sub, heartbeatPeriod, "SUB");
139145
sub.connect(publishConnection);
140146
sub.subscribe(new byte[0]);
141147

142148
pub = context.createSocket(SocketType.PUB);
143149
pub.setIPv6(isSubAddressIPv6(subscribeConnection));
150+
ZmqUtils.configureHeartbeat(pub, heartbeatPeriod, "PUB");
144151
pub.connect(subscribeConnection);
145152
});
146153
// Connections are already established

0 commit comments

Comments
 (0)