Skip to content

Commit b85d754

Browse files
committed
Bump webtesting rules version.
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 tensorflow#6721. To be clear, this PR is a prerequisite to pin the rules_closure version in a separate PR, which in turn will unblock tensorflow#6721. An attempt to use the versioned browsers provided by the rules_webtesting dependency was created in tensorflow#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 0c5523f commit b85d754

File tree

3 files changed

+65
-42
lines changed

3 files changed

+65
-42
lines changed

WORKSPACE

Lines changed: 3 additions & 3 deletions
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.3/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

Lines changed: 11 additions & 16 deletions
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

Lines changed: 51 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ 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")
2121
load("//third_party:fonts.bzl", "tensorboard_fonts_workspace")
2222
load("//third_party:python.bzl", "tensorboard_python_workspace")
2323
load("//third_party:js.bzl", "tensorboard_js_workspace")
@@ -46,44 +46,72 @@ def tensorboard_workspace(name = ""):
4646
actual = "@com_github_grpc_grpc//src/compiler:grpc_python_plugin",
4747
)
4848

49-
platform_http_file(
50-
name = "org_chromium_chromium", # pinned to Chromium 84.0.4147.0
49+
# Chromium browser for multiple platforms, pinned to Chromium 84.0.4147.0.
50+
platform_archive(
51+
name = "org_chromium_chromium_linux_x64",
5152
licenses = ["notice"], # BSD 3-clause (maybe more?)
52-
amd64_sha256 =
53-
"49b25bf32b797558eb7957ac7c60e065433bdef278f669291f71edd329505e27",
54-
amd64_urls = [
53+
sha256 = "49b25bf32b797558eb7957ac7c60e065433bdef278f669291f71edd329505e27",
54+
urls = [
5555
"https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/768959/chrome-linux.zip",
5656
],
57-
macos_sha256 =
58-
"f0c7dc5c26061e2f179d1cb9819cb786d2c37cca9f53155e57ac2b6ab60c5cbc",
59-
macos_urls = [
57+
named_files = {
58+
"CHROMIUM": "chrome-linux/chrome",
59+
},
60+
)
61+
62+
platform_archive(
63+
name = "org_chromium_chromium_macos",
64+
licenses = ["notice"], # BSD 3-clause (maybe more?)
65+
sha256 = "f0c7dc5c26061e2f179d1cb9819cb786d2c37cca9f53155e57ac2b6ab60c5cbc",
66+
urls = [
6067
"https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/768938/chrome-mac.zip",
6168
],
62-
windows_sha256 =
63-
"f441a079046a35afc249a95d29356f33945c0a60b59236b9cf6db532c69dba6f",
64-
windows_urls = [
69+
named_files = {
70+
"CHROMIUM": "chrome-mac/Chromium.app/Contents/MacOS/chromium",
71+
},
72+
)
73+
74+
platform_archive(
75+
name = "org_chromium_chromium_windows",
76+
licenses = ["notice"], # BSD 3-clause (maybe more?)
77+
sha256 = "f441a079046a35afc249a95d29356f33945c0a60b59236b9cf6db532c69dba6f",
78+
urls = [
6579
"https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win_x64/768952/chrome-win.zip",
6680
],
81+
named_files = {
82+
"CHROMIUM": "chrome-win/chrome.exe",
83+
},
6784
)
6885

69-
platform_http_file(
70-
name = "org_chromium_chromedriver",
86+
# Chromium webdriver for multiple platforms.
87+
platform_archive(
88+
name = "org_chromium_chromedriver_linux_x64",
7189
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 = [
90+
sha256 = "71eafe087900dbca4bc0b354a1d172df48b31a4a502e21f7c7b156d7e76c95c7",
91+
urls = [
7592
"https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip",
7693
],
77-
macos_sha256 =
78-
"fd32a27148f44796a55f5ce3397015c89ebd9f600d9dda2bcaca54575e2497ae",
79-
macos_urls = [
94+
named_files = {"CHROMEDRIVER": "chromedriver"},
95+
)
96+
97+
platform_archive(
98+
name = "org_chromium_chromedriver_macos",
99+
licenses = ["reciprocal"], # BSD 3-clause, ICU, MPL 1.1, libpng (BSD/MIT-like), Academic Free License v. 2.0, BSD 2-clause, MIT
100+
sha256 = "fd32a27148f44796a55f5ce3397015c89ebd9f600d9dda2bcaca54575e2497ae",
101+
urls = [
80102
"https://chromedriver.storage.googleapis.com/2.41/chromedriver_mac64.zip",
81103
],
82-
windows_sha256 =
83-
"a8fa028acebef7b931ef9cb093f02865f9f7495e49351f556e919f7be77f072e",
84-
windows_urls = [
104+
named_files = {"CHROMEDRIVER": "chromedriver"},
105+
)
106+
107+
platform_archive(
108+
name = "org_chromium_chromedriver_windows",
109+
licenses = ["reciprocal"], # BSD 3-clause, ICU, MPL 1.1, libpng (BSD/MIT-like), Academic Free License v. 2.0, BSD 2-clause, MIT
110+
sha256 = "a8fa028acebef7b931ef9cb093f02865f9f7495e49351f556e919f7be77f072e",
111+
urls = [
85112
"https://chromedriver.storage.googleapis.com/2.38/chromedriver_win32.zip",
86113
],
114+
named_files = {"CHROMEDRIVER": "chromedriver"},
87115
)
88116

89117
java_import_external(

0 commit comments

Comments
 (0)