Skip to content

Commit 595dd94

Browse files
authored
infra: remove dependency on org_tensorflow (#5528)
* remove dependency on `org_tensorflow` and add necessary dependencies * update rules_rust dep to HEAD and upgrade to Rust 1.58.1 * set mininum bazel version to 4.0.0
1 parent 410cb08 commit 595dd94

File tree

10 files changed

+53
-61
lines changed

10 files changed

+53
-61
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ on:
2727
env:
2828
# Keep this Bazel version in sync with the `versions.check` directive
2929
# in our WORKSPACE file.
30-
BAZEL_VERSION: '3.7.0'
31-
BAZEL_SHA256SUM: 'b7583eec83cc38302997098a40b8c870c37e0ab971a83cb3364c754a178b74ec'
30+
BAZEL_VERSION: '4.0.0'
31+
BAZEL_SHA256SUM: '7bee349a626281fc8b8d04a7a0b0358492712377400ab12533aeb39c2eb2b901'
3232
BUILDTOOLS_VERSION: '3.0.0'
3333
BUILDIFIER_SHA256SUM: 'e92a6793c7134c5431c58fbc34700664f101e5c9b1c1fcd93b97978e8b7f88db'
3434
BUILDOZER_SHA256SUM: '3d58a0b6972e4535718cdd6c12778170ea7382de7c75bc3728f5719437ffb84d'
@@ -121,11 +121,11 @@ jobs:
121121
matrix:
122122
mode: ['native']
123123
platform: ['ubuntu-18.04', 'macos-10.15']
124-
rust_version: ['1.52.0']
124+
rust_version: ['1.58.1']
125125
include:
126126
- mode: 'universal'
127127
platform: 'ubuntu-18.04'
128-
rust_version: '1.52.0'
128+
rust_version: '1.58.1'
129129
steps:
130130
- uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
131131
- uses: actions/setup-python@152ba7c4dd6521b8e9c93f72d362ce03bf6c4f20
@@ -244,7 +244,7 @@ jobs:
244244
runs-on: ubuntu-18.04
245245
strategy:
246246
matrix:
247-
rust_version: ['1.52.0']
247+
rust_version: ['1.58.1']
248248
cargo_raze_version: ['0.13.0']
249249
steps:
250250
- uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e

WORKSPACE

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@ workspace(name = "org_tensorflow_tensorboard")
22

33
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44

5+
http_archive(
6+
name = "bazel_skylib",
7+
sha256 = "07b4117379dde7ab382345c3b0f5edfc6b7cff6c93756eac63da121e0bbcc5de",
8+
strip_prefix = "bazel-skylib-1.1.1",
9+
urls = [
10+
"http://mirror.tensorflow.org/github.com/bazelbuild/bazel-skylib/archive/1.1.1.tar.gz",
11+
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", # 2021-09-27
12+
],
13+
)
14+
15+
load("@bazel_skylib//lib:versions.bzl", "versions")
16+
17+
# Keep this version in sync with the BAZEL environment variable defined
18+
# in our .github/workflows/ci.yml config.
19+
versions.check(minimum_bazel_version = "4.0.0")
20+
521
http_archive(
622
name = "io_bazel_rules_webtesting",
723
sha256 = "9bb461d5ef08e850025480bab185fd269242d4e533bca75bfb748001ceb343c3",
@@ -73,35 +89,6 @@ http_archive(
7389
],
7490
)
7591

76-
http_archive(
77-
name = "org_tensorflow",
78-
patches = [
79-
# Patch TF's python_configure.bzl to ensure it reconfigures its python
80-
# toolchain when environment variables like `PATH` and `PYTHONPATH`
81-
# change, to avoid the stale genrule py_binary issue described in:
82-
# https://github.com/tensorflow/tensorboard/issues/4862
83-
"//third_party:tensorflow.patch",
84-
],
85-
# NOTE: when updating this, MAKE SURE to also update the protobuf_js runtime version
86-
# in third_party/workspace.bzl to >= the protobuf/protoc version provided by TF.
87-
sha256 = "2595a5c401521f20a2734c4e5d54120996f8391f00bb62a57267d930bce95350",
88-
strip_prefix = "tensorflow-2.3.0",
89-
urls = [
90-
"http://mirror.tensorflow.org/github.com/tensorflow/tensorflow/archive/v2.3.0.tar.gz", # 2020-07-23
91-
"https://github.com/tensorflow/tensorflow/archive/v2.3.0.tar.gz",
92-
],
93-
)
94-
95-
load("@org_tensorflow//tensorflow:workspace.bzl", "tf_workspace")
96-
97-
tf_workspace()
98-
99-
load("@bazel_skylib//lib:versions.bzl", "versions")
100-
101-
# Keep this version in sync with the BAZEL environment variable defined
102-
# in our .github/workflows/ci.yml config.
103-
versions.check(minimum_bazel_version = "3.7.0")
104-
10592
load("@io_bazel_rules_sass//:package.bzl", "rules_sass_dependencies")
10693

10794
rules_sass_dependencies()
@@ -110,22 +97,33 @@ load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories")
11097

11198
sass_repositories()
11299

100+
# gRPC.
101+
http_archive(
102+
name = "com_github_grpc_grpc",
103+
sha256 = "b2f2620c762427bfeeef96a68c1924319f384e877bc0e084487601e4cc6e434c",
104+
strip_prefix = "grpc-1.42.0",
105+
urls = [
106+
"http://mirror.tensorflow.org/github.com/grpc/grpc/archive/v1.42.0.tar.gz",
107+
"https://github.com/grpc/grpc/archive/v1.42.0.tar.gz", # 2021-11-17
108+
],
109+
)
110+
113111
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
114112

115113
grpc_deps()
116114

117-
load("@upb//bazel:repository_defs.bzl", "bazel_version_repository")
115+
load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
118116

119-
bazel_version_repository(name = "bazel_version")
117+
grpc_extra_deps()
120118

121119
http_archive(
122120
name = "rules_rust",
123-
sha256 = "9c7d7fd4378d75232858423d574cff677b16ac9a49cd1a11df545a6e72a315ca",
124-
strip_prefix = "rules_rust-42a674093251fb6a603a2652980c9be28a6fea50",
121+
sha256 = "08109dccfa5bbf674ff4dba82b15d40d85b07436b02e62ab27e0b894f45bb4a3",
122+
strip_prefix = "rules_rust-d5ab4143245af8b33d1947813d411a6cae838409",
125123
urls = [
126-
# Master branch as of 2021-04-14
127-
"http://mirror.tensorflow.org/github.com/bazelbuild/rules_rust/archive/42a674093251fb6a603a2652980c9be28a6fea50.tar.gz",
128-
"https://github.com/bazelbuild/rules_rust/archive/42a674093251fb6a603a2652980c9be28a6fea50.tar.gz",
124+
# Master branch as of 2022-01-31
125+
"http://mirror.tensorflow.org/github.com/bazelbuild/rules_rust/archive/d5ab4143245af8b33d1947813d411a6cae838409.tar.gz",
126+
"https://github.com/bazelbuild/rules_rust/archive/d5ab4143245af8b33d1947813d411a6cae838409.tar.gz",
129127
],
130128
)
131129

tensorboard/data/server/BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_doc", "rust_doc_test", "rust_library", "rust_test")
1+
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_doc", "rust_doc_test", "rust_library", "rust_test")
22

33
package(default_visibility = ["//tensorboard:internal"])
44

@@ -117,13 +117,13 @@ rust_binary(
117117

118118
rust_doc_test(
119119
name = "rustboard_core_doc_test",
120-
dep = ":rustboard_core",
120+
crate = ":rustboard_core",
121121
tags = ["manual"], # https://github.com/bazelbuild/rules_rust/issues/689
122122
)
123123

124124
rust_doc(
125125
name = "rustboard_core_doc",
126-
dep = ":rustboard_core",
126+
crate = ":rustboard_core",
127127
tags = ["manual"], # https://github.com/bazelbuild/rules_rust/issues/689
128128
)
129129

-1.85 KB
Binary file not shown.

tensorboard/data/server/tensorboard.data.pb.rs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tensorboard/data/server/tensorboard.pb.rs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tensorboard/data/server/update_protos.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
1+
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
2828
_FILE_DESCRIPTOR_SET = "descriptor.bin"
2929

3030
_RUST_LICENSE = """\
31-
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
31+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
3232
3333
Licensed under the Apache License, Version 2.0 (the "License");
3434
you may not use this file except in compliance with the License.

third_party/rust.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ load("//third_party/rust:crates.bzl", "raze_fetch_remote_crates")
2121

2222
def tensorboard_rust_workspace():
2323
"""TensorBoard Rust dependencies."""
24-
rust_repositories(version = "1.52.0")
24+
rust_repositories(version = "1.58.1")
2525
raze_fetch_remote_crates()

third_party/tensorflow.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

third_party/workspace.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ def tensorboard_workspace(name = ""):
4040
actual = "@org_pythonhosted_six",
4141
)
4242

43+
# Needed by Protobuf.
44+
native.bind(
45+
name = "grpc_python_plugin",
46+
actual = "@com_github_grpc_grpc//src/compiler:grpc_python_plugin",
47+
)
48+
4349
platform_http_file(
4450
name = "org_chromium_chromium", # pinned to Chromium 84.0.4147.0
4551
licenses = ["notice"], # BSD 3-clause (maybe more?)

0 commit comments

Comments
 (0)