Skip to content

Commit f090146

Browse files
authored
Merge branch 'trunk' into add-duration-to-action-constructor
2 parents 0ef4c94 + 0e2a683 commit f090146

File tree

57 files changed

+3422
-5509
lines changed

Some content is hidden

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

57 files changed

+3422
-5509
lines changed

.github/workflows/bazel.yml

-16
Original file line numberDiff line numberDiff line change
@@ -143,22 +143,6 @@ jobs:
143143
- name: Set resolution
144144
if: inputs.os == 'windows' && inputs.browser != ''
145145
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
146-
- name: Setup Chrome
147-
if: inputs.browser == 'chrome'
148-
uses: browser-actions/setup-chrome@latest
149-
with:
150-
chrome-version: ${{ inputs.browser-version || 'stable' }}
151-
- name: Setup Firefox
152-
if: inputs.browser == 'firefox'
153-
uses: abhi1693/[email protected]
154-
with:
155-
browser: firefox
156-
version: ${{ inputs.browser-version || 'latest' }}
157-
- name: Setup Edge
158-
if: inputs.browser == 'edge'
159-
uses: browser-actions/setup-edge@latest
160-
with:
161-
edge-version: ${{ inputs.browser-version || 'stable' }}
162146
- name: Setup Safari
163147
if: inputs.browser == 'safari'
164148
run: sudo safaridriver --enable

.github/workflows/ci-javascript.yml

+1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ jobs:
3131
bazel test
3232
--flaky_test_attempts 3
3333
--test_tag_filters ${{ matrix.browser }}
34+
--local_test_jobs 1
3435
//javascript/node/...

.github/workflows/ci-ruby.yml

+2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ jobs:
9494
--local_test_jobs 1
9595
--test_size_filters large
9696
--test_tag_filters ${{ matrix.browser }}
97+
${{ matrix.os != 'windows' && '--pin_browsers=true' || '' }}
9798
//rb/spec/...
9899
99100
integration-tests-remote:
@@ -123,4 +124,5 @@ jobs:
123124
--local_test_jobs 1
124125
--test_size_filters large
125126
--test_tag_filters ${{ matrix.browser }}-remote
127+
${{ matrix.os != 'windows' && '--pin_browsers=true' || '' }}
126128
//rb/spec/...

.github/workflows/nightly.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ jobs:
3535
with:
3636
name: Nightly Ruby Release
3737
cache-key: rb-nightly-${{ matrix.gem }}
38-
env:
39-
GEM_HOST_API_KEY: "Bearer $GITHUB_TOKEN"
40-
run: ./go rb:release['nightly', '--config=release']
38+
run: |
39+
export GEM_HOST_API_KEY="Bearer $GITHUB_TOKEN"
40+
./go rb:release[nightly]
4141
on-ruby-failure:
4242
name: On Ruby Failure
4343
runs-on: ubuntu-latest
@@ -63,7 +63,7 @@ jobs:
6363
with:
6464
name: Nightly Python Release
6565
cache-key: python-nightly
66-
run: ./go py:release['nightly', '--config=release']
66+
run: ./go py:release[nightly]
6767
secrets: inherit
6868
on-python-failure:
6969
name: On Python Failure
@@ -90,7 +90,7 @@ jobs:
9090
with:
9191
name: Nightly Java Release
9292
cache-key: java-nightly
93-
run: ./go publish-maven-snapshot
93+
run: ./go java:release[nightly]
9494
secrets: inherit
9595
on-java-failure:
9696
name: On Java Failure
@@ -118,7 +118,7 @@ jobs:
118118
name: Nightly DotNet Release
119119
cache-key: dotnet-nightly
120120
dotnet-version: '6.x'
121-
run: ./go dotnet:release['nightly', '--config=release']
121+
run: ./go dotnet:release[--stamp,nightly]
122122
secrets: inherit
123123
on-dotnet-failure:
124124
name: On .NET Failure
@@ -179,7 +179,7 @@ jobs:
179179
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
180180
echo "@seleniumhq:registry=https://npm.pkg.github.com" >> ~/.npmrc
181181
echo "always-auth=true" >> ~/.npmrc
182-
./go node:release['nightly', '--config=release']
182+
./go node:release[--stamp,nightly]
183183
secrets: inherit
184184
on-javascript-failure:
185185
name: On JavaScript Failure

