Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Fix pinned browsers fetch different msedgedriver version per OS #14683

Merged
merged 1 commit into from
Oct 30, 2024
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
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