Skip to content

Commit

Permalink
Merge branch 'trunk' into FileBackedOutputStreamGone
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol authored Mar 26, 2024
2 parents a3b8dfd + 4cfe983 commit c23908e
Show file tree
Hide file tree
Showing 708 changed files with 17,621 additions and 84,056 deletions.
2 changes: 2 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ dotnet/src/webdriver/obj
java/build/production
java/client/build
java/server/build
javascript/grid-ui/node_modules
javascript/node/selenium-webdriver/node_modules
node_modules
33 changes: 23 additions & 10 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
try-import .bazelrc.local
try-import .bazelrc.windows.local

# Disable bzlmod until we're ready to use it
common --noenable_bzlmod

# Ensure Windows support is accurate.

startup --windows_enable_symlinks
Expand All @@ -25,13 +28,24 @@ build --javacopt="--release 11"
build --experimental_strict_java_deps=strict
build --explicit_java_test_deps

# Ensure builds are unpolluted by the user env
# Allow spaces in runfile paths
build --nobuild_runfile_links

build --incompatible_strict_action_env
# More JS magic
build --experimental_allow_unresolved_symlinks

# Required for faster TS builds
build --@aspect_rules_ts//ts:skipLibCheck=always
fetch --@aspect_rules_ts//ts:skipLibCheck=always
query --@aspect_rules_ts//ts:skipLibCheck=always

# Except for the PATH environment variable
build --@aspect_rules_ts//ts:default_to_tsc_transpiler
fetch --@aspect_rules_ts//ts:default_to_tsc_transpiler
query --@aspect_rules_ts//ts:default_to_tsc_transpiler

build --action_env=PATH
# Ensure builds are unpolluted by the user env

build --incompatible_strict_action_env

# For build stamping

Expand All @@ -53,7 +67,6 @@ test --test_env=DISPLAY
test --test_env=FIREFOX_NIGHTLY_BINARY
test --test_env=GITHUB_ACTIONS
test --test_env=MOZ_HEADLESS
test --test_env=PATH # Remove once browser pinning works
test --test_env=SELENIUM_BROWSER
test --test_env=TRAVIS
test --test_env=PYTHON_VERSION
Expand All @@ -70,8 +83,8 @@ test --test_env=JRUBY_OPTS="--dev"

# JRuby/TruffleRuby: https://github.com/jruby/jruby/issues/5661

build --action_env=HOME
test --test_env=HOME
#build --action_env=HOME
#test --test_env=HOME

# Expose necessary variables for Selenium-Manager.

Expand All @@ -94,7 +107,7 @@ build:remote --remote_cache=grpcs://gypsum.cluster.engflow.com
build:remote -j 50

# Build Without The Bytes
build:remote --remote_download_outputs=minimal
build:remote --remote_download_minimal

build:remote --define=EXECUTOR=remote
build:remote --experimental_inmemory_dotd_files
Expand Down Expand Up @@ -137,8 +150,8 @@ build:remote --//common:pin_browsers
# The remote build machines are pretty small, and 50 threads may leave them
# thrashing, but our dev machines are a lot larger. Scale the workload so we
# make reasonable usage of everything, everywhere, all at once.
build:remote --local_cpu_resources='HOST_CPUS*10'
build:remote --local_ram_resources='HOST_RAM*4.0'
build:remote --local_resources=cpu='HOST_CPUS*10'
build:remote --local_resources=memory='HOST_RAM*4.0'

# A small hint that we're running our tests remotely
test:remote --test_env=REMOTE_BUILD=1
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.0
7.1.0
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// https://containers.dev/implementors/json_reference/

{
"name": "selenium-devcontainer",
"build": {
"dockerfile": "../scripts/dev-image/Dockerfile"
},
"runArgs": ["--name", "selenium_devcontainer"]
}
4 changes: 2 additions & 2 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
distribution: 'temurin'
- name: Setup Bazel with caching
if: inputs.caching
uses: p0deje/setup-bazel@0.6.0
uses: bazel-contrib/setup-bazel@0.8.1
with:
bazelisk-cache: true
bazelrc: common --color=yes
Expand All @@ -110,7 +110,7 @@ jobs:
repository-cache: true
- name: Setup Bazel without caching
if: inputs.caching == false
uses: p0deje/setup-bazel@0.6.0
uses: bazel-contrib/setup-bazel@0.8.1
with:
bazelrc: common --color=yes
- name: Setup Fluxbox and Xvfb
Expand Down
36 changes: 30 additions & 6 deletions .github/workflows/ci-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,47 @@ on:
workflow_dispatch:

