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

Pin rules_closure to commit c56b953 #6770

Closed
wants to merge 10 commits into from
38 changes: 24 additions & 14 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all of the issues we encountered with platform_http_file and web_test_archive rules being removed are due to this change.

But I don't understand why we're changing this reference... I thought we only had to pin the one below, related to "closure" rules.

And I don't understand what version/snapshot we are referencing here. (Maybe we should add a comment?)

I suppose it's fine to update it, and we'll need to make these changes whenever we do, anyway... But I think we could make these changes independently. Or is there a reason to make them together?

"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(
Expand All @@ -55,11 +54,13 @@ py_repositories()

http_archive(
name = "io_bazel_rules_closure",
sha256 = "6a900831c1eb8dbfc9d6879b5820fd614d4ea1db180eb5ff8aedcb75ee747c1f",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Yating!

One question... how do we get these values? Should we just comment them out? Or is it easy to return to this if we need to?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just ran the shasum -a 256 against the tar.gz file, I think we always update the commit hash when we change version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, but how about the urls? Where/how did you find this new value to reference? Is there a guide for how to update these references?

Is it just that these particular versions are the latest ones available at http://mirror.tensorflow.org?

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
],
)

Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tensorboard/functionaltests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand Down
32 changes: 0 additions & 32 deletions tensorboard/functionaltests/browsers/BUILD

This file was deleted.

17 changes: 0 additions & 17 deletions tensorboard/functionaltests/browsers/chromium.json

This file was deleted.

1 change: 0 additions & 1 deletion tensorboard/functionaltests/browsers/disabled.json

This file was deleted.

38 changes: 0 additions & 38 deletions third_party/chromium/BUILD

This file was deleted.

43 changes: 1 addition & 42 deletions third_party/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""):
Expand All @@ -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",
Expand Down
Loading