Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Fix buildifier files #700

Merged
merged 2 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,7 @@ buildifier:
# TODO (suvanjan): Re-enable once issues are fixed.
warnings: "attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,confusing-name,constant-glob,ctx-actions,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,function-docstring,git-repository,http-archive,integer-division,load,load-on-top,module-docstring,name-conventions,native-build,native-package,no-effect,out-of-order-load,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unreachable,unsorted-dict-items,unused-variable"
platforms:
ubuntu1804:
build_targets:
- "--"
- "..."
- "-//images/gcloud-bazel:gcloud_push"
- "-//images/gcloud-bazel:gcloud_installer"
- "-//images/gcloud-bazel:gcloud_install"
- "-//images/gcloud-bazel:gcloud-layer"
test_targets:
- "..."
ubuntu2004:
ubuntu2004: # TODO(fejta): ubuntu2204
build_targets:
- "--"
- "..."
Expand All @@ -44,8 +34,8 @@ platforms:
- "--verbose_failures"
min_supported_version:
name: "Minimum Supported Version"
bazel: "2.2.0"
platform: ubuntu1804
bazel: "5.2.0"
platform: ubuntu2004
build_targets:
- "--"
- "..."
Expand Down
5 changes: 2 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# In case you only have ipv6, you may need this:
# https://github.com/bazelbuild/bazel/issues/2486#issuecomment-657932374
# But this breaks buildkite
#startup --host_jvm_args=-Djava.net.preferIPv6Addresses=true

build --workspace_status_command=./hack/print-workspace-status.sh
Expand All @@ -36,8 +37,6 @@ test --test_output=errors
# Builds fail on MacOS otherwise
build --copt=-DGRPC_BAZEL_BUILD



# Maybe interesting
# https://github.com/bazelbuild/rules_docker/issues/2016
# https://github.com/bazelbuild/rules_docker/issues/2078
# ERICK ERICK ERICK
21 changes: 8 additions & 13 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ load("//k8s:k8s.bzl", "k8s_defaults", "k8s_repositories")
# Tell Gazelle to use @io_bazel_rules_docker as the external repository for rules_docker go packages
# gazelle:repository go_repository name=io_bazel_rules_docker importpath=github.com/bazelbuild/rules_docker

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

http_archive(
name = "rules_python",
sha256 = "cdf6b84084aad8f10bf20b46b77cb48d83c319ebe6458a18e9d2cebf57807cdd",
Expand All @@ -37,7 +35,6 @@ http_archive(
#)
#
#load("@python3_9//:defs.bzl", "interpreter")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# ERICK
#load("@rules_python//python:pip.bzl", "pip_parse")
Expand Down Expand Up @@ -220,8 +217,6 @@ load("@rules_proto_grpc//go:repositories.bzl", rules_proto_grpc_go_repos = "go_r

rules_proto_grpc_go_repos()

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

RULES_JVM_EXTERNAL_TAG = "4.2"

RULES_JVM_EXTERNAL_SHA = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca"
Expand Down Expand Up @@ -261,8 +256,12 @@ load("@rules_proto_grpc//java:repositories.bzl", rules_proto_grpc_java_repos = "

rules_proto_grpc_java_repos()

load("@rules_jvm_external//:defs.bzl", "maven_install")
load("@io_grpc_grpc_java//:repositories.bzl", "IO_GRPC_GRPC_JAVA_ARTIFACTS", "IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS", "grpc_java_repositories")
load(
"@io_grpc_grpc_java//:repositories.bzl",
"IO_GRPC_GRPC_JAVA_ARTIFACTS",
"IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS",
"grpc_java_repositories",
)

#artifacts = [
# "com.google.errorprone:error_prone_annotations:2.3.2",
Expand All @@ -286,7 +285,7 @@ compat_repositories()

grpc_java_repositories()

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")

gazelle_dependencies()

Expand Down Expand Up @@ -335,12 +334,10 @@ load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_d

build_bazel_rules_nodejs_dependencies()

load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories")
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")

node_repositories()

load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")

# We use nodejs_image to build a sample service
load(
"@io_bazel_rules_docker//nodejs:image.bzl",
Expand All @@ -365,8 +362,6 @@ bind(
# gazelle:repo bazel_gazelle

# Go dependencies needed for rules_k8s tests only.
load("@bazel_gazelle//:deps.bzl", "go_repository")

go_repository(
name = "org_golang_google_grpc",
importpath = "google.golang.org/grpc",
Expand Down
1 change: 0 additions & 1 deletion examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

load("@io_bazel_rules_jsonnet//jsonnet:jsonnet.bzl", "jsonnet_library")
load("@subpar//:subpar.bzl", "par_binary")

package(default_visibility = ["//visibility:public"])

Expand Down
7 changes: 3 additions & 4 deletions examples/hellogrpc/proto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_proto_grpc//go:go_grpc_library.bzl", "go_grpc_library")
load("@rules_proto_grpc//java:defs.bzl", "java_grpc_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

proto_library(
name = "simple_proto",
Expand All @@ -25,13 +24,13 @@ proto_library(

java_grpc_library(
name = "simple_java_grpc",
visibility = ["//examples/hellogrpc/java:__subpackages__"],
protos = [":simple_proto"],
visibility = ["//examples/hellogrpc/java:__subpackages__"],
)

go_grpc_library(
name = "simple_go_grpc",
importpath = "github.com/bazelbuild/rules_k8s/examples/hellogrpc/proto/go",
visibility = ["//examples/hellogrpc/go:__subpackages__"],
protos = [":simple_proto"],
visibility = ["//examples/hellogrpc/go:__subpackages__"],
)
6 changes: 3 additions & 3 deletions examples/hellohttp/nodejs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ licenses(["notice"]) # Apache 2.0
nodejs_image(
name = "server",
data = [
":server.js",
"@examples_hellohttp_npm//:node_modules",
":server.js",
"@examples_hellohttp_npm//:node_modules",
],
entry_point = "@io_bazel_rules_k8s//examples/hellohttp/nodejs:server.js",
node_repository_name = "nodejs_linux_amd64",
include_node_repo_args = False,
node_repository_name = "nodejs_linux_amd64",
)

k8s_deploy(
Expand Down
4 changes: 2 additions & 2 deletions examples/stamping/go/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package(default_visibility = ["//visibility:public"])
go_image(
name = "go-container",
srcs = ["main.go"],
importpath = "github.com/bazelbuild/not-my-project/examples/stamping/go",
pure = "on",
goarch = "amd64",
goos = "linux",
importpath = "github.com/bazelbuild/not-my-project/examples/stamping/go",
pure = "on",
)
10 changes: 5 additions & 5 deletions k8s/k8s.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ def k8s_repositories():
)

maybe(
http_archive,
name = "io_bazel_rules_docker",
sha256 = "27d53c1d646fc9537a70427ad7b034734d08a9c38924cc6357cc973fed300820",
strip_prefix = "rules_docker-0.24.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.24.0/rules_docker-v0.24.0.tar.gz"],
http_archive,
name = "io_bazel_rules_docker",
sha256 = "27d53c1d646fc9537a70427ad7b034734d08a9c38924cc6357cc973fed300820",
strip_prefix = "rules_docker-0.24.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.24.0/rules_docker-v0.24.0.tar.gz"],
)

maybe(
Expand Down