jobs:
browser-tests:
browser-tests-windows:
name: Browser Tests
uses: ./.github/workflows/bazel.yml
strategy:
fail-fast: false
matrix:
include:
- os: windows
with:
name: Browser Tests (chrome, ${{ matrix.os }})
os: ${{ matrix.os }}
browser: chrome
cache-key: java-${{ matrix.os }}-tests
run: |
bazel test --flaky_test_attempts 3 //java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest `
//java/test/org/openqa/selenium/federatedcredentialmanagement:FederatedCredentialManagementTest `
//java/test/org/openqa/selenium/firefox:FirefoxDriverBuilderTest `
//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest `
//java/test/org/openqa/selenium/remote:RemoteWebDriverBuilderTest `
//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest
browser-tests-macos:
name: Browser Tests
uses: ./.github/workflows/bazel.yml
strategy:
fail-fast: false
matrix:
include:
- os: macos
with:
name: Browser Tests (chrome, ${{ matrix.os }})
os: ${{ matrix.os }}
browser: chrome
cache-key: java-${{ matrix.os }}-tests
run: >
bazel test //java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest
run: |
bazel test --flaky_test_attempts 3 //java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest-remote \
//java/test/org/openqa/selenium/federatedcredentialmanagement:FederatedCredentialManagementTest \
//java/test/org/openqa/selenium/firefox:FirefoxDriverBuilderTest \
//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest \
//java/test/org/openqa/selenium/remote:RemoteWebDriverBuilderTest \
//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest
remote-tests:
name: Remote Tests
Expand All @@ -29,12 +54,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: windows
- os: macos
with:
name: Remote Tests (chrome, ${{ matrix.os }})
os: ${{ matrix.os }}
browser: chrome
cache-key: java-${{ matrix.os }}-remote-tests
run: >
bazel test //java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest-remote
run: |
bazel test --flaky_test_attempts 3 //java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest-remote
20 changes: 1 addition & 19 deletions .github/workflows/ci-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,4 @@ jobs:
cache-key: node
run: |
export SELENIUM_BROWSER=${{ matrix.browser }}
bazel test --flaky_test_attempts 3 //javascript/node/selenium-webdriver:tests
# As soon as this gets merged https://github.com/facebook/jest/pull/9351, we should upgrade Jest and
# run bazel test javascript/grid-ui:test for these tests
grid-ui:
name: Grid UI Tests
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout source tree
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: NPM install
run: cd javascript/grid-ui && npm install
- name: Run unit tests
run: cd javascript/grid-ui && npm test
bazel test --flaky_test_attempts 3 //javascript/node/selenium-webdriver:${{matrix.browser}}-browser-tests
19 changes: 13 additions & 6 deletions .github/workflows/ci-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ jobs:
cache-key: rb-unit-test-${{ matrix.ruby-version }}
os: ${{ matrix.os }}
ruby-version: ${{ matrix.ruby-version }}
run: bazel test //rb/spec/unit/...
run: >
bazel test
--build_tests_only
--test_size_filters small
//rb/spec/...
integration-tests-local:
name: Local Tests
Expand Down Expand Up @@ -90,10 +94,12 @@ jobs:
os: ${{ matrix.os }}
run: >
bazel test
--define browser=${{ matrix.browser }}
--build_tests_only
--flaky_test_attempts 3
--local_test_jobs 1
//rb/spec/integration/...
--test_size_filters large
--test_tag_filters ${{ matrix.browser }}
//rb/spec/...
integration-tests-remote:
name: Remote Tests
Expand All @@ -119,8 +125,9 @@ jobs:
java-version: 11
run: >
bazel test
--define browser=${{ matrix.browser }}
--define remote=true
--build_tests_only
--flaky_test_attempts 3
--local_test_jobs 1
//rb/spec/integration/...
--test_size_filters large
--test_tag_filters ${{ matrix.browser }}-remote
//rb/spec/...
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
fetch-depth: 50
- name: Setup Bazel
uses: p0deje/setup-bazel@0.4.0
uses: bazel-contrib/setup-bazel@0.8.1
with:
bazelisk-cache: true
external-cache: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: 'Lock Issues'
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
- cron: '45 22 * * *'

