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 .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ jobs:
run: |
make generate_latest_sbom
make fetch_grid_scaler_resources
make update_browser_versions_matrix
- name: Tag browser images
if: github.event.inputs.skip-build-push-image != 'true'
uses: nick-invision/retry@master
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/release-chrome-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:
browser-versions:
description: 'List browser version to build. E.g: [130, 131]'
required: true
default: '[95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138]'
default: '[95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139]'
push-image:
description: 'Push image after testing successfully'
required: true
Expand Down Expand Up @@ -61,6 +61,7 @@ jobs:
permissions: write-all
strategy:
fail-fast: false
max-parallel: 10
matrix:
browser-version: ${{ fromJSON(github.event.inputs.browser-versions)}}
outputs:
Expand Down Expand Up @@ -106,12 +107,6 @@ jobs:
run: |
echo ${GRID_VERSION}
echo "GRID_VERSION=${GRID_VERSION}" >> "$GITHUB_OUTPUT"
- name: Fetch latest version
run: |
python3 -m pip install -r tests/requirements.txt
python3 tests/build-backward-compatible/fetch_firefox_version.py
python3 tests/build-backward-compatible/fetch_version.py
make update_selenium_version_matrix
- name: Login Docker Hub
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
env:
Expand All @@ -124,6 +119,7 @@ jobs:
max_attempts: 3
retry_wait_seconds: 60
command: |
make update_browser_versions_matrix
./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} ${REUSE_BASE}
cat .env | xargs -I {} echo {} >> $GITHUB_ENV
- name: Build Hub image for testing
Expand Down Expand Up @@ -177,10 +173,7 @@ jobs:
- name: Create CHANGELOG directory
run: mkdir -p ./CHANGELOG/${{ env.GRID_VERSION }}
- name: Fetch latest version
run: |
python3 -m pip install -r tests/requirements.txt
python3 tests/build-backward-compatible/fetch_version.py
make update_selenium_version_matrix
run: make update_browser_versions_matrix
- name: Download results
uses: actions/download-artifact@v5
with:
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/release-edge-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
permissions: write-all
strategy:
fail-fast: false
max-parallel: 10
matrix:
browser-version: ${{ fromJSON(github.event.inputs.browser-versions)}}
outputs:
Expand Down Expand Up @@ -106,12 +107,6 @@ jobs:
run: |
echo ${GRID_VERSION}
echo "GRID_VERSION=${GRID_VERSION}" >> "$GITHUB_OUTPUT"
- name: Fetch latest version
run: |
python3 -m pip install -r tests/requirements.txt
python3 tests/build-backward-compatible/fetch_firefox_version.py
python3 tests/build-backward-compatible/fetch_version.py
make update_selenium_version_matrix
- name: Login Docker Hub
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
env:
Expand All @@ -124,6 +119,7 @@ jobs:
max_attempts: 3
retry_wait_seconds: 60
command: |
make update_browser_versions_matrix
./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} ${REUSE_BASE}
cat .env | xargs -I {} echo {} >> $GITHUB_ENV
- name: Build Hub image for testing
Expand Down Expand Up @@ -177,10 +173,7 @@ jobs:
- name: Create CHANGELOG directory
run: mkdir -p ./CHANGELOG/${{ env.GRID_VERSION }}
- name: Fetch latest version
run: |
python3 -m pip install -r tests/requirements.txt
python3 tests/build-backward-compatible/fetch_version.py
make update_selenium_version_matrix
run: make update_browser_versions_matrix
- name: Download results
uses: actions/download-artifact@v5
with:
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/release-firefox-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:
browser-versions:
description: 'List browser version to build. E.g: [130, 131]'
required: true
default: '[98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140]'
default: '[98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141]'
push-image:
description: 'Push image after testing successfully'
required: true
Expand Down Expand Up @@ -61,6 +61,7 @@ jobs:
permissions: write-all
strategy:
fail-fast: false
max-parallel: 10
matrix:
browser-version: ${{ fromJSON(github.event.inputs.browser-versions)}}
outputs:
Expand Down Expand Up @@ -106,12 +107,6 @@ jobs:
run: |
echo ${GRID_VERSION}
echo "GRID_VERSION=${GRID_VERSION}" >> "$GITHUB_OUTPUT"
- name: Fetch latest version
run: |
python3 -m pip install -r tests/requirements.txt
python3 tests/build-backward-compatible/fetch_firefox_version.py
python3 tests/build-backward-compatible/fetch_version.py
make update_selenium_version_matrix
- name: Login Docker Hub
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
env:
Expand All @@ -124,6 +119,7 @@ jobs:
max_attempts: 3
retry_wait_seconds: 60
command: |
make update_browser_versions_matrix
./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} ${REUSE_BASE}
cat .env | xargs -I {} echo {} >> $GITHUB_ENV
- name: Build Hub image for testing
Expand Down Expand Up @@ -177,11 +173,7 @@ jobs:
- name: Create CHANGELOG directory
run: mkdir -p ./CHANGELOG/${{ env.GRID_VERSION }}
- name: Fetch latest version
run: |
python3 -m pip install -r tests/requirements.txt
python3 tests/build-backward-compatible/fetch_firefox_version.py
python3 tests/build-backward-compatible/fetch_version.py
make update_selenium_version_matrix
run: make update_browser_versions_matrix
- name: Download results
uses: actions/download-artifact@v5
with:
Expand Down
17 changes: 14 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,31 @@ format_shell_scripts:
fi ; \
exit $$EXIT_CODE