.github/workflows/pre-release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
fetch-tags: true
6969
ref: release-${{ github.event.inputs.version }}
7070
- name: Install Ruby
71-
uses: ruby/setup-ruby@d5fb7a202fc07872cb44f00ba8e6197b70cb0c55
71+
uses: ruby/setup-ruby@v1
7272
with:
7373
ruby-version: '3.1'
7474
working-directory: 'rb'
@@ -80,10 +80,10 @@ jobs:
8080
run: git reset HEAD~1
8181
- name: Update everything including early release CDP
8282
if: ${{ github.event.inputs.chrome_channel == 'early-stable' }}
83-
run: ./go all:prepare['Beta']
83+
run: ./go all:prepare[${{ github.event.inputs.version }},Beta]
8484
- name: Update everything including released CDP
8585
if: ${{ github.event.inputs.chrome_channel == 'stable' }}
86-
run: ./go "all:prepare[Stable]"
86+
run: ./go "all:prepare[${{ github.event.inputs.version }},Stable]"
8787
- name: Create Pull Request
8888
uses: peter-evans/create-pull-request@v6
8989
with:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ py/selenium/webdriver/remote/isDisplayed.js
7676
py/docs/build/
7777
py/build/
7878
py/LICENSE
79+
py/pytestdebug.log
7980
selenium.egg-info/
8081
third_party/java/jetty/jetty-repacked.jar
8182
*.user

.skipped-tests

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
-//rb/spec/integration/selenium/webdriver/firefox:service-firefox
2828
-//rb/spec/integration/selenium/webdriver/firefox:service-firefox-beta
2929
-//rb/spec/integration/selenium/webdriver:element-chrome
30-
-//rb/spec/integration/selenium/webdriver/firefox:driver-firefox-beta
3130
-//rb/spec/integration/selenium/webdriver/chrome:service-chrome-bidi
3231
-//rb/spec/integration/selenium/webdriver/edge:service-edge-bidi
3332
-//rb/spec/integration/selenium/webdriver/firefox:service-firefox-bidi

BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ filegroup(
2626
srcs = [
2727
"Rakefile",
2828
],
29-
visibility = ["//rb:__subpackages__",],
29+
visibility = ["//rb:__subpackages__"],
3030
)
3131