permissions:
issues: write
Expand All @@ -22,5 +22,5 @@ jobs:
issue-lock-reason: ''
issue-comment: >
This issue has been automatically locked since there
has not been any recent activity after it was closed.
has not been any recent activity since it was closed.
Please open a new issue for related bugs.
100 changes: 50 additions & 50 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jobs:
needs: update-rust
uses: ./.github/workflows/ci-rust.yml
with:
release: true
branch: release-${{ github.event.inputs.version }}
release: true
branch: release-${{ github.event.inputs.version }}
secrets:
SELENIUM_CI_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }}

Expand All @@ -60,51 +60,51 @@ jobs:
runs-on: ubuntu-latest
needs: selenium-manager
steps:
- name: "Checkout project"
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
fetch-tags: true
ref: release-${{ github.event.inputs.version }}
- name: Install Ruby
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
with:
ruby-version: '3.1'
- name: "Prep git"
run: |
git config --local user.email "selenium-ci@users.noreply.github.com"
git config --local user.name "Selenium CI Bot"
- name: Undo rust changelog commit
run: git reset HEAD~1
- name: Update everything including early release CDP
if: ${{ github.event.inputs.chrome_channel == 'early-stable' }}
run: ./go all:prepare['Beta']
- name: Update everything including released CDP
if: ${{ github.event.inputs.chrome_channel == 'stable' }}
run: ./go all:prepare
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.SELENIUM_CI_TOKEN }}
author: Selenium CI Bot <selenium-ci@users.noreply.github.com>
delete-branch: true
title: "[build] Prepare for release of Selenium ${{ github.event.inputs.version }}"
body: |
**Warning: Manually update the changelogs before merging**
This PR:
* Updates Rust version for Selenium Manager release
* Updates Pinned browser version to coincide with new CDP release
* Adds support for new CDP version and removes old CDP version
* Selenium Manager references the new Selenium Manager release
* Updates Maven Dependencies
* Adds new authors to authors file
* Updates all versions for all bindings
* Generates *rough* change logs for each bindings (please tidy them up before merging this)
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: C-build
draft: true
- name: "Checkout project"
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
fetch-tags: true
ref: release-${{ github.event.inputs.version }}
- name: Install Ruby
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
with:
ruby-version: '3.1'
- name: "Prep git"
run: |
git config --local user.email "selenium-ci@users.noreply.github.com"
git config --local user.name "Selenium CI Bot"
- name: Undo rust changelog commit
run: git reset HEAD~1
- name: Update everything including early release CDP
if: ${{ github.event.inputs.chrome_channel == 'early-stable' }}
run: ./go all:prepare['Beta']
- name: Update everything including released CDP
if: ${{ github.event.inputs.chrome_channel == 'stable' }}
run: ./go "all:prepare[Stable]"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.SELENIUM_CI_TOKEN }}
author: Selenium CI Bot <selenium-ci@users.noreply.github.com>
delete-branch: true
title: "[build] Prepare for release of Selenium ${{ github.event.inputs.version }}"
body: |
**Warning: Manually update the changelogs before merging**
This PR:
* Updates Rust version for Selenium Manager release
* Updates Pinned browser version to coincide with new CDP release
* Adds support for new CDP version and removes old CDP version
* Selenium Manager references the new Selenium Manager release
* Updates Maven Dependencies
* Adds new authors to authors file
* Updates all versions for all bindings
* Generates *rough* change logs for each bindings (please tidy them up before merging this)
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: C-build
draft: true
Loading

0 comments on commit c23908e

Please sign in to comment.