Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelrc.remote
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ build:rbe --nolegacy_important_outputs
build:remote-cache --remote_cache=grpcs://gypsum.cluster.engflow.com
build:remote-cache --remote_upload_local_results=false
build:remote-cache --experimental_remote_cache_chunking
build:remote-cache --remote_cache_compression
build:remote-cache --grpc_keepalive_time=30s
build:remote-cache --bes_backend=grpcs://gypsum.cluster.engflow.com
build:remote-cache --bes_results_url=https://gypsum.cluster.engflow.com/invocation
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ on:
type: boolean
default: false
remote-cache:
description: Read the EngFlow remote cache (the nightly also writes it)
description: Read the EngFlow remote cache (trunk pushes also write it; the nightly does not use it)
required: false
type: boolean
default: false
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
bazelisk-cache: true
bazelrc: |
common --color=yes
${{ inputs.remote-cache && github.repository_owner == 'SeleniumHQ' && (github.event_name == 'schedule' && 'build --config=remote-cache-write --noremote_accept_cached' || 'build --config=remote-cache') || '' }}
${{ inputs.remote-cache && github.repository_owner == 'SeleniumHQ' && github.event_name != 'schedule' && (github.event_name == 'push' && 'build --config=remote-cache-write' || 'build --config=remote-cache') || '' }}
# Workaround for long path issues: https://github.com/bazelbuild/bazel/pull/22532
output-base: ${{ inputs.os == 'windows' && 'D://b' || '' }}
disk-cache: false
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
# The following two steps can be removed after collecting data evaluating effectiveness of remote caching
- name: Summarize remote cache use
id: remote-cache-summary
if: always() && inputs.remote-cache && github.repository_owner == 'SeleniumHQ'
if: always() && inputs.remote-cache && github.repository_owner == 'SeleniumHQ' && github.event_name != 'schedule'
continue-on-error: true
shell: bash
env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:

permissions:
contents: read
packages: read

jobs:
lint:
Expand All @@ -44,6 +45,7 @@ jobs:
os: windows
needs-display: true
rerun-with-debug: true
remote-cache: true
run: |
bazel test --local_resources=browser=1 ${{ inputs.compile-manager && '--manager=host' || '' }} //dotnet/test/webdriver:ElementFindingTests-firefox //dotnet/test/webdriver:ElementFindingTests-chrome

Expand All @@ -55,5 +57,6 @@ jobs:
os: windows
needs-display: true
rerun-with-debug: true
remote-cache: true
run: |
bazel test --local_resources=browser=1 ${{ inputs.compile-manager && '--manager=host' || '' }} //dotnet/test/remote --flaky_test_attempts=3
5 changes: 1 addition & 4 deletions .github/workflows/ci-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ jobs:
matrix:
os: [windows, macos]
tag_filters: ["unit,os-sensitive,se-manager,skip-rbe"]
# macOS runners are scarce, so only use for PRs and nightly runs
exclude:
- os: ${{ github.event_name == 'push' && 'macos' || '' }}
include:
# Edge has no linux-arm64 build
- os: ubuntu-24.04-arm
Expand All @@ -48,5 +45,5 @@ jobs:
./scripts/github-actions/bazel-test-if-targets.sh
--config=gh-browser
${{ inputs.compile-manager && '--manager=host' || '' }}
--test_tag_filters=${{ matrix.tag_filters }}${{ matrix.os == 'macos' && github.event_name == 'pull_request' && ',-edge' || '' }}
--test_tag_filters=${{ matrix.tag_filters }}${{ matrix.os == 'macos' && (github.event_name == 'pull_request' || github.event_name == 'push') && ',-edge' || '' }}
--target_pattern_file=bazel-targets-java.txt
7 changes: 3 additions & 4 deletions .github/workflows/ci-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:

permissions:
contents: read
packages: read

# RBE runs the Linux x86_64 tests; these jobs cover macOS and Windows.
jobs:
Expand Down Expand Up @@ -64,21 +65,19 @@ jobs:
matrix:
os: [macos, windows]
tag_filters: ['unit,os-sensitive,se-manager']
# macOS runners are scarce, so only use for PRs and nightly runs
exclude:
- os: ${{ github.event_name == 'push' && 'macos' || '' }}
with:
name: ${{ matrix.os }}
needs-display: true
os: ${{ matrix.os }}
rerun-with-debug: true
remote-cache: true
download-artifact-name: targets
run: >
[ -s bazel-targets-js.txt ] || echo //javascript/selenium-webdriver/... > bazel-targets-js.txt;
./scripts/github-actions/bazel-test-if-targets.sh
--config=gh-browser
${{ inputs.compile-manager && '--manager=host' || '' }}
--test_tag_filters=${{ matrix.tag_filters }}${{ matrix.os == 'macos' && github.event_name == 'pull_request' && ',-edge' || '' }}
--test_tag_filters=${{ matrix.tag_filters }}${{ matrix.os == 'macos' && (github.event_name == 'pull_request' || github.event_name == 'push') && ',-edge' || '' }}
--target_pattern_file=bazel-targets-js.txt

os-tests-full:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:

permissions:
contents: read
packages: read

