From 41d08f9d264d1a6f62cb2460634c6fd9f5251d38 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:36:00 +0100 Subject: [PATCH] Fix "[wasm] Fix "we can't find snapshot urls"" (#99945) * Revert "[wasm] Fix "we can't find snapshot urls" (#99814)" This reverts commit 55273a1c5d4932aac272893078297a0fd641d72a. * Fix. --- src/tasks/WasmBuildTasks/UpdateChromeVersions.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/tasks/WasmBuildTasks/UpdateChromeVersions.cs b/src/tasks/WasmBuildTasks/UpdateChromeVersions.cs index 553a29d4ba963..f82623149628f 100644 --- a/src/tasks/WasmBuildTasks/UpdateChromeVersions.cs +++ b/src/tasks/WasmBuildTasks/UpdateChromeVersions.cs @@ -271,12 +271,12 @@ private async Task GetDownloadFileStreamAsync(string filename, string ur private async Task FindSnapshotUrlFromBasePositionAsync(string osPrefix, ChromeVersionSpec version, bool throwIfNotFound = true) { - string baseUrl = $"{s_snapshotBaseUrl}?prefix={osPrefix}"; + string baseUrlForRevision = $"{s_snapshotBaseUrl}?prefix={osPrefix}"; int branchPosition = int.Parse(version.branch_base_position); for (int i = 0; i < MaxBranchPositionsToCheck; i++) { - string branchUrl = $"{baseUrl}/{branchPosition}"; + string branchUrl = $"{baseUrlForRevision}/{branchPosition}"; string url = $"{branchUrl}/REVISIONS"; Log.LogMessage(MessageImportance.Low, $"Checking if {url} exists .."); @@ -285,14 +285,16 @@ private async Task GetDownloadFileStreamAsync(string filename, string ur .ConfigureAwait(false); if (response.StatusCode == HttpStatusCode.OK) { - Log.LogMessage(MessageImportance.Low, $"Found {url}"); - return branchUrl; + string baseUrlForDownload = $"{s_snapshotBaseUrl}/{osPrefix}"; + string snapshotUrl = $"{baseUrlForDownload}/{branchPosition}"; + Log.LogMessage(MessageImportance.Low, $"Found {url}. Snapshots should be under ${snapshotUrl}"); + return snapshotUrl; } branchPosition += 1; } - string message = $"Could not find a chrome snapshot folder under {baseUrl}, " + + string message = $"Could not find a chrome snapshot folder under {baseUrlForRevision}, " + $"for branch positions {version.branch_base_position} to " + $"{branchPosition}, for version {version.version}. " + "A fixed version+url can be set in eng/testing/ProvisioningVersions.props .";