Skip to content

Commit ebe3293

Browse files
authored
Merge branch 'trunk' into fix-python-type-annotations
2 parents 00cc02d + 992c1cd commit ebe3293

File tree

8 files changed

+26
-16
lines changed

8 files changed

+26
-16
lines changed

.github/workflows/update-documentation.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ on:
1919
- dotnet
2020
- node
2121
- all
22+
force:
23+
description: Force generation even if version is nightly, type "force" to enable
24+
required: false
25+
type: string
26+
default: ""
2227

2328
workflow_call:
2429
inputs:
@@ -74,7 +79,7 @@ jobs:
7479
npm install
7580
npm install --prefix javascript/selenium-webdriver
7681
- name: Generate Documentation for selected langauges
77-
run: ./go ${{ inputs.language }}:docs
82+
run: ./go ${{ inputs.language }}:docs ${{ inputs.force }}
7883
- name: Documentation Pull Request
7984
id: cpr
8085
uses: peter-evans/create-pull-request@v6

Rakefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,12 +1118,13 @@ namespace :all do
11181118
end
11191119

11201120
desc 'Update all API Documentation'
1121-
task :docs do
1122-
Rake::Task['java:docs'].invoke('skip_update')
1123-
Rake::Task['py:docs'].invoke('skip_update')
1124-
Rake::Task['rb:docs'].invoke('skip_update')
1125-
Rake::Task['dotnet:docs'].invoke('skip_update')
1126-
Rake::Task['node:docs'].invoke('skip_update')
1121+
task :docs do |_task, arguments|
1122+
args = arguments.to_a
1123+
Rake::Task['java:docs'].invoke(*(args + ['skip_update']))
1124+
Rake::Task['py:docs'].invoke(*(args + ['skip_update']))
1125+
Rake::Task['rb:docs'].invoke(*(args + ['skip_update']))
1126+
Rake::Task['dotnet:docs'].invoke(*(args + ['skip_update']))
1127+
Rake::Task['node:docs'].invoke(*(args + ['skip_update']))
11271128

11281129
update_gh_pages
11291130
end

common/selenium_manager.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def selenium_manager():
2020
http_file(
2121
name = "download_sm_windows",
2222
executable = True,
23-
sha256 = "eb6e3b19bb70c3fee7fdb332153d7c7c523034044059900e80b663b8817e720c",
23+
sha256 = "89dd1d25e321a07cc88fd76fb6143008298092faecb1573835e0f86483d0abfa",
2424
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-acecd4f/selenium-manager-windows.exe",
2525
)
2626

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@
2828
import org.openqa.selenium.remote.Dialect;
2929
import org.openqa.selenium.remote.SessionId;
3030
import org.openqa.selenium.remote.http.HttpClient;
31-
import org.openqa.selenium.remote.http.HttpHandler;
3231
import org.openqa.selenium.remote.http.HttpRequest;
3332
import org.openqa.selenium.remote.http.HttpResponse;
3433
import org.openqa.selenium.remote.tracing.Tracer;
3534

3635
public class DefaultActiveSession extends BaseActiveSession {
3736

38-
private final HttpHandler handler;
37+
private final ReverseProxyHandler handler;
3938
private final String killUrl;
4039

4140
protected DefaultActiveSession(
@@ -68,6 +67,6 @@ public HttpResponse execute(HttpRequest req) throws UncheckedIOException {
6867

6968
@Override
7069
public void stop() {
71-
// no-op
70+
handler.close();
7271
}
7372
}

java/src/org/openqa/selenium/grid/node/config/DriverServiceSessionFactory.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ public Either<WebDriverException, ActiveSession> apply(CreateSessionRequest sess
190190
caps = readPrefixedCaps(capabilities, caps);
191191

192192
span.addEvent("Driver service created session", attributeMap);
193-
final HttpClient fClient = client;
194193
return Either.right(
195194
new DefaultActiveSession(
196195
tracer,
@@ -204,9 +203,8 @@ public Either<WebDriverException, ActiveSession> apply(CreateSessionRequest sess
204203
Instant.now()) {
205204
@Override
206205
public void stop() {
207-
try (fClient) {
208-
service.stop();
209-
}
206+
super.stop();
207+
service.stop();
210208
}
211209
});
212210
} catch (Exception e) {

java/src/org/openqa/selenium/grid/node/docker/DockerSession.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public void stop() {
6767
}
6868
saveLogs();
6969
container.stop(Duration.ofMinutes(1));
70+
super.stop();
7071
}
7172

7273
private void saveLogs() {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public UsageCountingReverseProxyHandler(
9090

9191
@Override
9292
public void close() {
93+
// must not call super.close() here, to ensure the HttpClient stays alive
9394
// set the last use here, to ensure we have to calculate the real inactivity of the client
9495
entry.lastUse = Instant.now();
9596
entry.inUse.decrementAndGet();

java/src/org/openqa/selenium/grid/web/ReverseProxyHandler.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.openqa.selenium.remote.tracing.Span;
3434
import org.openqa.selenium.remote.tracing.Tracer;
3535

36-
public class ReverseProxyHandler implements HttpHandler {
36+
public class ReverseProxyHandler implements HttpHandler, AutoCloseable {
3737

3838
private static final Logger LOG = Logger.getLogger(ReverseProxyHandler.class.getName());
3939

@@ -101,4 +101,9 @@ public HttpResponse execute(HttpRequest req) throws UncheckedIOException {
101101
return resp;
102102
}
103103
}
104+
105+
@Override
106+
public void close() {
107+
upstream.close();
108+
}
104109
}

0 commit comments

Comments
 (0)