Skip to content

Commit 5750c55

Browse files
authored
chore: upgrade rules_python and grpc (googleapis#1124)
* chore: upgrade rules_python and grpc * Set minimum bazel version * update integration test image to gcr.io/gapic-images/googleapis * address review feedback
1 parent 667f6b1 commit 5750c55

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.0.0

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ jobs:
326326
run: nox -s fragment${{ matrix.variant }}-${{ matrix.python }}
327327
integration:
328328
runs-on: ubuntu-latest
329-
container: gcr.io/gapic-images/googleapis-bazel:20210105
329+
container: gcr.io/gapic-images/googleapis
330330
steps:
331331
- name: Cancel Previous Runs
332332
uses: styfle/cancel-workflow-action@0.7.0

WORKSPACE

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@ workspace(name = "gapic_generator_python")
22

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

5+
_bazel_skylib_version = "0.9.0"
6+
7+
_bazel_skylib_sha256 = "1dde365491125a3db70731e25658dfdd3bc5dbdfd11b840b3e987ecf043c7ca0"
8+
59
http_archive(
610
name = "bazel_skylib",
7-
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz"],
11+
sha256 = _bazel_skylib_sha256,
12+
url = "https://github.com/bazelbuild/bazel-skylib/releases/download/{0}/bazel_skylib-{0}.tar.gz".format(_bazel_skylib_version),
813
)
914

15+
_rules_python_version = "0.5.0"
16+
17+
_rules_python_sha256 = "a2fd4c2a8bcf897b718e5643040b03d9528ac6179f6990774b7c19b2dc6cd96b"
18+
1019
http_archive(
1120
name = "rules_python",
12-
strip_prefix = "rules_python-0.1.0",
13-
url = "https://github.com/bazelbuild/rules_python/archive/0.1.0.tar.gz",
21+
sha256 = _rules_python_sha256,
22+
strip_prefix = "rules_python-{}".format(_rules_python_version),
23+
url = "https://github.com/bazelbuild/rules_python/archive/{}.tar.gz".format(_rules_python_version),
1424
)
1525

1626
#

repositories.bzl

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ def gapic_generator_python():
1515
requirements = "@gapic_generator_python//:requirements.txt",
1616
)
1717

18-
_protobuf_version = "3.15.8"
19-
_protobuf_version_in_link = "v%s" % _protobuf_version
18+
_protobuf_version = "3.19.2"
19+
_protobuf_sha256 = "9ceef0daf7e8be16cd99ac759271eb08021b53b1c7b6edd399953a76390234cd"
20+
_protobuf_version_in_link = "v{}".format(_protobuf_version)
2021
_maybe(
2122
http_archive,
2223
name = "com_google_protobuf",
23-
urls = ["https://github.com/protocolbuffers/protobuf/archive/%s.zip" % _protobuf_version_in_link],
24-
strip_prefix = "protobuf-%s" % _protobuf_version,
24+
sha256 = _protobuf_sha256,
25+
url = "https://github.com/protocolbuffers/protobuf/archive/refs/tags/{}.zip".format(_protobuf_version_in_link),
26+
strip_prefix = "protobuf-{}".format(_protobuf_version),
2527
)
2628

2729
_maybe(
@@ -31,11 +33,14 @@ def gapic_generator_python():
3133
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"],
3234
)
3335

36+
_grpc_version = "1.43.0"
37+
_grpc_sha256 = "9647220c699cea4dafa92ec0917c25c7812be51a18143af047e20f3fb05adddc"
3438
_maybe(
3539
http_archive,
3640
name = "com_github_grpc_grpc",
37-
strip_prefix = "grpc-1.36.4",
38-
urls = ["https://github.com/grpc/grpc/archive/v1.36.4.zip"],
41+
sha256 = _grpc_sha256,
42+
strip_prefix = "grpc-{}".format(_grpc_version),
43+
url = "https://github.com/grpc/grpc/archive/v{}.tar.gz".format(_grpc_version),
3944
)
4045

4146
_maybe(

0 commit comments

Comments
 (0)