Skip to content

Commit d6f16e7

Browse files
authored
Merge branch 'trunk' into py_client_config_new
2 parents 3bc1889 + 94f7247 commit d6f16e7

File tree

1,281 files changed

+58561
-97045
lines changed

Some content is hidden

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

1,281 files changed

+58561
-97045
lines changed

Diff for: .bazelignore

+2
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ dotnet/src/webdriver/obj
2222
java/build/production
2323
java/client/build
2424
java/server/build
25+
javascript/grid-ui/node_modules
26+
javascript/node/selenium-webdriver/node_modules
2527
node_modules

Diff for: .bazelrc

+35-81
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
try-import .bazelrc.local
2-
try-import .bazelrc.windows.local
1+
try-import %workspace%/.bazelrc.local
2+
try-import %workspace%/.bazelrc.windows.local
3+
4+
# Enable bzlmod but without lockfile for a moment.
5+
# Lockfile is a problem to check in at the moment
6+
# because of constant Git conflicts and platform-specific
7+
# pieces.
8+
# https://github.com/bazelbuild/bazel/issues/20369
9+
# https://github.com/bazelbuild/bazel/issues/21491
10+
11+
common --enable_bzlmod --lockfile_mode=off
312

413
# Ensure Windows support is accurate.
514

@@ -25,13 +34,24 @@ build --javacopt="--release 11"
2534
build --experimental_strict_java_deps=strict
2635
build --explicit_java_test_deps
2736

28-
# Ensure builds are unpolluted by the user env
37+
# Allow spaces in runfile paths
38+
build --nobuild_runfile_links
2939

30-
build --incompatible_strict_action_env
40+
# More JS magic
41+
build --experimental_allow_unresolved_symlinks
3142

32-
# Except for the PATH environment variable
43+
# Required for faster TS builds
44+
build --@aspect_rules_ts//ts:skipLibCheck=always
45+
fetch --@aspect_rules_ts//ts:skipLibCheck=always
46+
query --@aspect_rules_ts//ts:skipLibCheck=always
3347

34-
build --action_env=PATH
48+
build --@aspect_rules_ts//ts:default_to_tsc_transpiler
49+
fetch --@aspect_rules_ts//ts:default_to_tsc_transpiler
50+
query --@aspect_rules_ts//ts:default_to_tsc_transpiler
51+
52+
# Ensure builds are unpolluted by the user env
53+
54+
build --incompatible_strict_action_env
3555

3656
# For build stamping
3757

@@ -53,19 +73,20 @@ test --test_env=DISPLAY
5373
test --test_env=FIREFOX_NIGHTLY_BINARY
5474
test --test_env=GITHUB_ACTIONS
5575
test --test_env=MOZ_HEADLESS
56-
test --test_env=PATH # Remove once browser pinning works
5776
test --test_env=SELENIUM_BROWSER
5877
test --test_env=TRAVIS
5978
test --test_env=PYTHON_VERSION
79+
test --test_env=SE_AVOID_STATS=true
6080

6181
# Remove once rules_ruby support proper $LOAD_PATH expansion.
6282

6383
test --test_env=RUBYOPT="-Irb/lib -w"
6484

65-
# JRuby/TruffleRuby: https://github.com/jruby/jruby/issues/5661
85+
# Speed up JRuby startup.
86+
# https://github.com/jruby/jruby/wiki/Improving-startup-time
6687

67-
build --action_env=HOME
68-
test --test_env=HOME
88+
build --action_env=JRUBY_OPTS="--dev"
89+
test --test_env=JRUBY_OPTS="--dev"
6990

7091
# Expose necessary variables for Selenium-Manager.
7192

@@ -76,78 +97,11 @@ test:windows --test_env=PROGRAMFILES(X86)="C:\\Program Files (x86)"
7697
test --test_timeout=1800
7798