3232
alias(

Rakefile

+44-76
Original file line numberDiff line numberDiff line change
@@ -336,69 +336,30 @@ end
336336

337337
task 'release-java': %i[java-release-zip publish-maven]
338338

339-
# TODO: just set the environment variables that maven is asking for
340339
def read_m2_user_pass
341-
user = ENV.fetch('SEL_M2_USER', nil)
342-
pass = ENV.fetch('SEL_M2_PASS', nil)
343-
if user && pass
344-
puts 'Fetching m2 user and pass from environment variables.'
345-
return [user, pass]
346-
end
347-
348-
puts 'Fetching m2 user and pass from /.m2/settings.xml.'
340+
puts 'Maven environment variables not set, inspecting /.m2/settings.xml.'
349341
settings = File.read("#{Dir.home}/.m2/settings.xml")
350342
found_section = false
351343
settings.each_line do |line|
352344
if !found_section
353345
found_section = line.include? '<id>sonatype-nexus-staging</id>'
354346
elsif line.include?('<username>')
355-
user = line[%r{<username>(.*?)</username>}, 1]
347+
ENV['MAVEN_USER'] = line[%r{<username>(.*?)</username>}, 1]
356348
elsif line.include?('<password>')
357-
pass = line[%r{<password>(.*?)</password>}, 1]
349+
ENV['MAVEN_PASSWORD'] = line[%r{<password>(.*?)</password>}, 1]
358350
end
359-
break if user && pass
351+
break if ENV['MAVEN_PASSWORD'] && ENV['MAVEN_USER']
360352
end
361-
[user, pass]
362353
end
363354

364355
desc 'Publish all Java jars to Maven as stable release'
365-
task 'publish-maven': JAVA_RELEASE_TARGETS do
366-
creds = read_m2_user_pass
367-
JAVA_RELEASE_TARGETS.each do |p|
368-
Bazel.execute('run',
369-
['--stamp',
370-
'--define',
371-
'maven_repo=https://oss.sonatype.org/service/local/staging/deploy/maven2',
372-
'--define',
373-
"maven_user=#{creds[0]}",
374-
'--define',
375-
"maven_password=#{creds[1]}",
376-
'--define',
377-
'gpg_sign=true'],
378-
p)
379-
end
356+
task 'publish-maven' do
357+
Rake::Task['java:release'].invoke
380358
end
381359

382360
desc 'Publish all Java jars to Maven as nightly release'
383-
task 'publish-maven-snapshot': JAVA_RELEASE_TARGETS do
384-
creds = read_m2_user_pass
385-
if java_version.end_with?('-SNAPSHOT')
386-
JAVA_RELEASE_TARGETS.each do |p|
387-
Bazel.execute('run',
388-
['--stamp',
389-
'--define',
390-
'maven_repo=https://oss.sonatype.org/content/repositories/snapshots',
391-
'--define',
392-
"maven_user=#{creds[0]}",
393-
'--define',
394-
"maven_password=#{creds[1]}",
395-
'--define',
396-
'gpg_sign=false'],
397-
p)
398-
end
399-
else
400-
puts 'No SNAPSHOT version configured. Targets will not be pushed to the snapshot repo in SonaType.'
401-
end
361+
task 'publish-maven-snapshot' do
362+
Rake::Task['java:release'].invoke('nightly')
402363
end
403364

404365
desc 'Install jars to local m2 directory'
@@ -485,11 +446,11 @@ namespace :node do
485446

486447
desc 'Release Node npm package'
487448
task :release do |_task, arguments|
488-
args = arguments.to_a.compact.empty? ? ['--stamp'] : arguments.to_a.compact
449+
args = arguments.to_a.compact
489450
nightly = args.delete('nightly')
490451
Rake::Task['node:version'].invoke('nightly') if nightly
491452

492-
Bazel.execute('run', args, '//javascript/node/selenium-webdriver:selenium-webdriver.publish')
453+
Bazel.execute('run', ['--stamp'], '//javascript/node/selenium-webdriver:selenium-webdriver.publish')
493454
end
494455

495456
desc 'Release Node npm package'
@@ -550,12 +511,12 @@ namespace :py do
550511

551512
desc 'Release Python wheel and sdist to pypi'
552513
task :release do |_task, arguments|
553-
args = arguments.to_a.compact.empty? ? ['--stamp'] : arguments.to_a.compact
514+
args = arguments.to_a.compact
554515
nightly = args.delete('nightly')
555516
Rake::Task['py:version'].invoke('nightly') if nightly
556517

557-
command = nightly.nil? ? '//py:selenium-release' : '//py:selenium-release-nightly'
558-
Bazel.execute('run', args, command)
518+
command = nightly ? '//py:selenium-release-nightly' : '//py:selenium-release'
519+
Bazel.execute('run', ['--stamp'], command)
559520
end
560521

561522
desc 'generate and copy files required for local development'
@@ -706,9 +667,6 @@ namespace :rb do
706667
args = arguments.to_a.compact
707668
webdriver = args.delete('webdriver')
708669
devtools = args.delete('devtools')
709-
if args.include?('--config=remote') || args.include?('--config=release')
710-
File.write('rb/.ruby-version', 'jruby-9.4.7.0')
711-
end
712670

713671
Bazel.execute('build', args, '//rb:selenium-webdriver') if webdriver || !devtools
714672
Bazel.execute('build', args, '//rb:selenium-devtools') if devtools || !webdriver
@@ -724,16 +682,15 @@ namespace :rb do
724682
desc 'Push Ruby gems to rubygems'
725683
task :release do |_task, arguments|
726684
args = arguments.to_a.compact
727-
if args.include?('--config=remote') || args.include?('--config=release')
728-
File.write('rb/.ruby-version', 'jruby-9.4.7.0')
729-
end
730-
731685
nightly = args.delete('nightly')
732-
wd_target = nightly ? '//rb:selenium-webdriver-release' : '//rb:selenium-webdriver-release-nightly'
733-
cdp_target = nightly ? '//rb:selenium-devtools-release' : '//rb:selenium-devtools-release-nightly'
734686

735-
Bazel.execute('run', args, wd_target)
736-
Bazel.execute('run', args, cdp_target)
687+
if nightly
688+
Bazel.execute('run', [], '//rb:selenium-webdriver-bump-nightly-version')
689+
Bazel.execute('run', ['--stamp'], '//rb:selenium-webdriver-release-nightly')
690+
else
691+
Bazel.execute('run', ['--stamp'], '//rb:selenium-webdriver-release')
692+
Bazel.execute('run', ['--stamp'], '//rb:selenium-devtools-release')
693+
end
737694
end
738695

739696
desc 'Generate Ruby documentation'
@@ -802,16 +759,14 @@ namespace :dotnet do
802759

803760
desc 'Upload nupkg files to Nuget'
804761
task :release do |_task, arguments|
805-
args = arguments.to_a.compact.empty? ? ['--stamp'] : arguments.to_a.compact
762+
args = arguments.to_a.compact
806763
nightly = args.delete('nightly')
807764
Rake::Task['dotnet:version'].invoke('nightly') if nightly
765+
Rake::Task['dotnet:package'].invoke('--stamp')
808766

809-
Rake::Task['dotnet:package'].invoke(*args)
810-
811-
release_version = dotnet_version
812767
api_key = ENV.fetch('NUGET_API_KEY', nil)
813768
push_destination = 'https://api.nuget.org/v3/index.json'
814-
if release_version.include?('-nightly')
769+
if nightly
815770
# Nightly builds are pushed to GitHub NuGet repository
816771
# This commands will run in GitHub Actions
817772
api_key = ENV.fetch('GITHUB_TOKEN', nil)
@@ -885,13 +840,13 @@ namespace :java do
885840
desc 'Build Java Client Jars'
886841
task :build do |_task, arguments|
887842
args = arguments.to_a.compact
888-
Bazel.execute('build', args, '//java/src/org/openqa/selenium:client-combined')
843+
JAVA_RELEASE_TARGETS.each { |target| Bazel.execute('build', args, target) }
889844
end
890845

891-
desc 'Build Grid Jar'
846+
desc 'Build Grid Server'
892847
task :grid do |_task, arguments|
893848
args = arguments.to_a.compact
894-
Bazel.execute('build', args, '//java/src/org/openqa/selenium/grid:grid')
849+
Bazel.execute('build', args, '//java/src/org/openqa/selenium/grid:executable-grid')
895850
end
896851

897852
desc 'Package Java bindings and grid into releasable packages and stage for release'
@@ -917,9 +872,21 @@ namespace :java do
917872

918873
desc 'Deploy all jars to Maven'
919874
task :release do |_task, arguments|
920-
args = arguments.to_a.compact.empty? ? ['--stamp'] : arguments.to_a.compact
921-
Rake::Task['java:package'].invoke(*args)
922-
Rake::Task['publish-maven'].invoke
875+
args = arguments.to_a.compact
876+
nightly = args.delete('nightly')
877+
878+
ENV['MAVEN_USER'] ||= ENV.fetch('SEL_M2_USER', nil)
879+
ENV['MAVEN_PASSWORD'] ||= ENV.fetch('SEL_M2_PASS', nil)
880+
read_m2_user_pass unless ENV['MAVEN_PASSWORD'] && ENV['MAVEN_USER']
881+
882+
repo = nightly ? 'content/repositories/snapshots' : 'service/local/staging/deploy/maven2'
883+
ENV['MAVEN_REPO'] = "https://oss.sonatype.org/#{repo}"
884+
ENV['GPG_SIGN'] = (!nightly).to_s
885+
886+
Rake::Task['java:version'].invoke if nightly
887+
Rake::Task['java:package'].invoke('--stamp')
888+
Rake::Task['java:build'].invoke('--stamp')
889+
JAVA_RELEASE_TARGETS.each { |target| Bazel.execute('run', ['--stamp'], target) }
923890
end
924891

925892
desc 'Install jars to local m2 directory'
@@ -1104,8 +1071,9 @@ namespace :all do
11041071
end
11051072

11061073
desc 'Update everything in preparation for a release'
1107-
task :prepare, [:channel] do |_task, arguments|
1074+
task :prepare, [:version, :channel] do |_task, arguments|
11081075
chrome_channel = arguments[:channel] || 'Stable'
1076+
version = arguments[:version]
11091077
args = Array(chrome_channel) ? ['--', "--chrome_channel=#{chrome_channel.capitalize}"] : []
11101078
Bazel.execute('run', args, '//scripts:pinned_browsers')
11111079
commit!('Update pinned browser versions', ['common/repositories.bzl'])
@@ -1135,7 +1103,7 @@ namespace :all do
11351103
commit!('Update authors file', ['AUTHORS'])
11361104

11371105
# Note that this does not include Rust version changes that are handled in separate rake:version task
1138-
Rake::Task['all:version'].invoke
1106+
Rake::Task['all:version'].invoke(version)
11391107
commit!("FIX CHANGELOGS BEFORE MERGING!\n\nUpdate versions and change logs to release Selenium #{java_version}",
11401108
['dotnet/CHANGELOG',
11411109
'dotnet/selenium-dotnet-version.bzl',

WORKSPACE

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ rules_closure_toolchains()
3434

3535
http_archive(
3636
name = "rules_rust",
37-
integrity = "sha256-F8U7+AC5MvMtPKGdLLnorVM84cDXKfDRgwd7/dq3rUY=",
38-
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.46.0/rules_rust-v0.46.0.tar.gz"],
37+
integrity = "sha256-JLN47ZcAbx9wEr5Jiib4HduZATGLiDgK7oUi/fvotzU=",
38+
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.42.1/rules_rust-v0.42.1.tar.gz"],
3939
)
4040

4141
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Manifest-Version: 1.0
2+
3+
Name: inject.js
4+
Digest-Algorithms: SHA1 SHA256
5+
SHA1-Digest: b2nrco3zOUBDJuyARPlsNEU8O9A=
6+
SHA256-Digest: lU8GPe0dnC/AH4PaP0/akwta9vNay0n7fsgkBOieLsg=
7+
8+
Name: manifest.json
9+
Digest-Algorithms: SHA1 SHA256
10+
SHA1-Digest: EjY6pS7xUwQxN7ijQqys3bdEHHc=
11+
SHA256-Digest: eLH2wKnhmjOvDJk/13OJMeh+X4sdlSpbOIfyhp44Zaw=
12+
Binary file not shown.

0 commit comments

Comments
 (0)