# Two tiers, mutually exclusive by content. `smoke` runs on every event, including
# schedule, so the schedule-only flaky parser sees it. The full jobs run on schedule
Expand Down Expand Up @@ -83,21 +84,19 @@ jobs:
matrix:
os: [windows, macos]
tag_filters: ["unit,os-sensitive,se-manager,skip-rbe"]
# macOS runners are scarce, so only use for PRs and nightly runs
exclude:
- os: ${{ github.event_name == 'push' && 'macos' || '' }}
with:
name: ${{ matrix.os }}
needs-display: true
os: ${{ matrix.os }}
rerun-with-debug: true
remote-cache: true
download-artifact-name: targets
run: >
[ -s bazel-targets-py.txt ] || echo //py/... > bazel-targets-py.txt;
./scripts/github-actions/bazel-test-if-targets.sh
--config=gh-browser
${{ inputs.compile-manager && '--manager=host' || '' }}
--test_tag_filters=${{ matrix.tag_filters }}${{ matrix.os == 'macos' && github.event_name == 'pull_request' && ',-edge' || '' }}
--test_tag_filters=${{ matrix.tag_filters }}${{ matrix.os == 'macos' && (github.event_name == 'pull_request' || github.event_name == 'push') && ',-edge' || '' }}
--target_pattern_file=bazel-targets-py.txt

browser-tests:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:

permissions:
contents: read
packages: read

jobs:
build:
Expand Down Expand Up @@ -80,9 +81,6 @@ jobs:
matrix:
os: [windows, macos]
tag_filters: ["unit,os-sensitive,se-manager,skip-rbe"]
# macOS runners are scarce, so only use for PRs and nightly runs
exclude:
- os: ${{ github.event_name == 'push' && 'macos' || '' }}
include:
# Edge has no linux-arm64 build
- os: ubuntu-24.04-arm
Expand All @@ -92,14 +90,15 @@ jobs:
needs-display: true
os: ${{ matrix.os }}
rerun-with-debug: true
remote-cache: true
download-artifact-name: targets
run: >
[ -s bazel-targets-rb.txt ] || echo //rb/... > bazel-targets-rb.txt;
./scripts/github-actions/bazel-test-if-targets.sh
--config=gh-browser
${{ inputs.compile-manager && contains(matrix.tag_filters, 'se-manager') && '--manager=host' || '' }}
--test_env=SKIP_PENDING=true
--test_tag_filters=${{ matrix.tag_filters }}${{ matrix.os == 'macos' && github.event_name == 'pull_request' && ',-edge' || '' }}
--test_tag_filters=${{ matrix.tag_filters }}${{ matrix.os == 'macos' && (github.event_name == 'pull_request' || github.event_name == 'push') && ',-edge' || '' }}
--target_pattern_file=bazel-targets-rb.txt

os-tests-full:
Expand Down
13 changes: 10 additions & 3 deletions scripts/github-actions/remote-cache-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ awk "$strip"'

[ -f build/bazel-console.log ] || exit 0

IFS=$'\t' read -r invocation breakdown hits executed elapsed tests cached < <(awk "$strip"'
IFS=$'\t' read -r invocation breakdown hits executed elapsed tests cached binding < <(awk "$strip"'
/Streaming build results to: / && !url { sub(/.*Streaming build results to: /, ""); url = $0 }
/^INFO: [0-9]+ process(es)?: / {
breakdown = $0; sub(/^INFO: /, "", breakdown); sub(/\.$/, "", breakdown)
Expand All @@ -37,17 +37,24 @@ IFS=$'\t' read -r invocation breakdown hits executed elapsed tests cached < <(aw
}
}
/^INFO: Elapsed time: / { elapsed = $4; sub(/s,?$/, "", elapsed) }
$1 ~ /^\/\// && / PASSED in / { tests++; if ($2 == "(cached)") cached++ }
END { printf "%s\t%s\t%d\t%d\t%s\t%d\t%d\n", (url ? url : "-"), (breakdown ? breakdown : "-"), hits, executed, (elapsed ? elapsed : 0), tests, cached }
$1 ~ /^\/\// && / PASSED in / {
tests++; if ($2 == "(cached)") cached++
b = $1; sub(/^\/\//, "", b); sub(/[\/:].*/, "", b)
if (++count[b] > top) { top = count[b]; binding = b }
}
END { printf "%s\t%s\t%d\t%d\t%s\t%d\t%d\t%s\n", (url ? url : "-"), (breakdown ? breakdown : "-"), hits, executed, (elapsed ? elapsed : 0), tests, cached, (binding ? binding : "-") }
' build/bazel-console.log)

[ "$tests" -gt 0 ] || exit 0
Comment thread
qodo-code-review[bot] marked this conversation as resolved.
Resolved

mkdir -p build/remote-cache
jq -cn \
--arg recorded_at "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--arg run_id "${GITHUB_RUN_ID:-}" \
--arg run_attempt "${GITHUB_RUN_ATTEMPT:-}" \
--arg event "${GITHUB_EVENT_NAME:-}" \
--arg job "${JOB_NAME:-}" \
--arg binding "$binding" \
--arg os "${RUNNER_OS:-}-${RUNNER_ARCH:-}" \
--arg pr "${PR_NUMBER:-}" \
--arg sha "${GITHUB_SHA:-}" \
Expand Down
Loading