Skip to content

Commit

Permalink
Merge branch 'trunk' into node-removed
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol authored May 2, 2023
2 parents 4350089 + 83b0b0d commit 5187579
Show file tree
Hide file tree
Showing 34 changed files with 112 additions and 383 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
fail-fast: false
matrix:
include:
- ruby-version: 2.7.6
- ruby-version: 3.0.6
os: ubuntu
- ruby-version: 2.7.6
- ruby-version: 3.0.6
os: windows
- ruby-version: 3.2.0
os: ubuntu
Expand Down
9 changes: 8 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def release_version
end

def version
"#{release_version}.0"
"#{release_version}.1-SNAPSHOT"
end

# The build system used by webdriver is layered on top of rake, and we call it
Expand Down Expand Up @@ -386,6 +386,13 @@ task 'publish-maven': JAVA_RELEASE_TARGETS do
end
end

task 'publish-maven-snapshot': JAVA_RELEASE_TARGETS do
creds = read_user_pass_from_m2_settings
JAVA_RELEASE_TARGETS.each do |p|
Bazel::execute('run', ['--stamp', '--define', 'maven_repo=https://oss.sonatype.org/content/repositories/snapshots', '--define', "maven_user=#{creds[0]}", '--define', "maven_password=#{creds[1]}", '--define', 'gpg_sign=true'], p)
end
end

task :'maven-install' do
JAVA_RELEASE_TARGETS.each do |p|
Bazel::execute('run', ['--stamp', '--define', "maven_repo=file://#{ENV['HOME']}/.m2/repository", '--define', 'gpg_sign=false'], p)
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ pin_browsers()

http_archive(
name = "rules_ruby",
sha256 = "5228950029d57476a4903db35cd8ce6a4526e30fba08a01af9d7a9b8ebaf63ae",
strip_prefix = "rules_ruby-9e6e07ed5d7e02f8bb1c77ce543072d5548bbd86",
url = "https://github.com/p0deje/rules_ruby/archive/9e6e07ed5d7e02f8bb1c77ce543072d5548bbd86.zip",
sha256 = "dddae0f5bf2c2aa95e20923a6f9f746b0457b956e43e8bd6874d09d88795b40d",
strip_prefix = "rules_ruby-be44e324165c617210f9d22e4cdf661c9e330ca2",
url = "https://github.com/p0deje/rules_ruby/archive/be44e324165c617210f9d22e4cdf661c9e330ca2.zip",
)

load("//rb:ruby_version.bzl", "RUBY_VERSION")
Expand Down
1 change: 0 additions & 1 deletion java/maven_install.json
Original file line number Diff line number Diff line change
Expand Up @@ -3414,7 +3414,6 @@
"org.openqa.selenium.remote.locators",
"org.openqa.selenium.remote.mobile",
"org.openqa.selenium.remote.service",
"org.openqa.selenium.remote.session",
"org.openqa.selenium.remote.tracing",
"org.openqa.selenium.remote.tracing.empty",
"org.openqa.selenium.remote.tracing.opentelemetry"
Expand Down
12 changes: 12 additions & 0 deletions java/src/org/openqa/selenium/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,18 @@ public String toString() {
}
},

VENTURA("ventura", "os x 13.0", "macos 13.0") {
@Override
public Platform family() {
return MAC;
}

@Override
public String toString() {
return "macOS 13.0";
}
},

/**
* Many platforms have UNIX traits, amongst them LINUX, Solaris and BSD.
*/
Expand Down
1 change: 1 addition & 0 deletions java/src/org/openqa/selenium/grid/node/SessionFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ public interface SessionFactory extends
Function<CreateSessionRequest, Either<WebDriverException, ActiveSession>>,
Predicate<Capabilities> {

Capabilities getStereotype();
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ public DriverServiceSessionFactory(
this.sessionCapabilitiesMutator = new SessionCapabilitiesMutator(this.stereotype);
}

@Override
public Capabilities getStereotype() {
return stereotype;
}

@Override
public boolean test(Capabilities capabilities) {
return predicate.test(capabilities);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,12 @@ private void report(Map.Entry<WebDriverInfo, Collection<SessionFactory>> entry)
StringBuilder caps = new StringBuilder();
try (JsonOutput out = JSON.newOutput(caps)) {
out.setPrettyPrint(false);
out.write(entry.getKey().getCanonicalCapabilities());
Optional<SessionFactory> optionalSessionFactory = entry.getValue().stream().findFirst();
if (optionalSessionFactory.isPresent()) {
out.write(optionalSessionFactory.get().getStereotype());
} else {
out.write(entry.getKey().getCanonicalCapabilities());
}
}

LOG.info(String.format(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ public DockerSessionFactory(
this.slotMatcher = new DefaultSlotMatcher();
}

@Override
public Capabilities getStereotype() {
return stereotype;
}

@Override
public boolean test(Capabilities capabilities) {
return slotMatcher.matches(stereotype, capabilities);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ public RelaySessionFactory(
.copyOf(Require.nonNull("Stereotype", stereotype));
}

@Override
public Capabilities getStereotype() {
return stereotype;
}

@Override
public boolean test(Capabilities capabilities) {
// If a request reaches this point is because the basic match of W3C caps has already been done.
Expand Down
2 changes: 0 additions & 2 deletions java/src/org/openqa/selenium/remote/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ java_export(
uses = [
"org.openqa.selenium.devtools.CdpInfo",
"org.openqa.selenium.remote.AugmenterProvider",
"org.openqa.selenium.remote.session.CapabilitiesFilter",
"org.openqa.selenium.remote.session.CapabilityTransform",
"org.openqa.selenium.remote.service.DriverService$Builder",
],
visibility = ["//visibility:public"],
Expand Down
148 changes: 0 additions & 148 deletions java/src/org/openqa/selenium/remote/CapabilitiesUtils.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Logger;

import static java.util.Collections.emptyMap;
import static java.util.concurrent.TimeUnit.SECONDS;
Expand All @@ -63,6 +64,7 @@ public class DriverService implements Closeable {

private static final String NAME = "Driver Service Executor";
protected static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(20);
private static final Logger LOG = Logger.getLogger(DriverService.class.getName());

private final ExecutorService executorService = Executors.newFixedThreadPool(2, r -> {
Thread thread = new Thread(r);
Expand Down Expand Up @@ -200,6 +202,7 @@ public void start() throws IOException {
}
this.executable = DriverFinder.getPath(this, getDefaultDriverOptions());
}
LOG.fine(String.format("Starting driver at %s with %s", this.executable, this.args));
process = new CommandLine(this.executable, args.toArray(new String[]{}));
process.setEnvironmentVariables(environment);
process.copyOutputTo(getOutputStream());
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5187579

Please sign in to comment.