diff --git a/WORKSPACE b/WORKSPACE index f5c97007b7..74ade2e620 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -24,19 +24,18 @@ versions.check( minimum_bazel_version = "4.2.2", ) +# Use the same rules_webtesting version required by rules_closure: +# https://github.com/bazelbuild/rules_closure/blob/c56b953045c883b393d6f0f5dbf9900df71949c1/closure/repositories.bzl#L1099 http_archive( name = "io_bazel_rules_webtesting", - sha256 = "9bb461d5ef08e850025480bab185fd269242d4e533bca75bfb748001ceb343c3", + sha256 = "41d500a97ad9621dcf92fcb0cd77916e517388b196e5c3f0e63c7753e983b2bb", + strip_prefix = "rules_webtesting-4d7ec75d1cbb289f977b41638fc8b630bdf22bee", urls = [ - "http://mirror.tensorflow.org/github.com/bazelbuild/rules_webtesting/releases/download/0.3.3/rules_webtesting.tar.gz", - "https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.3/rules_webtesting.tar.gz", + "http://mirror.tensorflow.org/github.com/bazelbuild/rules_webtesting/archive/4d7ec75d1cbb289f977b41638fc8b630bdf22bee.tar.gz", + "https://github.com/bazelbuild/rules_webtesting/archive/4d7ec75d1cbb289f977b41638fc8b630bdf22bee.tar.gz", ], ) -load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories") - -web_test_repositories(omit_bazel_skylib = True) - # rules_python has to be placed before load("@io_bazel_rules_closure//closure:repositories.bzl") # in the dependencies list, otherwise we get "cannot load '@rules_python//python:py_xxx.bzl': no such file" http_archive( @@ -55,11 +54,13 @@ py_repositories() http_archive( name = "io_bazel_rules_closure", - sha256 = "6a900831c1eb8dbfc9d6879b5820fd614d4ea1db180eb5ff8aedcb75ee747c1f", - strip_prefix = "rules_closure-db4683a2a1836ac8e265804ca5fa31852395185b", + sha256 = "b2ead8bdcf6d2d56b9cb797699a0ea707d33998edb9067825a588d9ccd3805e0", + # Temporarily pin to this commit to unblock go/tbpr/6721: https://github.com/bazelbuild/rules_closure/pull/599 + # TODO: b/327605070 - Unpin this. + strip_prefix = "rules_closure-c56b953045c883b393d6f0f5dbf9900df71949c1", urls = [ - "http://mirror.tensorflow.org/github.com/bazelbuild/rules_closure/archive/db4683a2a1836ac8e265804ca5fa31852395185b.tar.gz", - "https://github.com/bazelbuild/rules_closure/archive/db4683a2a1836ac8e265804ca5fa31852395185b.tar.gz", # 2020-01-15 + "http://mirror.tensorflow.org/github.com/bazelbuild/rules_closure/archive/c56b953045c883b393d6f0f5dbf9900df71949c1.tar.gz", + "https://github.com/bazelbuild/rules_closure/archive/c56b953045c883b393d6f0f5dbf9900df71949c1.tar.gz", # 2024-02-28 ], ) @@ -71,6 +72,10 @@ rules_closure_dependencies( omit_com_google_protobuf_js = True, ) +load("@io_bazel_rules_closure//closure:defs.bzl", "setup_web_test_repositories") + +setup_web_test_repositories(chromium=True) + http_archive( name = "build_bazel_rules_nodejs", sha256 = "c29944ba9b0b430aadcaf3bf2570fece6fc5ebfb76df145c6cdad40d65c20811", @@ -176,9 +181,14 @@ load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") grpc_deps() -load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps") - -grpc_extra_deps() +http_archive( + name = "build_bazel_rules_swift", + sha256 = "32f95dbe6a88eb298aaa790f05065434f32a662c65ec0a6aabdaf6881e4f169f", + urls = [ + "http://mirror.tensorflow.org/github.com/bazelbuild/rules_swift/releases/download/1.5.0/rules_swift.1.5.0.tar.gz", + "https://github.com/bazelbuild/rules_swift/releases/download/1.5.0/rules_swift.1.5.0.tar.gz", + ], +) http_archive( name = "rules_rust", diff --git a/tensorboard/functionaltests/BUILD b/tensorboard/functionaltests/BUILD index f4ad579cb6..721d4e25f8 100644 --- a/tensorboard/functionaltests/BUILD +++ b/tensorboard/functionaltests/BUILD @@ -7,7 +7,7 @@ licenses(["notice"]) py_web_test_suite( name = "core_test", srcs = ["core_test.py"], - browsers = ["//tensorboard/functionaltests/browsers:chromium"], + browsers = ["@io_bazel_rules_webtesting//browsers:chromium-local"], data = [ "//tensorboard", ], diff --git a/tensorboard/functionaltests/browsers/BUILD b/tensorboard/functionaltests/browsers/BUILD deleted file mode 100644 index ee8d4e4ab9..0000000000 --- a/tensorboard/functionaltests/browsers/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -load("@io_bazel_rules_webtesting//web:web.bzl", "browser") - -package(default_visibility = ["//tensorboard:internal"]) - -licenses(["notice"]) - -config_setting( - name = "mac", - values = {"cpu": "darwin"}, - visibility = ["//:__subpackages__"], -) - -config_setting( - name = "linux", - values = {"cpu": "k8"}, - visibility = ["//:__subpackages__"], -) - -browser( - name = "chromium", - environment = select({ - ":linux": None, - ":mac": {"DISABLE_X_DISPLAY": "1"}, - }), - metadata = "chromium.json", - visibility = ["//visibility:public"], - deps = [ - "//third_party/chromium", - "//third_party/chromium:chromedriver", - "@io_bazel_rules_webtesting//go/wsl", - ], -) diff --git a/tensorboard/functionaltests/browsers/chromium.json b/tensorboard/functionaltests/browsers/chromium.json deleted file mode 100644 index 0576a642e4..0000000000 --- a/tensorboard/functionaltests/browsers/chromium.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "environment": "local", - "capabilities": { - "browserName": "chrome", - "goog:chromeOptions": { - "args": ["--headless", "--no-sandbox"], - "binary": "%FILE:CHROMIUM%" - }, - "google:wslConfig": { - "binary": "%FILE:CHROMEDRIVER%", - "port":"%WSLPORT:WSL%", - "args": ["--port=%WSLPORT:WSL%"], - "status": true, - "shutdown": true - } - } -} diff --git a/tensorboard/functionaltests/browsers/disabled.json b/tensorboard/functionaltests/browsers/disabled.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/tensorboard/functionaltests/browsers/disabled.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/third_party/chromium/BUILD b/third_party/chromium/BUILD deleted file mode 100644 index 60beaa021c..0000000000 --- a/third_party/chromium/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -load("@io_bazel_rules_webtesting//web:web.bzl", "web_test_archive") - -package(default_visibility = ["//tensorboard:internal"]) - -licenses(["notice"]) - -config_setting( - name = "mac", - values = {"cpu": "darwin"}, -) - -config_setting( - name = "linux", - values = {"cpu": "k8"}, -) - -web_test_archive( - name = "chromium", - archive = "@org_chromium_chromium//file", - extract = "build", - named_files = select({ - ":linux": { - "CHROMIUM": "chrome-linux/chrome", - }, - ":mac": { - "CHROMIUM": "chrome-mac/Chromium.app/Contents/MacOS/chromium", - }, - }), - visibility = ["//tensorboard/functionaltests/browsers:__pkg__"], -) - -web_test_archive( - name = "chromedriver", - archive = "@org_chromium_chromedriver//file", - extract = "build", - named_files = {"CHROMEDRIVER": "chromedriver"}, - visibility = ["//tensorboard/functionaltests/browsers:__pkg__"], -) diff --git a/third_party/workspace.bzl b/third_party/workspace.bzl index 1b3b125853..523f691989 100644 --- a/third_party/workspace.bzl +++ b/third_party/workspace.bzl @@ -17,10 +17,9 @@ TensorBoard external dependencies that can be loaded in WORKSPACE files. """ load("@bazel_tools//tools/build_defs/repo:java.bzl", "java_import_external") -load("@io_bazel_rules_webtesting//web/internal:platform_http_file.bzl", "platform_http_file") # buildifier: disable=bzl-visibility load("//third_party:fonts.bzl", "tensorboard_fonts_workspace") -load("//third_party:python.bzl", "tensorboard_python_workspace") load("//third_party:js.bzl", "tensorboard_js_workspace") +load("//third_party:python.bzl", "tensorboard_python_workspace") load("//third_party:rust.bzl", "tensorboard_rust_workspace") def tensorboard_workspace(name = ""): @@ -46,46 +45,6 @@ def tensorboard_workspace(name = ""): actual = "@com_github_grpc_grpc//src/compiler:grpc_python_plugin", ) - platform_http_file( - name = "org_chromium_chromium", # pinned to Chromium 84.0.4147.0 - licenses = ["notice"], # BSD 3-clause (maybe more?) - amd64_sha256 = - "49b25bf32b797558eb7957ac7c60e065433bdef278f669291f71edd329505e27", - amd64_urls = [ - "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/768959/chrome-linux.zip", - ], - macos_sha256 = - "f0c7dc5c26061e2f179d1cb9819cb786d2c37cca9f53155e57ac2b6ab60c5cbc", - macos_urls = [ - "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/768938/chrome-mac.zip", - ], - windows_sha256 = - "f441a079046a35afc249a95d29356f33945c0a60b59236b9cf6db532c69dba6f", - windows_urls = [ - "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win_x64/768952/chrome-win.zip", - ], - ) - - platform_http_file( - name = "org_chromium_chromedriver", - licenses = ["reciprocal"], # BSD 3-clause, ICU, MPL 1.1, libpng (BSD/MIT-like), Academic Free License v. 2.0, BSD 2-clause, MIT - amd64_sha256 = - "71eafe087900dbca4bc0b354a1d172df48b31a4a502e21f7c7b156d7e76c95c7", - amd64_urls = [ - "https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip", - ], - macos_sha256 = - "fd32a27148f44796a55f5ce3397015c89ebd9f600d9dda2bcaca54575e2497ae", - macos_urls = [ - "https://chromedriver.storage.googleapis.com/2.41/chromedriver_mac64.zip", - ], - windows_sha256 = - "a8fa028acebef7b931ef9cb093f02865f9f7495e49351f556e919f7be77f072e", - windows_urls = [ - "https://chromedriver.storage.googleapis.com/2.38/chromedriver_win32.zip", - ], - ) - java_import_external( name = "org_apache_commons_lang3", jar_sha256 = "de2e1dcdcf3ef917a8ce858661a06726a9a944f28e33ad7f9e08bea44dc3c230",