Skip to content

Commit

Permalink
[ci] Fix pinned browsers fetch different msedgedriver version per OS (#…
Browse files Browse the repository at this point in the history
…14683)

Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 authored Oct 30, 2024
1 parent 69f9e5e commit 8ccf021
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
8 changes: 4 additions & 4 deletions common/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand All @@ -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"])
Expand Down
13 changes: 9 additions & 4 deletions scripts/pinned_browsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8ccf021

Please sign in to comment.