7899
test:node_debug --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results
79-
test:ruby_debug --test_output=streamed --test_env=RUBY_DEBUG_FORK_MODE=parent --run_under="@bundle//:bin/rdbg --nonstop --open --command"
80-
81-
# The RBE to use
82-
build:remote --bes_results_url=https://gypsum.cluster.engflow.com/invocation
83-
build:remote --bes_backend=grpcs://gypsum.cluster.engflow.com
84-
build:remote --remote_executor=grpcs://gypsum.cluster.engflow.com
85-
build:remote --remote_cache=grpcs://gypsum.cluster.engflow.com
86-
87-
# The number of cores available
88-
build:remote -j 50
89-
90-
# Build Without The Bytes
91-
build:remote --remote_download_outputs=minimal
92-
93-
build:remote --define=EXECUTOR=remote
94-
build:remote --experimental_inmemory_dotd_files
95-
build:remote --experimental_inmemory_jdeps_files
96-
build:remote --remote_timeout=3600
97-
build:remote --spawn_strategy=remote,local
98-
#build:remote --nolegacy_important_outputs
99-
build:remote --incompatible_strict_action_env=true
100-
101-
build:remote --crosstool_top=//common/remote-build/cc:toolchain
102-
build:remote --extra_execution_platforms=//common/remote-build:platform
103-
build:remote --extra_toolchains=//common/remote-build:cc-toolchain
104-
build:remote --host_platform=//common/remote-build:platform
105-
build:remote --platforms=//common/remote-build:platform
106-
107-
# The Docker images are running Linux
108-
build:remote --cpu=k8
109-
build:remote --host_cpu=k8
110-
111-
build:remote --disk_cache=
112-
113-
build:remote --incompatible_enable_cc_toolchain_resolution
114-
build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
115-
test:remote --test_env=DISPLAY=:99.0
116-
test:remote --test_tag_filters=-skip-remote,-remote
117-
118-
# Env vars we can hard code
119-
build:remote --action_env=HOME=/home/dev
120-
build:remote --action_env=PATH=/bin:/usr/bin:/usr/local/bin
121-
test:remote --test_env=PATH=/bin:/usr/bin:/usr/local/bin
122-
test:remote --test_env=HOME=/home/dev
123-
124-
# Make sure we sniff credentials properly
125-
build:remote --credential_helper=%workspace%/scripts/credential-helper.sh
126-
127-
# Use pinned browsers when running remotely
128-
build:remote --//common:pin_browsers
129-
130-
# The remote build machines are pretty small, and 50 threads may leave them
131-
# thrashing, but our dev machines are a lot larger. Scale the workload so we
132-
# make reasonable usage of everything, everywhere, all at once.
133-
build:remote --local_cpu_resources='HOST_CPUS*10'
134-
build:remote --local_ram_resources='HOST_RAM*4.0'
135-
136-
# A small hint that we're running our tests remotely
137-
test:remote --test_env=REMOTE_BUILD=1
138-
139-
# Wait for up to 5 minutes for a test to pass
140-
test:remote --test_timeout=600
141-
142-
# Extend the remote config for CI
143-
build:remote-ci --config=remote
144-
build:remote-ci --curses=no --color=yes --show_timestamps --show_progress_rate_limit=5
145-
build:remote-ci --bes_upload_mode=wait_for_upload_complete
146-
147-
# Configuration changes suggested by EngFlow
148-
build:remote --grpc_keepalive_time=30s
149-
build:remote --nolegacy_important_outputs
100+
test:ruby_debug --test_output=streamed --test_env=RUBY_DEBUG_FORK_MODE=parent --run_under="@bundle//bin:rdbg --nonstop --open --command"
150101

151102
build:release --config=remote
152103
build:release --stamp
153104
build:release --remote_download_outputs=toplevel
105+
106+
# RBE
107+
import %workspace%/.bazelrc.remote

