diff --git a/.bazelversion b/.bazelversion index 1545d966..fae6e3d0 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -3.5.0 +4.2.1 diff --git a/WORKSPACE b/WORKSPACE index 45723f77..c32613ec 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -13,7 +13,6 @@ # limitations under the License. workspace(name = "io_bazel_rules_k8s") -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") load("//k8s:k8s.bzl", "k8s_defaults", "k8s_repositories") @@ -32,29 +31,22 @@ k8s_go_deps() http_archive( name = "com_google_protobuf", - sha256 = "0cbdc9adda01f6d2facc65a22a2be5cecefbefe5a09e5382ee8879b522c04441", - strip_prefix = "protobuf-3.15.8", - url = "https://github.com/google/protobuf/archive/v3.15.8.tar.gz", + sha256 = "730d43c5460a4448398f06718da075c246eeb16483f2f279b5070f222dabc218", + strip_prefix = "protobuf-3.18.1", + urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.18.1.zip"], ) load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") protobuf_deps() -# Mention subpar directly to ensure we get version 2.0.0, -# which included fixes for incompatible change flags added in Bazel 0.25. This -# can be removed once other dependencies are updated. -git_repository( - name = "subpar", - remote = "https://github.com/google/subpar.git", - tag = "2.0.0", -) - http_archive( name = "rules_python", - sha256 = "778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f", - strip_prefix = "rules_python-0.2.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz", + sha256 = "954aa89b491be4a083304a2cb838019c8b8c3720a7abb9c4cb81ac7a24230cea", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_python/releases/download/0.4.0/rules_python-0.4.0.tar.gz", + "https://github.com/bazelbuild/rules_python/releases/download/0.4.0/rules_python-0.4.0.tar.gz", + ], ) load("@rules_python//python:repositories.bzl", "py_repositories") @@ -71,9 +63,9 @@ pip_install( http_archive( name = "com_github_grpc_grpc", - sha256 = "acf247ec3a52edaee5dee28644a4e485c5e5badf46bdb24a80ca1d76cb8f1174", - strip_prefix = "grpc-1.37.1", - urls = ["https://github.com/grpc/grpc/archive/v1.37.1.tar.gz"], + sha256 = "e5fb30aae1fa1cffa4ce00aa0bbfab908c0b899fcf0bbc30e268367d660d8656", + strip_prefix = "grpc-1.41.0", + urls = ["https://github.com/grpc/grpc/archive/v1.41.0.tar.gz"], ) load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") @@ -105,6 +97,7 @@ load( container_pull( name = "bazel_image", + digest = "sha256:ace9881e6e9c5d48b5fd637321361aeffe54000265894a65f7d818dc1065bd80", registry = "launcher.gcr.io", repository = "google/bazel", ) @@ -211,17 +204,25 @@ load( _go_image_repos() -git_repository( +http_archive( name = "io_bazel_rules_jsonnet", - commit = "12979862ab51358a8a5753f5a4aa0658fec9d4af", - remote = "https://github.com/bazelbuild/rules_jsonnet.git", - shallow_since = "1574670556 +0100", + sha256 = "7f51f859035cd98bcf4f70dedaeaca47fe9fbae6b199882c516d67df416505da", + strip_prefix = "rules_jsonnet-0.3.0", + urls = ["https://github.com/bazelbuild/rules_jsonnet/archive/0.3.0.tar.gz"], ) load("@io_bazel_rules_jsonnet//jsonnet:jsonnet.bzl", "jsonnet_repositories") jsonnet_repositories() +load("@jsonnet_go//bazel:repositories.bzl", "jsonnet_go_repositories") + +jsonnet_go_repositories() + +load("@jsonnet_go//bazel:deps.bzl", "jsonnet_go_dependencies") + +jsonnet_go_dependencies() + http_archive( name = "build_bazel_rules_nodejs", sha256 = "9d93d4e1340c43dbf6b2fd66b683d89630a6310bf8be3bf40ec96685dcacc26c", diff --git a/k8s/k8s.bzl b/k8s/k8s.bzl index d2a01450..a191c3ac 100644 --- a/k8s/k8s.bzl +++ b/k8s/k8s.bzl @@ -51,9 +51,9 @@ def k8s_repositories(): http_archive, name = "com_github_yaml_pyyaml", build_file_content = _com_github_yaml_pyyaml_build_file, - sha256 = "e9df8412ddabc9c21b4437ee138875b95ebb32c25f07f962439e16005152e00e", - strip_prefix = "pyyaml-5.1.2", - urls = ["https://github.com/yaml/pyyaml/archive/5.1.2.zip"], + sha256 = "ab5a9bc8aa7ffb3bd686cc5480c45d919bc2fa011a0623ca359997a1e7a75fbe", + strip_prefix = "pyyaml-6.0", + urls = ["https://github.com/yaml/pyyaml/archive/6.0.zip"], ) # Register the default kubectl toolchain targets for supported platforms @@ -69,20 +69,20 @@ def k8s_repositories(): maybe( http_archive, name = "io_bazel_rules_go", - sha256 = "52d0a57ea12139d727883c2fef03597970b89f2cc2a05722c42d1d7d41ec065b", + sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.24.13/rules_go-v0.24.13.tar.gz", - "https://github.com/bazelbuild/rules_go/releases/download/v0.24.13/rules_go-v0.24.13.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip", ], ) maybe( http_archive, name = "bazel_gazelle", - sha256 = "222e49f034ca7a1d1231422cdb67066b885819885c356673cb1f72f748a3c9d4", + sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz", - "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", + "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", ], ) @@ -97,9 +97,11 @@ def k8s_repositories(): maybe( http_archive, name = "bazel_skylib", - sha256 = "7ac0fa88c0c4ad6f5b9ffb5e09ef81e235492c873659e6bb99efb89d11246bcb", - strip_prefix = "bazel-skylib-1.0.3", - urls = ["https://github.com/bazelbuild/bazel-skylib/archive/1.0.3.tar.gz"], + sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d", + urls = [ + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", + ], ) # WORKSPACE target to configure the kubectl tool diff --git a/k8s/k8s_go_deps.bzl b/k8s/k8s_go_deps.bzl index d41f73a6..d1debf3c 100644 --- a/k8s/k8s_go_deps.bzl +++ b/k8s/k8s_go_deps.bzl @@ -32,7 +32,7 @@ def deps(): already. """ go_rules_dependencies() - go_register_toolchains() + go_register_toolchains(version = "1.17.1") gazelle_dependencies() rules_docker_repositories() rules_docker_go_deps() @@ -41,6 +41,6 @@ def deps(): go_repository, name = "com_github_google_go_cmp", importpath = "github.com/google/go-cmp", - sum = "h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg=", - version = "v0.3.1", + sum = "h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=", + version = "v0.5.6", ) diff --git a/requirements.txt b/requirements.txt index 7a997b5e..7fb01d26 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -PyYAML==5.3.1 +PyYAML==6.0.0