diff --git a/.github/workflows/bump-chrome-version.yml b/.github/workflows/bump-chrome-version.yml
new file mode 100644
index 0000000000000..edb8be150135e
--- /dev/null
+++ b/.github/workflows/bump-chrome-version.yml
@@ -0,0 +1,65 @@
+name: Update Chrome Version used for wasm testing
+
+permissions:
+ contents: write
+ pull-requests: write
+
+on:
+ schedule:
+ - cron: '0 0 * * 0'
+
+ workflow_dispatch:
+
+jobs:
+ update:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Setup Branch
+ run: |
+ git config user.name github-actions[bot]
+ git config user.email github-actions[bot]@users.noreply.github.com
+ git checkout -b update-chrome-version-${{ github.run_id }}
+
+ - name: Run UpdateToLatestVersion
+ run: >-
+ make -C src/mono/wasm build-tasks &&
+ .dotnet/dotnet build eng/testing/bump-chrome-version.proj -p:Configuration=Release &&
+ git add eng/testing/ChromeVersions.props
+
+ - name: Check for changes
+ id: check_changes
+ run: |
+ echo "has_changes=$(git diff-index --quiet HEAD && echo false || echo true)" >> $GITHUB_OUTPUT
+
+ - name: Commit Update
+ run: |
+ echo steps.check_changes.outputs.has_changes=${{steps.check_changes.outputs.has_changes}}
+ if ${{steps.check_changes.outputs.has_changes}} == 'true'; then
+ git commit -m "Automated bump of chrome version"
+ git push --set-upstream origin update-chrome-version-${{ github.run_id }}
+ else
+ echo "No changes detected."
+ fi
+
+ - name: Create PR
+ if: steps.check_changes.outputs.has_changes == 'true'
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const { data: pullRequest } = await github.rest.pulls.create({
+ base: context.ref,
+ head: "update-chrome-version-${{ github.run_id }}",
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ title: '[wasm] Bump chrome version used for testing',
+ body: ''
+ });
+ await github.rest.pulls.requestReviewers({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ pull_number: pullRequest.number,
+ reviewers: ["radical"]
+ });
+ return pullRequest.number;
diff --git a/eng/pipelines/common/evaluate-default-paths.yml b/eng/pipelines/common/evaluate-default-paths.yml
index 5fb74a3741f41..1ae0e9c8cd141 100644
--- a/eng/pipelines/common/evaluate-default-paths.yml
+++ b/eng/pipelines/common/evaluate-default-paths.yml
@@ -6,7 +6,7 @@ parameters:
# do not set them when using the template
_const_paths:
_wasm_specific_only: [
- eng/testing/ProvisioningVersions.props
+ eng/testing/ChromeVersions.props
eng/testing/WasmRunner*
eng/testing/WasiRunner*
eng/testing/scenarios/BuildWasmAppsJobsList.txt
@@ -182,7 +182,7 @@ jobs:
include:
- eng/Version.Details.xml
- eng/Versions.props
- eng/testing/ProvisioningVersions.props
+ eng/testing/ChromeVersions.props
- eng/testing/scenarios/BuildWasmAppsJobsList.txt
- eng/testing/workloads-testing.targets
- src/installer/pkg/sfx/Microsoft.NETCore.App/*
@@ -215,7 +215,7 @@ jobs:
- subset: wasmdebuggertests
combined: true
include:
- - eng/testing/ProvisioningVersions.props
+ - eng/testing/ChromeVersions.props
- src/libraries/System.Runtime.InteropServices/*
- src/libraries/System.Runtime.InteropServices.JavaScript/*
- src/mono/mono/*
diff --git a/eng/testing/ChromeVersions.props b/eng/testing/ChromeVersions.props
new file mode 100644
index 0000000000000..ff43dcee06fb2
--- /dev/null
+++ b/eng/testing/ChromeVersions.props
@@ -0,0 +1,11 @@
+
+
+ 115.0.5790.170
+ 1148114
+ https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1148123
+
+ 115.0.5790.171
+ 1148114
+ https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1148119
+
+
diff --git a/eng/testing/ProvisioningVersions.props b/eng/testing/ProvisioningVersions.props
deleted file mode 100644
index 3105078bdc3b5..0000000000000
--- a/eng/testing/ProvisioningVersions.props
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
- stable
-
- win
- linux
- mac
-
- false
-
- $(ArtifactsBinDir)chrome\
- $(ArtifactsBinDir)chromedriver\
-
-
- 3
-
- $(ArtifactsBinDir)firefox\
- $([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(FirefoxRevision).stamp'))
-
-
-
-
-
-
- false
-
- true
-
-
-
- 115.0.5790.170
- 1148114
- <_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1148123
-
-
- 115.0.5790.171
- 1148114
- <_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1148119
-
-
-
- 108.0.1
- https://ftp.mozilla.org/pub/firefox/releases/$(FirefoxRevision)/linux-x86_64/en-US/firefox-$(FirefoxRevision).tar.bz2
- firefox
-
-
diff --git a/eng/testing/bump-chrome-version.proj b/eng/testing/bump-chrome-version.proj
new file mode 100644
index 0000000000000..35e99c188999f
--- /dev/null
+++ b/eng/testing/bump-chrome-version.proj
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_PropsContent>
+<Project>
+ <PropertyGroup>
+ <linux_ChromeVersion>$(linux_ChromeVersion)</linux_ChromeVersion>
+ <linux_ChromeRevision>$(linux_ChromeRevision)</linux_ChromeRevision>
+ <linux_ChromeBaseSnapshotUrl>$(linux_ChromeBaseSnapshotUrl)</linux_ChromeBaseSnapshotUrl>
+
+ <win_ChromeVersion>$(win_ChromeVersion)</win_ChromeVersion>
+ <win_ChromeRevision>$(win_ChromeRevision)</win_ChromeRevision>
+ <win_ChromeBaseSnapshotUrl>$(win_ChromeBaseSnapshotUrl)</win_ChromeBaseSnapshotUrl>
+ </PropertyGroup>
+</Project>
+
+
+
+
+
+
+
+
+
diff --git a/eng/testing/wasm-provisioning.targets b/eng/testing/wasm-provisioning.targets
index 65c192385e8c9..fd3bbc50c06bb 100644
--- a/eng/testing/wasm-provisioning.targets
+++ b/eng/testing/wasm-provisioning.targets
@@ -1,5 +1,29 @@
-
+
+
+ stable
+
+ win
+ linux
+ unsupported-platform
+
+
+ false
+
+ $(ArtifactsBinDir)firefox\
+ $([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(FirefoxRevision).stamp'))
+ <_BrowserStampDir>$(ArtifactsBinDir)\
+
+
+
+
+
+ 108.0.1
+ https://ftp.mozilla.org/pub/firefox/releases/$(FirefoxRevision)/linux-x86_64/en-US/firefox-$(FirefoxRevision).tar.bz2
+ firefox
+
chrome-linux
@@ -7,6 +31,13 @@
chrome
chromedriver
<_ChromeOSPrefix>Linux_x64
+
+ $(linux_ChromeVersion)
+ $(linux_ChromeRevision)
+ <_ChromeBaseSnapshotUrl>$(linux_ChromeBaseSnapshotUrl)
+
+ $(linux_ChromeBaseSnapshotUrl)/chrome-linux.zip
+ $(linux_ChromeBaseSnapshotUrl)/chromedriver_linux64.zip
@@ -15,18 +46,38 @@
chrome.exe
chromedriver.exe
<_ChromeOSPrefix>Win_x64
+
+ $(win_ChromeVersion)
+ $(win_ChromeRevision)
+ <_ChromeBaseSnapshotUrl>$(win_ChromeBaseSnapshotUrl)
+
+ $(win_ChromeBaseSnapshotUrl)/chrome-win.zip
+ $(win_ChromeBaseSnapshotUrl)/chromedriver_win32.zip
-
- <_BrowserStampDir>$(ArtifactsBinDir)\
+
+ $(ArtifactsBinDir)chrome\
+ $(ArtifactsBinDir)chromedriver\
+ $([MSBuild]::NormalizePath('$(ChromeDir)', '.install-$(ChromeVersion)-$(ChromeRevision).stamp'))
+ $([MSBuild]::NormalizePath('$(ChromeDriverDir)', '.install-$(ChromeVersion)-$(ChromeRevision).stamp'))
+
$([MSBuild]::NormalizePath($(ChromeDir), $(ChromeDirName), $(ChromeBinaryName)))
$([MSBuild]::NormalizePath($(ChromeDriverDir), $(ChromeDriverDirName), $(ChromeDriverBinaryName)))
+
+ 108.0.1
+ https://ftp.mozilla.org/pub/firefox/releases/$(FirefoxRevision)/linux-x86_64/en-US/firefox-$(FirefoxRevision).tar.bz2
+ firefox
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- $(_ChromeBaseSnapshotUrl)/chrome-linux.zip
- $(_ChromeBaseSnapshotUrl)/chromedriver_linux64.zip
-
-
- $(_ChromeBaseSnapshotUrl)/chrome-win.zip
- $(_ChromeBaseSnapshotUrl)/chromedriver_win32.zip
-
-
-
- $([MSBuild]::NormalizePath('$(ChromeDir)', '.install-$(ChromeVersion)-$(ChromeRevision).stamp'))
- $([MSBuild]::NormalizePath('$(ChromeDriverDir)', '.install-$(ChromeVersion)-$(ChromeRevision).stamp'))
-
-
diff --git a/src/tasks/WasmBuildTasks/GetChromeVersions.cs b/src/tasks/WasmBuildTasks/GetChromeVersions.cs
index 2adad0d091994..c01fa41c4a99e 100644
--- a/src/tasks/WasmBuildTasks/GetChromeVersions.cs
+++ b/src/tasks/WasmBuildTasks/GetChromeVersions.cs
@@ -24,10 +24,6 @@ public class GetChromeVersions : MBU.Task
private const string s_depsUrlPrefix = $"https://omahaproxy.appspot.com/deps.json?version=";
private const int s_versionCheckThresholdDays = 1;
- // start at the branch position found in all.json, and try to
- // download chrome, and chromedriver. If not found, then try up to
- // s_numBranchPositionsToTry lower versions
- private const int s_numBranchPositionsToTry = 50;
private static readonly HttpClient s_httpClient = new();
public string Channel { get; set; } = "stable";
@@ -44,6 +40,11 @@ public class GetChromeVersions : MBU.Task
public int MaxMajorVersionsToCheck { get; set; } = 2;
+ // start at the branch position found in all.json, and try to
+ // download chrome, and chromedriver. If not found, then try up to
+ // MaxBranchPositionsToCheck lower versions
+ public int MaxBranchPositionsToCheck { get; set; } = 75;
+
[Output]
public string ChromeVersion { get; set; } = string.Empty;
[Output]
@@ -240,7 +241,7 @@ private async Task GetDownloadFileStreamAsync(string filename, string ur
string baseUrl = $"{s_snapshotBaseUrl}/{OSPrefix}";
int branchPosition = int.Parse(version.branch_base_position);
- for (int i = 0; i < s_numBranchPositionsToTry; i++)
+ for (int i = 0; i < MaxBranchPositionsToCheck; i++)
{
string branchUrl = $"{baseUrl}/{branchPosition}";
string url = $"{branchUrl}/REVISIONS";