Diff for: .bazelrc.remote

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# The RBE to use
2+
build:remote --bes_results_url=https://gypsum.cluster.engflow.com/invocation
3+
build:remote --bes_backend=grpcs://gypsum.cluster.engflow.com
4+
build:remote --remote_executor=grpcs://gypsum.cluster.engflow.com
5+
build:remote --remote_cache=grpcs://gypsum.cluster.engflow.com
6+
7+
# The number of cores available
8+
build:remote -j 50
9+
10+
# Build Without The Bytes
11+
build:remote --remote_download_minimal
12+
13+
build:remote --define=EXECUTOR=remote
14+
build:remote --experimental_inmemory_dotd_files
15+
build:remote --experimental_inmemory_jdeps_files
16+
build:remote --remote_timeout=3600
17+
build:remote --spawn_strategy=remote,local
18+
#build:remote --nolegacy_important_outputs
19+
build:remote --incompatible_strict_action_env=true
20+
21+
build:remote --crosstool_top=//common/remote-build/cc:toolchain
22+
build:remote --extra_execution_platforms=//common/remote-build:platform
23+
build:remote --extra_toolchains=//common/remote-build:cc-toolchain
24+
build:remote --host_platform=//common/remote-build:platform
25+
build:remote --platforms=//common/remote-build:platform
26+
build:remote --cxxopt=-std=c++14
27+
28+
# The Docker images are running Linux
29+
build:remote --cpu=k8
30+
build:remote --host_cpu=k8
31+
32+
build:remote --disk_cache=
33+
34+
build:remote --incompatible_enable_cc_toolchain_resolution
35+
build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
36+
test:remote --test_env=DISPLAY=:99.0
37+
test:remote --test_tag_filters=-skip-remote,-remote
38+
39+
# Env vars we can hard code
40+
build:remote --action_env=HOME=/home/dev
41+
build:remote --action_env=PATH=/bin:/usr/bin:/usr/local/bin
42+
test:remote --test_env=PATH=/bin:/usr/bin:/usr/local/bin
43+
test:remote --test_env=HOME=/home/dev
44+
45+
# Make sure we sniff credentials properly
46+
build:remote --credential_helper=gypsum.cluster.engflow.com=%workspace%/scripts/credential-helper.sh
47+
48+
# Use pinned browsers when running remotely
49+
build:remote --//common:pin_browsers
50+
51+
# The remote build machines are pretty small, and 50 threads may leave them
52+
# thrashing, but our dev machines are a lot larger. Scale the workload so we
53+
# make reasonable usage of everything, everywhere, all at once.
54+
build:remote --local_resources=cpu='HOST_CPUS*10'
55+
build:remote --local_resources=memory='HOST_RAM*4.0'
56+
57+
# A small hint that we're running our tests remotely
58+
test:remote --test_env=REMOTE_BUILD=1
59+
60+
# Wait for up to 5 minutes for a test to pass
61+
test:remote --test_timeout=600
62+
63+
# Extend the remote config for CI
64+
build:remote-ci --config=remote
65+
build:remote-ci --curses=no --color=yes --show_timestamps --show_progress_rate_limit=5
66+
build:remote-ci --bes_upload_mode=wait_for_upload_complete
67+
68+
# Configuration changes suggested by EngFlow
69+
build:remote --grpc_keepalive_time=30s
70+
build:remote --nolegacy_important_outputs

Diff for: .bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.3.2
1+
7.1.1

Diff for: .devcontainer/devcontainer.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// https://containers.dev/implementors/json_reference/
2+
3+
{
4+
"name": "selenium-devcontainer",
5+
"build": {
6+
"dockerfile": "../scripts/dev-image/Dockerfile"
7+
},
8+
"runArgs": ["--name", "selenium_devcontainer"]
9+
}

Diff for: .github/workflows/bazel.yml

