Skip to content

Commit 1ddbc7b

Browse files
authored
Bump webtesting rules version. (#6775)
We haven't updated this dependency on the bazel webtesting rules for a while, and it looks like we need to do it to be able to also update our reference to the rules_closure target, to unblock #6721. To be clear, this PR is a prerequisite to pin the rules_closure version in a separate PR, which in turn will unblock #6721. (Or at least that's the expectation. It is yet to be confirmed that the rules_closure version we want to pin is compatible with this one). An attempt to use the versioned browsers provided by the rules_webtesting dependency was created in #6772, but some tests were failing. It seems that some components or tests were written in a way that depends on the specific browser (?), so to be able to update this dependency, this continues to use the same browser version, only updating the rules we use to define our testing browser, to be compatible with a newer version of rules_webtesting.
1 parent 860a421 commit 1ddbc7b

File tree

3 files changed

+70
-42
lines changed

3 files changed

+70
-42
lines changed

WORKSPACE

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ versions.check(
2626

2727
http_archive(
2828
name = "io_bazel_rules_webtesting",
29-
sha256 = "9bb461d5ef08e850025480bab185fd269242d4e533bca75bfb748001ceb343c3",
29+
sha256 = "e9abb7658b6a129740c0b3ef6f5a2370864e102a5ba5ffca2cea565829ed825a",
3030
urls = [
31-
"http://mirror.tensorflow.org/github.com/bazelbuild/rules_webtesting/releases/download/0.3.3/rules_webtesting.tar.gz",
32-
"https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.3/rules_webtesting.tar.gz",
31+
"http://mirror.tensorflow.org/github.com/bazelbuild/rules_webtesting/releases/download/0.3.5/rules_webtesting.tar.gz",
32+
"https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.5/rules_webtesting.tar.gz",
3333
],
3434
)
3535

third_party/chromium/BUILD

+11-16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
load("@io_bazel_rules_webtesting//web:web.bzl", "web_test_archive")
2-
31
package(default_visibility = ["//tensorboard:internal"])
42

53
licenses(["notice"])
@@ -14,25 +12,22 @@ config_setting(
1412
values = {"cpu": "k8"},
1513
)
1614

17-
web_test_archive(
15+
alias(
1816
name = "chromium",
19-
archive = "@org_chromium_chromium//file",
20-
extract = "build",
21-
named_files = select({
22-
":linux": {
23-
"CHROMIUM": "chrome-linux/chrome",
24-
},
25-
":mac": {
26-
"CHROMIUM": "chrome-mac/Chromium.app/Contents/MacOS/chromium",
27-
},
17+
testonly = True,
18+
actual = select({
19+
":linux": "@org_chromium_chromium_linux_x64//:metadata",
20+
":mac": "@org_chromium_chromium_macos//:metadata",
2821
}),
2922
visibility = ["//tensorboard/functionaltests/browsers:__pkg__"],
3023
)
3124

32-
web_test_archive(
25+
alias(
3326
name = "chromedriver",
34-
archive = "@org_chromium_chromedriver//file",
35-
extract = "build",
36-
named_files = {"CHROMEDRIVER": "chromedriver"},
27+
testonly = True,
28+
actual = select({
29+
":linux": "@org_chromium_chromedriver_linux_x64//:metadata",
30+
":mac": "@org_chromium_chromedriver_macos//:metadata",
31+
}),
3732
visibility = ["//tensorboard/functionaltests/browsers:__pkg__"],
3833
)

third_party/workspace.bzl

+56-23
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ TensorBoard external dependencies that can be loaded in WORKSPACE files.
1717
"""
1818

1919
load("@bazel_tools//tools/build_defs/repo:java.bzl", "java_import_external")
20-
load("@io_bazel_rules_webtesting//web/internal:platform_http_file.bzl", "platform_http_file") # buildifier: disable=bzl-visibility
20+
load("@io_bazel_rules_webtesting//web:web.bzl", "platform_archive")
21+
load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.3.bzl", "browser_repositories")
2122
load("//third_party:fonts.bzl", "tensorboard_fonts_workspace")
2223
load("//third_party:python.bzl", "tensorboard_python_workspace")
2324
load("//third_party:js.bzl", "tensorboard_js_workspace")
@@ -46,44 +47,76 @@ def tensorboard_workspace(name = ""):
4647
actual = "@com_github_grpc_grpc//src/compiler:grpc_python_plugin",
4748
)
4849

49-
platform_http_file(
50-
name = "org_chromium_chromium", # pinned to Chromium 84.0.4147.0
50+
# We use our own browser definition based on the archives defined below, but
51+
# this seems to be required by the rules_webtesting dependency.
52+
browser_repositories(chromium = True)
53+
54+
# Chromium browser for multiple platforms, pinned to Chromium 84.0.4147.0.
55+
platform_archive(
56+
name = "org_chromium_chromium_linux_x64",
5157
licenses = ["notice"], # BSD 3-clause (maybe more?)
52-
amd64_sha256 =
53-
"49b25bf32b797558eb7957ac7c60e065433bdef278f669291f71edd329505e27",
54-
amd64_urls = [
58+
sha256 = "49b25bf32b797558eb7957ac7c60e065433bdef278f669291f71edd329505e27",
59+
urls = [
5560
"https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/768959/chrome-linux.zip",
5661
],
57-
macos_sha256 =
58-
"f0c7dc5c26061e2f179d1cb9819cb786d2c37cca9f53155e57ac2b6ab60c5cbc",
59-
macos_urls = [
62+
named_files = {
63+
"CHROMIUM": "chrome-linux/chrome",
64+
},
65+
)
66+
67+
platform_archive(
68+
name = "org_chromium_chromium_macos",
69+
licenses = ["notice"], # BSD 3-clause (maybe more?)
70+
sha256 = "f0c7dc5c26061e2f179d1cb9819cb786d2c37cca9f53155e57ac2b6ab60c5cbc",
71+
urls = [
6072
"https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/768938/chrome-mac.zip",
6173
],
62-
windows_sha256 =
63-
"f441a079046a35afc249a95d29356f33945c0a60b59236b9cf6db532c69dba6f",
64-
windows_urls = [
74+
named_files = {
75+
"CHROMIUM": "chrome-mac/Chromium.app/Contents/MacOS/chromium",
76+
},
77+
)
78+
79+
platform_archive(
80+
name = "org_chromium_chromium_windows",
81+
licenses = ["notice"], # BSD 3-clause (maybe more?)
82+
sha256 = "f441a079046a35afc249a95d29356f33945c0a60b59236b9cf6db532c69dba6f",
83+
urls = [
6584
"https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win_x64/768952/chrome-win.zip",
6685
],
86+
named_files = {
87+
"CHROMIUM": "chrome-win/chrome.exe",
88+
},
6789
)
6890

69-
platform_http_file(
70-
name = "org_chromium_chromedriver",
91+
# Chromium webdriver for multiple platforms.
92+
platform_archive(
93+
name = "org_chromium_chromedriver_linux_x64",
7194
licenses = ["reciprocal"], # BSD 3-clause, ICU, MPL 1.1, libpng (BSD/MIT-like), Academic Free License v. 2.0, BSD 2-clause, MIT
72-
amd64_sha256 =
73-
"71eafe087900dbca4bc0b354a1d172df48b31a4a502e21f7c7b156d7e76c95c7",
74-
amd64_urls = [
95+
sha256 = "71eafe087900dbca4bc0b354a1d172df48b31a4a502e21f7c7b156d7e76c95c7",
96+
urls = [
7597
"https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip",
7698
],
77-
macos_sha256 =
78-
"fd32a27148f44796a55f5ce3397015c89ebd9f600d9dda2bcaca54575e2497ae",
79-
macos_urls = [
99+
named_files = {"CHROMEDRIVER": "chromedriver"},
100+
)
101+
102+
platform_archive(
103+
name = "org_chromium_chromedriver_macos",
104+
licenses = ["reciprocal"], # BSD 3-clause, ICU, MPL 1.1, libpng (BSD/MIT-like), Academic Free License v. 2.0, BSD 2-clause, MIT
105+
sha256 = "fd32a27148f44796a55f5ce3397015c89ebd9f600d9dda2bcaca54575e2497ae",
106+
urls = [
80107
"https://chromedriver.storage.googleapis.com/2.41/chromedriver_mac64.zip",
81108
],
82-
windows_sha256 =
83-
"a8fa028acebef7b931ef9cb093f02865f9f7495e49351f556e919f7be77f072e",
84-
windows_urls = [
109+
named_files = {"CHROMEDRIVER": "chromedriver"},
110+
)
111+
112+
platform_archive(
113+
name = "org_chromium_chromedriver_windows",
114+
licenses = ["reciprocal"], # BSD 3-clause, ICU, MPL 1.1, libpng (BSD/MIT-like), Academic Free License v. 2.0, BSD 2-clause, MIT
115+
sha256 = "a8fa028acebef7b931ef9cb093f02865f9f7495e49351f556e919f7be77f072e",
116+
urls = [
85117
"https://chromedriver.storage.googleapis.com/2.38/chromedriver_win32.zip",
86118
],
119+
named_files = {"CHROMEDRIVER": "chromedriver"},
87120
)
88121

89122
java_import_external(

0 commit comments

Comments
 (0)