From 8ccf0219d77a3144923d79e76e2b8fddd85b3e8f Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Wed, 30 Oct 2024 09:12:13 +0000 Subject: [PATCH] [ci] Fix pinned browsers fetch different msedgedriver version per OS (#14683) Signed-off-by: Viet Nguyen Duc --- common/repositories.bzl | 8 ++++---- scripts/pinned_browsers.py | 13 +++++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/common/repositories.bzl b/common/repositories.bzl index 5003c5dd480ca..7a2db8a0d440f 100644 --- a/common/repositories.bzl +++ b/common/repositories.bzl @@ -165,8 +165,8 @@ js_library( http_archive( name = "linux_edgedriver", - url = "https://msedgedriver.azureedge.net/130.0.2849.56/edgedriver_linux64.zip", - sha256 = "c5aa82d87750a6f49b741790a432194ff91d0a232c54eb5507a526f45146f440", + url = "https://msedgedriver.azureedge.net/130.0.2849.46/edgedriver_linux64.zip", + sha256 = "6a62b28e9373776ae7d3f6611f5dd126c454d73264c2bb826659d3283da57f27", build_file_content = """ load("@aspect_rules_js//js:defs.bzl", "js_library") package(default_visibility = ["//visibility:public"]) @@ -182,8 +182,8 @@ js_library( http_archive( name = "mac_edgedriver", - url = "https://msedgedriver.azureedge.net/130.0.2849.56/edgedriver_mac64.zip", - sha256 = "97141db0a53b22356094ff4d7a806a19ab816499366539e633a32fc4af8da2a3", + url = "https://msedgedriver.azureedge.net/130.0.2849.61/edgedriver_mac64.zip", + sha256 = "82e761138b112bd57950f6b873d601cd4b1e9c8403663c0ffaad8e5b167efc17", build_file_content = """ load("@aspect_rules_js//js:defs.bzl", "js_library") package(default_visibility = ["//visibility:public"]) diff --git a/scripts/pinned_browsers.py b/scripts/pinned_browsers.py index 70be06421e5f9..b41b169577f46 100755 --- a/scripts/pinned_browsers.py +++ b/scripts/pinned_browsers.py @@ -261,12 +261,15 @@ def edge(): def edgedriver(): - r = http.request("GET", "https://msedgedriver.azureedge.net/LATEST_STABLE") - v = r.data.decode("utf-16").strip() + r_stable = http.request("GET", "https://msedgedriver.azureedge.net/LATEST_STABLE") + stable_version = r_stable.data.decode("utf-16").strip() + major_version = stable_version.split('.')[0] + r = http.request("GET", f"https://msedgedriver.azureedge.net/LATEST_RELEASE_{major_version}_LINUX") + linux_version = r.data.decode("utf-16").strip() content = "" - linux = "https://msedgedriver.azureedge.net/%s/edgedriver_linux64.zip" % v + linux = "https://msedgedriver.azureedge.net/%s/edgedriver_linux64.zip" % linux_version sha = calculate_hash(linux) content = ( content @@ -291,7 +294,9 @@ def edgedriver(): % (linux, sha) ) - mac = "https://msedgedriver.azureedge.net/%s/edgedriver_mac64.zip" % v + r = http.request("GET", f"https://msedgedriver.azureedge.net/LATEST_RELEASE_{major_version}_MACOS") + macos_version = r.data.decode("utf-16").strip() + mac = "https://msedgedriver.azureedge.net/%s/edgedriver_mac64.zip" % macos_version sha = calculate_hash(mac) content = ( content