diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa6592b4602..81ed63731b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,8 +27,8 @@ on: env: # Keep this Bazel version in sync with the `versions.check` directive # in our WORKSPACE file. - BAZEL_VERSION: '3.7.0' - BAZEL_SHA256SUM: 'b7583eec83cc38302997098a40b8c870c37e0ab971a83cb3364c754a178b74ec' + BAZEL_VERSION: '4.0.0' + BAZEL_SHA256SUM: '7bee349a626281fc8b8d04a7a0b0358492712377400ab12533aeb39c2eb2b901' BUILDTOOLS_VERSION: '3.0.0' BUILDIFIER_SHA256SUM: 'e92a6793c7134c5431c58fbc34700664f101e5c9b1c1fcd93b97978e8b7f88db' BUILDOZER_SHA256SUM: '3d58a0b6972e4535718cdd6c12778170ea7382de7c75bc3728f5719437ffb84d' @@ -121,11 +121,11 @@ jobs: matrix: mode: ['native'] platform: ['ubuntu-18.04', 'macos-10.15'] - rust_version: ['1.52.0'] + rust_version: ['1.58.1'] include: - mode: 'universal' platform: 'ubuntu-18.04' - rust_version: '1.52.0' + rust_version: '1.58.1' steps: - uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e - uses: actions/setup-python@152ba7c4dd6521b8e9c93f72d362ce03bf6c4f20 @@ -244,7 +244,7 @@ jobs: runs-on: ubuntu-18.04 strategy: matrix: - rust_version: ['1.52.0'] + rust_version: ['1.58.1'] cargo_raze_version: ['0.13.0'] steps: - uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e diff --git a/WORKSPACE b/WORKSPACE index 72ac2d7f1d2..fc93603bf78 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -2,6 +2,22 @@ workspace(name = "org_tensorflow_tensorboard") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +http_archive( + name = "bazel_skylib", + sha256 = "07b4117379dde7ab382345c3b0f5edfc6b7cff6c93756eac63da121e0bbcc5de", + strip_prefix = "bazel-skylib-1.1.1", + urls = [ + "http://mirror.tensorflow.org/github.com/bazelbuild/bazel-skylib/archive/1.1.1.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", # 2021-09-27 + ], +) + +load("@bazel_skylib//lib:versions.bzl", "versions") + +# Keep this version in sync with the BAZEL environment variable defined +# in our .github/workflows/ci.yml config. +versions.check(minimum_bazel_version = "4.0.0") + http_archive( name = "io_bazel_rules_webtesting", sha256 = "9bb461d5ef08e850025480bab185fd269242d4e533bca75bfb748001ceb343c3", @@ -73,35 +89,6 @@ http_archive( ], ) -http_archive( - name = "org_tensorflow", - patches = [ - # Patch TF's python_configure.bzl to ensure it reconfigures its python - # toolchain when environment variables like `PATH` and `PYTHONPATH` - # change, to avoid the stale genrule py_binary issue described in: - # https://github.com/tensorflow/tensorboard/issues/4862 - "//third_party:tensorflow.patch", - ], - # NOTE: when updating this, MAKE SURE to also update the protobuf_js runtime version - # in third_party/workspace.bzl to >= the protobuf/protoc version provided by TF. - sha256 = "2595a5c401521f20a2734c4e5d54120996f8391f00bb62a57267d930bce95350", - strip_prefix = "tensorflow-2.3.0", - urls = [ - "http://mirror.tensorflow.org/github.com/tensorflow/tensorflow/archive/v2.3.0.tar.gz", # 2020-07-23 - "https://github.com/tensorflow/tensorflow/archive/v2.3.0.tar.gz", - ], -) - -load("@org_tensorflow//tensorflow:workspace.bzl", "tf_workspace") - -tf_workspace() - -load("@bazel_skylib//lib:versions.bzl", "versions") - -# Keep this version in sync with the BAZEL environment variable defined -# in our .github/workflows/ci.yml config. -versions.check(minimum_bazel_version = "3.7.0") - load("@io_bazel_rules_sass//:package.bzl", "rules_sass_dependencies") rules_sass_dependencies() @@ -110,22 +97,33 @@ load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories") sass_repositories() +# gRPC. +http_archive( + name = "com_github_grpc_grpc", + sha256 = "b2f2620c762427bfeeef96a68c1924319f384e877bc0e084487601e4cc6e434c", + strip_prefix = "grpc-1.42.0", + urls = [ + "http://mirror.tensorflow.org/github.com/grpc/grpc/archive/v1.42.0.tar.gz", + "https://github.com/grpc/grpc/archive/v1.42.0.tar.gz", # 2021-11-17 + ], +) + load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") grpc_deps() -load("@upb//bazel:repository_defs.bzl", "bazel_version_repository") +load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps") -bazel_version_repository(name = "bazel_version") +grpc_extra_deps() http_archive( name = "rules_rust", - sha256 = "9c7d7fd4378d75232858423d574cff677b16ac9a49cd1a11df545a6e72a315ca", - strip_prefix = "rules_rust-42a674093251fb6a603a2652980c9be28a6fea50", + sha256 = "08109dccfa5bbf674ff4dba82b15d40d85b07436b02e62ab27e0b894f45bb4a3", + strip_prefix = "rules_rust-d5ab4143245af8b33d1947813d411a6cae838409", urls = [ - # Master branch as of 2021-04-14 - "http://mirror.tensorflow.org/github.com/bazelbuild/rules_rust/archive/42a674093251fb6a603a2652980c9be28a6fea50.tar.gz", - "https://github.com/bazelbuild/rules_rust/archive/42a674093251fb6a603a2652980c9be28a6fea50.tar.gz", + # Master branch as of 2022-01-31 + "http://mirror.tensorflow.org/github.com/bazelbuild/rules_rust/archive/d5ab4143245af8b33d1947813d411a6cae838409.tar.gz", + "https://github.com/bazelbuild/rules_rust/archive/d5ab4143245af8b33d1947813d411a6cae838409.tar.gz", ], ) diff --git a/tensorboard/data/server/BUILD b/tensorboard/data/server/BUILD index 99d69e6e267..27af4bf8e09 100644 --- a/tensorboard/data/server/BUILD +++ b/tensorboard/data/server/BUILD @@ -1,4 +1,4 @@ -load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_doc", "rust_doc_test", "rust_library", "rust_test") +load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_doc", "rust_doc_test", "rust_library", "rust_test") package(default_visibility = ["//tensorboard:internal"]) @@ -117,13 +117,13 @@ rust_binary( rust_doc_test( name = "rustboard_core_doc_test", - dep = ":rustboard_core", + crate = ":rustboard_core", tags = ["manual"], # https://github.com/bazelbuild/rules_rust/issues/689 ) rust_doc( name = "rustboard_core_doc", - dep = ":rustboard_core", + crate = ":rustboard_core", tags = ["manual"], # https://github.com/bazelbuild/rules_rust/issues/689 ) diff --git a/tensorboard/data/server/descriptor.bin b/tensorboard/data/server/descriptor.bin index c8481d7a0a2..cc44201bd48 100644 Binary files a/tensorboard/data/server/descriptor.bin and b/tensorboard/data/server/descriptor.bin differ diff --git a/tensorboard/data/server/tensorboard.data.pb.rs b/tensorboard/data/server/tensorboard.data.pb.rs index 2cc00a686c1..83e995d0892 100644 --- a/tensorboard/data/server/tensorboard.data.pb.rs +++ b/tensorboard/data/server/tensorboard.data.pb.rs @@ -1,4 +1,4 @@ -/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/tensorboard/data/server/tensorboard.pb.rs b/tensorboard/data/server/tensorboard.pb.rs index 915253884cb..7a72916543d 100644 --- a/tensorboard/data/server/tensorboard.pb.rs +++ b/tensorboard/data/server/tensorboard.pb.rs @@ -1,4 +1,4 @@ -/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/tensorboard/data/server/update_protos.py b/tensorboard/data/server/update_protos.py index 5f43a1f0cca..6f6fa32886f 100644 --- a/tensorboard/data/server/update_protos.py +++ b/tensorboard/data/server/update_protos.py @@ -1,4 +1,4 @@ -# Copyright 2020 The TensorFlow Authors. All Rights Reserved. +# Copyright 2022 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ _FILE_DESCRIPTOR_SET = "descriptor.bin" _RUST_LICENSE = """\ -/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/third_party/rust.bzl b/third_party/rust.bzl index 397e9e85127..6a6fa220dd4 100644 --- a/third_party/rust.bzl +++ b/third_party/rust.bzl @@ -21,5 +21,5 @@ load("//third_party/rust:crates.bzl", "raze_fetch_remote_crates") def tensorboard_rust_workspace(): """TensorBoard Rust dependencies.""" - rust_repositories(version = "1.52.0") + rust_repositories(version = "1.58.1") raze_fetch_remote_crates() diff --git a/third_party/tensorflow.patch b/third_party/tensorflow.patch deleted file mode 100644 index d0350337433..00000000000 --- a/third_party/tensorflow.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- third_party/py/python_configure.bzl 1970-01-01 00:00:00.000000000 +0000 -+++ third_party/py/python_configure.bzl 1970-01-01 00:00:00.000000000 +0000 -@@ -268,6 +268,9 @@ NOTE: https://github.com/tensorflow/tensorboard/issues/4862 - - _ENVIRONS = [ - BAZEL_SH, -+ "PATH", -+ "PYTHONHOME", -+ "PYTHONPATH", - PYTHON_BIN_PATH, - PYTHON_LIB_PATH, - ] diff --git a/third_party/workspace.bzl b/third_party/workspace.bzl index 462ee04623e..1b3b125853c 100644 --- a/third_party/workspace.bzl +++ b/third_party/workspace.bzl @@ -40,6 +40,12 @@ def tensorboard_workspace(name = ""): actual = "@org_pythonhosted_six", ) + # Needed by Protobuf. + native.bind( + name = "grpc_python_plugin", + 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?)