install_python_deps:
python3 -m pip install -r tests/requirements.txt --break-system-packages

format_python_scripts: install_python_deps
python3 -m isort tests/ ; \
python3 -m black --line-length=120 --skip-string-normalization tests/

generate_readme_charts:
if [ ! -f $$HOME/go/bin/helm-docs ] ; then \
echo "helm-docs is not installed. Please install it or run 'make setup_dev_env' once." ; \
else \
$$HOME/go/bin/helm-docs --chart-search-root charts/selenium-grid --output-file CONFIGURATION.md --sort-values-order file ; \
fi

update_list_env_vars:
python3 -m pip install -r tests/requirements.txt ; \
update_list_env_vars: install_python_deps
python3 scripts/generate_list_env_vars/extract_env.py

update_selenium_version_matrix:
update_selenium_version_matrix: install_python_deps
python3 tests/build-backward-compatible/add_selenium_version.py $(BASE_VERSION)

update_browser_versions_matrix: update_selenium_version_matrix
python3 tests/build-backward-compatible/fetch_firefox_version.py ; \
python3 tests/build-backward-compatible/fetch_version.py ; \
python3 tests/build-backward-compatible/update_workflow_versions.py

lint_readme_charts: generate_readme_charts
git diff --stat --exit-code ; \
EXIT_CODE=$$? ; \
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,12 @@ In generic, the script takes the following arguments:
- `$3` (optional): browser name. If not provided, it will iterate over all the browsers (`chrome`, `edge`, `firefox`)
- `$4` (optional): Push image to registry. By default, it is `false`. If you want to push the image to the registry, set it to `true` (required Docker login to your namespace done before running the script).

To update the browser versions matrix, you can run the following command:

```bash
make update_browser_versions_matrix
```

To set your namespace for the images, you can set the environment variable `NAME` before running the script. For example:

```bash
Expand Down
10 changes: 10 additions & 0 deletions charts/selenium-grid/multiple-nodes-platform-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ crossBrowsers:
hpa:
platformName: 'Linux'
browserVersion: ''
- nameOverride: '{{ $.Release.Name }}-node-chrome-139'
imageTag: '139.0-20250808'
hpa:
platformName: 'Linux'
browserVersion: '139.0'
- nameOverride: '{{ $.Release.Name }}-node-chrome-138'
imageTag: '138.0-20250808'
hpa:
Expand Down Expand Up @@ -455,6 +460,11 @@ crossBrowsers:
hpa:
platformName: 'Linux'
browserVersion: ''
- nameOverride: '{{ $.Release.Name }}-node-edge-139'
imageTag: '139.0-20250808'
hpa:
platformName: 'Linux'
browserVersion: '139.0'
- nameOverride: '{{ $.Release.Name }}-node-edge-138'
imageTag: '138.0-20250808'
hpa:
Expand Down
9 changes: 6 additions & 3 deletions tests/build-backward-compatible/browser-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
matrix:
browser:
'142':
FIREFOX_VERSION: 142.0.1
FIREFOX_PLATFORMS: linux/amd64,linux/arm64
'141':
EDGE_VERSION: null
CHROME_VERSION: null
FIREFOX_VERSION: 141.0.3
FIREFOX_PLATFORMS: linux/amd64,linux/arm64
'140':
EDGE_VERSION: null
CHROME_VERSION: null
CHROME_VERSION: google-chrome-stable=140.0.7339.80-1
FIREFOX_VERSION: 140.0.4
FIREFOX_PLATFORMS: linux/amd64,linux/arm64
'139':
EDGE_VERSION: microsoft-edge-stable=139.0.3405.86-1
CHROME_VERSION: google-chrome-stable=139.0.7258.127-1
EDGE_VERSION: microsoft-edge-stable=139.0.3405.125-1
CHROME_VERSION: google-chrome-stable=139.0.7258.154-1
FIREFOX_VERSION: 139.0.4
FIREFOX_PLATFORMS: linux/amd64,linux/arm64
'138':
Expand Down
24 changes: 22 additions & 2 deletions tests/build-backward-compatible/fetch_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from collections import OrderedDict

import requests
import yaml

Expand Down Expand Up @@ -32,17 +30,38 @@ def merge_dicts(dict1, dict2):

def update_local_yaml(local_data, source_data):
updated = False
local_versions = local_data['matrix']['browser'].keys()
local_min_version = str(min(int(v) for v in local_versions)) if local_versions else "0"
for version, details in source_data['matrix']['browser'].items():
if version in local_data['matrix']['browser']:
original_details = local_data['matrix']['browser'][version]
for key in details:
if key in original_details and '_PACKAGE_' not in key:
original_details[key] = details[key] if details[key] is not None else ""
updated = True
elif '_PACKAGE_' not in key:
original_details[key] = details[key] if details[key] is not None else ""
updated = True
merge_dicts(original_details, details)
else:
if int(version) > int(local_min_version):
local_data['matrix']['browser'][version] = details
local_data['matrix']['browser'][version]['FIREFOX_PLATFORMS'] = 'linux/amd64,linux/arm64'
updated = True
return updated


def sort_keys(local_data):
# Sort local_data by key in matrix.browser
list_versions = list(local_data['matrix']['browser'].keys())
list_versions.sort(key=lambda x: int(x), reverse=True)
sorted_browser_dict = {}
for version in list_versions:
sorted_browser_dict[version] = local_data['matrix']['browser'][version]
local_data['matrix']['browser'] = sorted_browser_dict
return local_data


def main():
# Fetch source YAML data
chrome_data = fetch_yaml(chrome_url)
Expand All @@ -61,6 +80,7 @@ def main():
# Save updated local YAML data
if updated:
with open(local_file, 'w') as file:
sort_keys(local_data)
yaml.dump(local_data, file, default_flow_style=False, sort_keys=False)
print("Local YAML file updated.")
else:
Expand Down
2 changes: 2 additions & 0 deletions tests/build-backward-compatible/firefox-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
matrix:
browser:
'142':
FIREFOX_VERSION: 142.0.1
'141':
FIREFOX_VERSION: 141.0.3
'140':
Expand Down
Loading
Loading