+56-6
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,31 @@ on:
2626
required: false
2727
type: string
2828
default: ''
29+
caching:
30+
description: Toggle caching of Bazel
31+
required: false
32+
type: boolean
33+
default: true
2934
cache-key:
3035
description: Bazel disk cache key
3136
required: false
3237
type: string
3338
default: ''
39+
dotnet-version:
40+
description: Custom DotNet version to install
41+
required: false
42+
type: string
43+
default: ''
3444
java-version:
3545
description: Custom Java version to install
3646
required: false
3747
type: string
3848
default: ''
49+
node-version:
50+
description: Custom Node version to install
51+
required: false
52+
type: string
53+
default: ''
3954
ruby-version:
4055
description: Custom Ruby version to use
4156
required: false
@@ -46,15 +61,24 @@ on:
4661
required: false
4762
type: string
4863
default: ''
64+
artifact-name:
65+
description: Name of artifact to upload
66+
required: false
67+
type: string
68+
default: 'ignore-artifacts'
4969

5070
jobs:
5171
bazel:
5272
name: ${{ inputs.name }}
53-
runs-on: ${{ inputs.os }}-latest
73+
runs-on: ${{ inputs.os == 'macos' && 'macos-13' || format('{0}-latest', inputs.os) }}
5474
env:
5575
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5676
SEL_M2_USER: ${{ secrets.SEL_M2_USER }}
5777
SEL_M2_PASS: ${{ secrets.SEL_M2_PASS }}
78+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
79+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
80+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
SE_AVOID_STATS: true
5882
steps:
5983
- name: Checkout source tree
6084
uses: actions/checkout@v4
@@ -74,26 +98,41 @@ jobs:
7498
- name: Set Ruby version
7599
if: inputs.ruby-version != ''
76100
run: echo '${{ inputs.ruby-version }}' > rb/.ruby-version
101+
- name: Setup DotNet
102+
if: inputs.dotnet-version != ''
103+
uses: actions/setup-dotnet@v4
104+
with:
105+
dotnet-version: ${{ inputs.dotnet-version }}
77106
- name: Setup Java
78107
if: inputs.java-version != ''
79108
uses: actions/setup-java@v3
80109
with:
81110
java-version: ${{ inputs.java-version }}
82111
distribution: 'temurin'
83-
- name: Setup Bazel
84-
uses: p0deje/[email protected]
112+
- name: Setup Node
113+
if: inputs.node-version != ''
114+
uses: actions/setup-node@v4
115+
with:
116+
node-version: ${{ inputs.node-version }}
117+
- name: Setup Bazel with caching
118+
if: inputs.caching
119+
uses: bazel-contrib/[email protected]
85120
with:
86121
bazelisk-cache: true
87122
bazelrc: common --color=yes
123+
cache-version: 2
88124
disk-cache: ${{ inputs.cache-key }}
89125
external-cache: |
90126
name: ${{ inputs.cache-key }}
91127
manifest:
92128
crates: rust/Cargo.Bazel.lock
93-
npm: package-lock.json
94-
pypi__pip: py/requirements_lock.txt
95-
rules_ruby_dist: rb/ruby_version.bzl
129+
rules_ruby~~ruby~ruby: ${{ inputs.os == 'windows' && 'false' || 'rb/.ruby-version' }}
96130
repository-cache: true
131+
- name: Setup Bazel without caching
132+
if: inputs.caching == false
133+
uses: bazel-contrib/[email protected]
134+
with:
135+
bazelrc: common --color=yes
97136
- name: Setup Fluxbox and Xvfb
98137
if: inputs.os == 'ubuntu' && inputs.browser != ''
99138
run: |
@@ -139,3 +178,14 @@ jobs:
139178
title: "Nightly"
140179
prerelease: true
141180
files: ${{ inputs.nightly-release-files }}
181+
- name: Save changes
182+
if: ${{ always() && inputs.artifact-name != 'ignore-artifacts' }}
183+
run: |
184+
git diff > changes.patch
185+
- name: "Upload changes"
186+
if: ${{ always() && inputs.artifact-name != 'ignore-artifacts' }}
187+
uses: actions/upload-artifact@v4
188+
with:
189+
name: ${{ inputs.artifact-name }}
190+
path: changes.patch
191+
retention-days: 6

0 commit comments

Comments
 (0)