Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Go+GHA deps #984

Merged
merged 10 commits into from
Oct 3, 2023
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ on:
env:
# Keep these versions in sync with the Dockerfile
BDR_VER: '6.0.1'
GO_VER: '1.19.x'
PGG_VER: 'v1.30.0'
PROTOC_VER: '22.2'
GO_VER: '1.21.x'
PGG_VER: 'v1.31.0'
PROTOC_VER: '24.3'
PYTHON_VER: '3.8'
TEST_TAG: protoc-gen-validate:${{ github.sha }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- run: git fetch --force --tags
- uses: actions/setup-go@v4
with:
go-version: 1.19.x
go-version: 1.21.x
use-latest: true
cache: true
- uses: goreleaser/goreleaser-action@v4
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/maven-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Set VERSION variable from tag
run: |
VERSION=${{ env.REF_NAME }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
## For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path

name: Maven Verify

on:
Expand All @@ -14,6 +11,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Build and export to Docker
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
load: true
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN wget -q -O bazel https://github.com/bazelbuild/bazel/releases/download/${BAZ
&& mv bazel usr/local/bin/bazel

# protoc
ENV PROTOC_VER=22.2
ENV PROTOC_VER=24.3
RUN export PROTOC_REL=protoc-${PROTOC_VER}-linux-$([ $(uname -m) = "aarch64" ] && echo "aarch" || echo "x86")_64.zip \
&& wget -q https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/${PROTOC_REL} \
&& unzip ${PROTOC_REL} -d protoc \
Expand All @@ -43,14 +43,14 @@ RUN export PROTOC_REL=protoc-${PROTOC_VER}-linux-$([ $(uname -m) = "aarch64" ] &
ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
RUN export GORELEASE=go1.19.7.linux-$([ $(uname -m) = "aarch64" ] && echo "arm64" || echo "amd64").tar.gz \
RUN export GORELEASE=go1.21.1.linux-$([ $(uname -m) = "aarch64" ] && echo "arm64" || echo "amd64").tar.gz \
&& wget -q https://dl.google.com/go/$GORELEASE \
&& tar -C $(dirname $GOROOT) -xzf $GORELEASE \
&& rm $GORELEASE \
&& mkdir -p $GOPATH/{src,bin,pkg}

# protoc-gen-go
ENV PGG_VER=v1.30.0
ENV PGG_VER=v1.31.0
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@${PGG_VER} \
&& rm -rf $(go env GOCACHE) \
&& rm -rf $(go env GOMODCACHE)
Expand Down
4 changes: 2 additions & 2 deletions Tools.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Licensed under the Apache License, Version 2.0 (the "License")

bazelisk@v := github.com/bazelbuild/bazelisk@v1.15.0
protoc@v := github.com/protocolbuffers/protobuf@v22.2
protoc-gen-go@v := google.golang.org/protobuf/cmd/protoc-gen-go@v1.30.0
protoc@v := github.com/protocolbuffers/protobuf@v24.3
protoc-gen-go@v := google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0
2 changes: 1 addition & 1 deletion bazel/dependency_imports.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def _pgv_pip_dependencies():
def _pgv_go_dependencies():
go_rules_dependencies()
go_register_toolchains(
version = "1.19.7",
version = "1.21.1",
)
gazelle_dependencies()

Expand Down
5 changes: 3 additions & 2 deletions bazel/go/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ See https://github.com/bazelbuild/bazel-gazelle#directives
For example, in some/BUILD.bazel:
# gazelle:go_grpc_compilers @com_envoyproxy_protoc_gen_validate//bazel/go:pgv_plugin_go, @io_bazel_rules_go//proto:go_grpc
"""

load("@io_bazel_rules_go//proto:compiler.bzl", "go_proto_compiler")

go_proto_compiler(
name = "pgv_plugin_go",
options = ["lang=go"],
plugin = "@com_envoyproxy_protoc_gen_validate//:protoc-gen-validate",
suffix = ".pb.validate.go",
valid_archive = False,
plugin = "@com_envoyproxy_protoc_gen_validate//:protoc-gen-validate",
options = ["lang=go"],
visibility = ["//visibility:public"],
)
14 changes: 7 additions & 7 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ def pgv_dependencies(maven_repos = _DEFAULT_REPOSITORIES):
if not native.existing_rule("io_bazel_rules_go"):
http_archive(
name = "io_bazel_rules_go",
sha256 = "dd926a88a564a9246713a9c00b35315f54cbd46b31a26d5d8fb264c07045f05d",
sha256 = "91585017debb61982f7054c9688857a2ad1fd823fc3f9cb05048b0025c47d023",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.42.0/rules_go-v0.42.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.42.0/rules_go-v0.42.0.zip",
],
)

if not native.existing_rule("bazel_gazelle"):
http_archive(
name = "bazel_gazelle",
sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d",
sha256 = "d3fa66a39028e97d76f9e2db8f1b0c11c099e8e01bf363a923074784e451f809",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz",
],
)

Expand All @@ -41,7 +41,7 @@ def pgv_dependencies(maven_repos = _DEFAULT_REPOSITORIES):
build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
sha256 = "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30",
strip_prefix = "zlib-1.2.13",
urls = ["https://zlib.net/zlib-1.2.13.tar.gz"],
urls = ["https://zlib.net/fossils/zlib-1.2.13.tar.gz"],
)

if not native.existing_rule("bazel_skylib"):
Expand Down
14 changes: 13 additions & 1 deletion cmd/protoc-gen-validate-cpp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gazelle(name = "gazelle")

go_binary(
name = "protoc-gen-validate-cpp",
embed = [":protoc-gen-validate-cpp_lib"],
embed = [":protoc-gen-validate_lib"],
importpath = "github.com/envoyproxy/protoc-gen-validate/cmd/protoc-gen-validate-cpp",
visibility = ["//visibility:public"],
)
Expand All @@ -27,3 +27,15 @@ go_library(
"@org_golang_google_protobuf//types/pluginpb",
],
)

go_library(
name = "protoc-gen-validate_lib",
srcs = ["main.go"],
importpath = "github.com/envoyproxy/protoc-gen-validate",
visibility = ["//visibility:private"],
deps = [
"//module",
"@com_github_lyft_protoc_gen_star_v2//:protoc-gen-star",
"@org_golang_google_protobuf//types/pluginpb",
],
)
15 changes: 14 additions & 1 deletion cmd/protoc-gen-validate-go/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gazelle(name = "gazelle")

go_binary(
name = "protoc-gen-validate-go",
embed = [":protoc-gen-validate-go_lib"],
embed = [":protoc-gen-validate_lib"],
importpath = "github.com/envoyproxy/protoc-gen-validate/cmd/protoc-gen-validate-go",
visibility = ["//visibility:public"],
)
Expand All @@ -27,3 +27,16 @@ go_library(
"@org_golang_google_protobuf//types/pluginpb",
],
)

go_library(
name = "protoc-gen-validate_lib",
srcs = ["main.go"],
importpath = "github.com/envoyproxy/protoc-gen-validate",
visibility = ["//visibility:private"],
deps = [
"//module",
"@com_github_lyft_protoc_gen_star_v2//:protoc-gen-star",
"@com_github_lyft_protoc_gen_star_v2//lang/go",
"@org_golang_google_protobuf//types/pluginpb",
],
)
14 changes: 13 additions & 1 deletion cmd/protoc-gen-validate-java/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gazelle(name = "gazelle")

go_binary(
name = "protoc-gen-validate-java",
embed = [":protoc-gen-validate-java_lib"],
embed = [":protoc-gen-validate_lib"],
importpath = "github.com/envoyproxy/protoc-gen-validate/cmd/protoc-gen-validate-java",
visibility = ["//visibility:public"],
)
Expand All @@ -27,3 +27,15 @@ go_library(
"@org_golang_google_protobuf//types/pluginpb",
],
)

go_library(
name = "protoc-gen-validate_lib",
srcs = ["main.go"],
importpath = "github.com/envoyproxy/protoc-gen-validate",
visibility = ["//visibility:private"],
deps = [
"//module",
"@com_github_lyft_protoc_gen_star_v2//:protoc-gen-star",
"@org_golang_google_protobuf//types/pluginpb",
],
)
56 changes: 28 additions & 28 deletions dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def go_third_party():
go_repository(
name = "com_github_golang_protobuf",
importpath = "github.com/golang/protobuf",
sum = "h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=",
version = "v1.5.2",
sum = "h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=",
version = "v1.5.0",
)
go_repository(
name = "com_github_google_btree",
Expand Down Expand Up @@ -170,8 +170,8 @@ def go_third_party():
go_repository(
name = "com_github_iancoleman_strcase",
importpath = "github.com/iancoleman/strcase",
sum = "h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0=",
version = "v0.2.0",
sum = "h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=",
version = "v0.3.0",
)
go_repository(
name = "com_github_ianlancetaylor_demangle",
Expand Down Expand Up @@ -220,8 +220,8 @@ def go_third_party():
go_repository(
name = "com_github_lyft_protoc_gen_star_v2",
importpath = "github.com/lyft/protoc-gen-star/v2",
sum = "h1:keaAo8hRuAT0O3DfJ/wM3rufbAjGeJ1lAtWZHDjKGB0=",
version = "v2.0.1",
sum = "h1:/3+/2sWyXeMLzKd1bX+ixWKgEMsULrIivpDsuaF441o=",
version = "v2.0.3",
)
go_repository(
name = "com_github_pkg_errors",
Expand Down Expand Up @@ -257,8 +257,8 @@ def go_third_party():
go_repository(
name = "com_github_spf13_afero",
importpath = "github.com/spf13/afero",
sum = "h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=",
version = "v1.9.2",
sum = "h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY=",
version = "v1.10.0",
)
go_repository(
name = "com_github_stretchr_objx",
Expand Down Expand Up @@ -392,14 +392,14 @@ def go_third_party():
go_repository(
name = "org_golang_google_protobuf",
importpath = "google.golang.org/protobuf",
sum = "h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=",
version = "v1.30.0",
sum = "h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=",
version = "v1.31.0",
)
go_repository(
name = "org_golang_x_crypto",
importpath = "golang.org/x/crypto",
sum = "h1:idItI2DDfCokpg0N51B2VtiLdJ4vAuXC9fnCb2gACo4=",
version = "v0.0.0-20211108221036-ceb1ce70b4fa",
sum = "h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=",
version = "v0.13.0",
)
go_repository(
name = "org_golang_x_exp",
Expand Down Expand Up @@ -430,14 +430,14 @@ def go_third_party():
go_repository(
name = "org_golang_x_mod",
importpath = "golang.org/x/mod",
sum = "h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=",
version = "v0.6.0-dev.0.20220419223038-86c51ed26bb4",
sum = "h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=",
version = "v0.12.0",
)
go_repository(
name = "org_golang_x_net",
importpath = "golang.org/x/net",
sum = "h1:1WGATo9HAhkWMbfyuVU0tEFP88OIkUvwaHFveQPvzCQ=",
version = "v0.0.0-20220907135653-1e95f45603a7",
sum = "h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=",
version = "v0.15.0",
)
go_repository(
name = "org_golang_x_oauth2",
Expand All @@ -449,27 +449,27 @@ def go_third_party():
go_repository(
name = "org_golang_x_sync",
importpath = "golang.org/x/sync",
sum = "h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=",
version = "v0.0.0-20220722155255-886fb9371eb4",
sum = "h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=",
version = "v0.3.0",
)
go_repository(
name = "org_golang_x_sys",
importpath = "golang.org/x/sys",
sum = "h1:RoyzQTK76Rktm3p4xyZslc8T8I1tBz4UEjZCzeh57mM=",
version = "v0.0.0-20220908150016-7ac13a9a928d",
sum = "h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=",
version = "v0.12.0",
)
go_repository(
name = "org_golang_x_term",
importpath = "golang.org/x/term",
sum = "h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=",
version = "v0.0.0-20210927222741-03fcf44c2211",
sum = "h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU=",
version = "v0.12.0",
)

go_repository(
name = "org_golang_x_text",
importpath = "golang.org/x/text",
sum = "h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=",
version = "v0.3.7",
sum = "h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=",
version = "v0.13.0",
)
go_repository(
name = "org_golang_x_time",
Expand All @@ -481,12 +481,12 @@ def go_third_party():
go_repository(
name = "org_golang_x_tools",
importpath = "golang.org/x/tools",
sum = "h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=",
version = "v0.1.12",
sum = "h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=",
version = "v0.13.0",
)
go_repository(
name = "org_golang_x_xerrors",
importpath = "golang.org/x/xerrors",
sum = "h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=",
version = "v0.0.0-20220907171357-04be3eba64a2",
sum = "h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=",
version = "v0.0.0-20200804184101-5ec99f83aff1",
)
Loading