Skip to content

Commit f9541c7

Browse files
authored
Merge branch 'trunk' into fix-bidi-network-tests-py
2 parents ec740de + 5d281ef commit f9541c7

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

java/src/org/openqa/selenium/grid/node/Node.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@ protected Node(
199199
.to(() -> new Drain(this, json))
200200
.with(spanDecorator("node.drain").andThen(requiresSecret)),
201201
get("/se/grid/node/status")
202-
.to(
203-
() ->
204-
req -> new HttpResponse().setContent(asJson(Map.of("value", getStatus()))))
202+
.to(() -> req -> new HttpResponse().setContent(asJson(getStatus())))
205203
.with(spanDecorator("node.node_status")),
206204
get("/status").to(() -> new StatusHandler(this)).with(spanDecorator("node.status")));
207205
}

java/src/org/openqa/selenium/grid/router/HandleSession.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import static org.openqa.selenium.remote.RemoteTags.SESSION_ID;
2222
import static org.openqa.selenium.remote.RemoteTags.SESSION_ID_EVENT;
2323
import static org.openqa.selenium.remote.http.Contents.asJson;
24+
import static org.openqa.selenium.remote.http.Contents.string;
2425
import static org.openqa.selenium.remote.http.HttpMethod.GET;
2526
import static org.openqa.selenium.remote.tracing.Tags.EXCEPTION;
2627
import static org.openqa.selenium.remote.tracing.Tags.HTTP_REQUEST;
@@ -48,8 +49,8 @@
4849
import org.openqa.selenium.grid.data.NodeStatus;
4950
import org.openqa.selenium.grid.sessionmap.SessionMap;
5051
import org.openqa.selenium.grid.web.ReverseProxyHandler;
51-
import org.openqa.selenium.grid.web.Values;
5252
import org.openqa.selenium.internal.Require;
53+
import org.openqa.selenium.json.Json;
5354
import org.openqa.selenium.remote.ErrorCodec;
5455
import org.openqa.selenium.remote.SessionId;
5556
import org.openqa.selenium.remote.http.ClientConfig;
@@ -256,10 +257,13 @@ private ClientConfig fetchNodeSessionTimeout(URI uri) {
256257
try (HttpClient httpClient = httpClientFactory.createClient(config)) {
257258
HttpRequest statusRequest = new HttpRequest(GET, "/se/grid/node/status");
258259
HttpResponse res = httpClient.execute(statusRequest);
259-
NodeStatus nodeStatus = Values.get(res, NodeStatus.class);
260+
Json json = new Json();
261+
NodeStatus nodeStatus = json.toType(string(res), NodeStatus.class);
260262
if (nodeStatus != null) {
261263
sessionTimeout = nodeStatus.getSessionTimeout();
262264
}
265+
} catch (Exception e) {
266+
LOG.fine("Unable to fetch status for " + uri);
263267
}
264268
LOG.fine("Set read timeout: " + sessionTimeout.toSeconds() + " seconds for " + uri);
265269
config = config.readTimeout(sessionTimeout);

multitool.lock.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,41 @@
44
"binaries": [
55
{
66
"kind": "archive",
7-
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.3/ruff-aarch64-unknown-linux-musl.tar.gz",
7+
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.10/ruff-aarch64-unknown-linux-musl.tar.gz",
88
"file": "ruff-aarch64-unknown-linux-musl/ruff",
9-
"sha256": "7890e49b12c1321688540324a7788457a22711657301598402cba1a9e9be6607",
9+
"sha256": "10b43a88fb948aaae538ec9f35e93b4433f144d0379fb3a67d88282595b969f7",
1010
"os": "linux",
1111
"cpu": "arm64"
1212
},
1313
{
1414
"kind": "archive",
15-
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.3/ruff-x86_64-unknown-linux-musl.tar.gz",
15+
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.10/ruff-x86_64-unknown-linux-musl.tar.gz",
1616
"file": "ruff-x86_64-unknown-linux-musl/ruff",
17-
"sha256": "6ee9216ba4f7fd761e68bd5c23958e662c67fcff8f49e511660d557431b4bd7c",
17+
"sha256": "dd4e5b8f81547a48975489913a80e0dce6be7f1c455912fe3a5bd5a1f5f1a35d",
1818
"os": "linux",
1919
"cpu": "x86_64"
2020
},
2121
{
2222
"kind": "archive",
23-
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.3/ruff-aarch64-apple-darwin.tar.gz",
23+
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.10/ruff-aarch64-apple-darwin.tar.gz",
2424
"file": "ruff-aarch64-apple-darwin/ruff",
25-
"sha256": "5769e4841870d1f7c17f12a7d1437222e8035eded52f93c54c035c770dbffebb",
25+
"sha256": "72c6abf39f5e87c57faa2d191baf2582e437ff72cdc0f52b7c7e50f26d41b807",
2626
"os": "macos",
2727
"cpu": "arm64"
2828
},
2929
{
3030
"kind": "archive",
31-
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.3/ruff-x86_64-apple-darwin.tar.gz",
31+
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.10/ruff-x86_64-apple-darwin.tar.gz",
3232
"file": "ruff-x86_64-apple-darwin/ruff",
33-
"sha256": "472a4790db11a8bcd79cf7b731fb1c036c376f9cc4e6532099f8f39a6f86b9bb",
33+
"sha256": "8619f277921b3e2e56d850c3e203fd4ef10b457bc50f93ab6fe85743eb324de6",
3434
"os": "macos",
3535
"cpu": "x86_64"
3636
},
3737
{
3838
"kind": "archive",
39-
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.3/ruff-x86_64-pc-windows-msvc.zip",
39+
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.10/ruff-x86_64-pc-windows-msvc.zip",
4040
"file": "ruff-x86_64-pc-windows-msvc/ruff.exe",
41-
"sha256": "37dc6f2f5756421fc59fe5f841ecaa92beee38a39751dfe5a42bdc13992da3d5",
41+
"sha256": "a639e4dee10cb2900bffa7165457766671c59c744ce6b61cc658c35ab33a91fd",
4242
"os": "windows",
4343
"cpu": "x86_64"
4444
}

py/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ commands =
4343
[testenv:linting]
4444
skip_install = true
4545
deps =
46-
ruff==0.12.3
46+
ruff==0.12.10
4747
commands =
4848
ruff check --fix --show-fixes --exit-non-zero-on-fix .
4949
ruff format --exit-non-zero-on-format .

0 commit comments

Comments
 (0)