From ab0acb557aa79c26a4f21c4e1eaeb95973724e9d Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Fri, 8 Nov 2024 21:34:25 -0500 Subject: [PATCH 01/23] Add cmake support retroactive to v25.0 and squash layers --- plugins/protocolbuffers/cpp/v25.0/buf.plugin.yaml | 2 ++ plugins/protocolbuffers/cpp/v25.1/buf.plugin.yaml | 2 ++ plugins/protocolbuffers/cpp/v25.2/Dockerfile | 7 +++++-- plugins/protocolbuffers/cpp/v25.2/buf.plugin.yaml | 2 ++ plugins/protocolbuffers/cpp/v25.3/buf.plugin.yaml | 2 ++ plugins/protocolbuffers/cpp/v26.0/Dockerfile | 9 +++++++-- plugins/protocolbuffers/cpp/v26.0/buf.plugin.yaml | 2 ++ 7 files changed, 22 insertions(+), 4 deletions(-) diff --git a/plugins/protocolbuffers/cpp/v25.0/buf.plugin.yaml b/plugins/protocolbuffers/cpp/v25.0/buf.plugin.yaml index 218f9c718..6cff71ed1 100644 --- a/plugins/protocolbuffers/cpp/v25.0/buf.plugin.yaml +++ b/plugins/protocolbuffers/cpp/v25.0/buf.plugin.yaml @@ -7,3 +7,5 @@ output_languages: - cpp spdx_license_id: BSD-3-Clause license_url: https://github.com/protocolbuffers/protobuf/blob/v25.0/LICENSE +registry: + cmake: {} diff --git a/plugins/protocolbuffers/cpp/v25.1/buf.plugin.yaml b/plugins/protocolbuffers/cpp/v25.1/buf.plugin.yaml index 8d56264a0..32396a4a2 100644 --- a/plugins/protocolbuffers/cpp/v25.1/buf.plugin.yaml +++ b/plugins/protocolbuffers/cpp/v25.1/buf.plugin.yaml @@ -7,3 +7,5 @@ output_languages: - cpp spdx_license_id: BSD-3-Clause license_url: https://github.com/protocolbuffers/protobuf/blob/v25.1/LICENSE +registry: + cmake: {} diff --git a/plugins/protocolbuffers/cpp/v25.2/Dockerfile b/plugins/protocolbuffers/cpp/v25.2/Dockerfile index 44d0d37ea..59e8d5251 100644 --- a/plugins/protocolbuffers/cpp/v25.2/Dockerfile +++ b/plugins/protocolbuffers/cpp/v25.2/Dockerfile @@ -18,7 +18,10 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:6714977f9f02632c31377650c15d89a7efaebf43bab0f37c712c30fc01edb973 -COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . +FROM gcr.io/distroless/cc-debian12:latest@sha256:6714977f9f02632c31377650c15d89a7efaebf43bab0f37c712c30fc01edb973 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . USER nobody ENTRYPOINT ["/protoc-gen-cpp"] diff --git a/plugins/protocolbuffers/cpp/v25.2/buf.plugin.yaml b/plugins/protocolbuffers/cpp/v25.2/buf.plugin.yaml index 55befc9cb..19031f1a1 100644 --- a/plugins/protocolbuffers/cpp/v25.2/buf.plugin.yaml +++ b/plugins/protocolbuffers/cpp/v25.2/buf.plugin.yaml @@ -7,3 +7,5 @@ output_languages: - cpp spdx_license_id: BSD-3-Clause license_url: https://github.com/protocolbuffers/protobuf/blob/v25.2/LICENSE +registry: + cmake: {} diff --git a/plugins/protocolbuffers/cpp/v25.3/buf.plugin.yaml b/plugins/protocolbuffers/cpp/v25.3/buf.plugin.yaml index 14a05d57a..0ff9d01e2 100644 --- a/plugins/protocolbuffers/cpp/v25.3/buf.plugin.yaml +++ b/plugins/protocolbuffers/cpp/v25.3/buf.plugin.yaml @@ -7,3 +7,5 @@ output_languages: - cpp spdx_license_id: BSD-3-Clause license_url: https://github.com/protocolbuffers/protobuf/blob/v25.3/LICENSE +registry: + cmake: {} diff --git a/plugins/protocolbuffers/cpp/v26.0/Dockerfile b/plugins/protocolbuffers/cpp/v26.0/Dockerfile index c17fd80f5..8843ad92c 100644 --- a/plugins/protocolbuffers/cpp/v26.0/Dockerfile +++ b/plugins/protocolbuffers/cpp/v26.0/Dockerfile @@ -18,7 +18,12 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b -COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . +FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . USER nobody ENTRYPOINT ["/protoc-gen-cpp"] + + diff --git a/plugins/protocolbuffers/cpp/v26.0/buf.plugin.yaml b/plugins/protocolbuffers/cpp/v26.0/buf.plugin.yaml index b6a1cc1c2..0aff6b454 100644 --- a/plugins/protocolbuffers/cpp/v26.0/buf.plugin.yaml +++ b/plugins/protocolbuffers/cpp/v26.0/buf.plugin.yaml @@ -7,3 +7,5 @@ output_languages: - cpp spdx_license_id: BSD-3-Clause license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE +registry: + cmake: {} From ce1d9da496e8e3d9dd5d1f8ec5c5d35bfef2e7e2 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Fri, 8 Nov 2024 21:35:02 -0500 Subject: [PATCH 02/23] Whitespace --- plugins/protocolbuffers/cpp/v26.0/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/protocolbuffers/cpp/v26.0/Dockerfile b/plugins/protocolbuffers/cpp/v26.0/Dockerfile index 8843ad92c..aa55a75ce 100644 --- a/plugins/protocolbuffers/cpp/v26.0/Dockerfile +++ b/plugins/protocolbuffers/cpp/v26.0/Dockerfile @@ -25,5 +25,3 @@ COPY --link --from=base / / COPY --link --from=build --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . USER nobody ENTRYPOINT ["/protoc-gen-cpp"] - - From 06efbdd5ce35550c4e22233f055a7055f3fa1bab Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 12 Nov 2024 15:22:22 -0500 Subject: [PATCH 03/23] Patch 25.0-25.2 to ignore editions --- .../protocolbuffers/cpp/v25.0/.dockerignore | 1 + plugins/protocolbuffers/cpp/v25.0/Dockerfile | 4 +++- .../cpp/v25.0/disable_cpp_editions.patch | 20 +++++++++++++++++++ .../protocolbuffers/cpp/v25.1/.dockerignore | 1 + plugins/protocolbuffers/cpp/v25.1/Dockerfile | 4 +++- .../cpp/v25.1/disable_cpp_editions.patch | 20 +++++++++++++++++++ .../protocolbuffers/cpp/v25.2/.dockerignore | 1 + plugins/protocolbuffers/cpp/v25.2/Dockerfile | 4 +++- .../cpp/v25.2/disable_cpp_editions.patch | 20 +++++++++++++++++++ 9 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 plugins/protocolbuffers/cpp/v25.0/disable_cpp_editions.patch create mode 100644 plugins/protocolbuffers/cpp/v25.1/disable_cpp_editions.patch create mode 100644 plugins/protocolbuffers/cpp/v25.2/disable_cpp_editions.patch diff --git a/plugins/protocolbuffers/cpp/v25.0/.dockerignore b/plugins/protocolbuffers/cpp/v25.0/.dockerignore index c80455688..ab1677e27 100644 --- a/plugins/protocolbuffers/cpp/v25.0/.dockerignore +++ b/plugins/protocolbuffers/cpp/v25.0/.dockerignore @@ -1,4 +1,5 @@ * !BUILD !cpp.cc +!disable_cpp_editions.patch !Dockerfile diff --git a/plugins/protocolbuffers/cpp/v25.0/Dockerfile b/plugins/protocolbuffers/cpp/v25.0/Dockerfile index 2adce92c9..642aa88fb 100644 --- a/plugins/protocolbuffers/cpp/v25.0/Dockerfile +++ b/plugins/protocolbuffers/cpp/v25.0/Dockerfile @@ -16,7 +16,9 @@ RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/rele && rm protoc.tar.gz RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ -RUN bazel build '//plugins:protoc-gen-cpp.stripped' +COPY --link disable_cpp_editions.patch . +RUN git apply < disable_cpp_editions.patch \ + && bazel build '//plugins:protoc-gen-cpp.stripped' FROM gcr.io/distroless/cc-debian11 COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . diff --git a/plugins/protocolbuffers/cpp/v25.0/disable_cpp_editions.patch b/plugins/protocolbuffers/cpp/v25.0/disable_cpp_editions.patch new file mode 100644 index 000000000..c4a57ab64 --- /dev/null +++ b/plugins/protocolbuffers/cpp/v25.0/disable_cpp_editions.patch @@ -0,0 +1,20 @@ +diff --git a/src/google/protobuf/compiler/cpp/generator.h b/src/google/protobuf/compiler/cpp/generator.h +index 64f334d5b..fd6e08e84 100644 +--- a/src/google/protobuf/compiler/cpp/generator.h ++++ b/src/google/protobuf/compiler/cpp/generator.h +@@ -70,14 +70,7 @@ class PROTOC_EXPORT CppGenerator : public CodeGenerator { + std::string* error) const override; + + uint64_t GetSupportedFeatures() const override { +- return FEATURE_PROTO3_OPTIONAL | FEATURE_SUPPORTS_EDITIONS; +- } +- +- Edition GetMinimumEdition() const override { return Edition::EDITION_PROTO2; } +- Edition GetMaximumEdition() const override { return Edition::EDITION_2023; } +- +- std::vector GetFeatureExtensions() const override { +- return {GetExtensionReflection(pb::cpp)}; ++ return FEATURE_PROTO3_OPTIONAL; + } + + private: diff --git a/plugins/protocolbuffers/cpp/v25.1/.dockerignore b/plugins/protocolbuffers/cpp/v25.1/.dockerignore index c80455688..ab1677e27 100644 --- a/plugins/protocolbuffers/cpp/v25.1/.dockerignore +++ b/plugins/protocolbuffers/cpp/v25.1/.dockerignore @@ -1,4 +1,5 @@ * !BUILD !cpp.cc +!disable_cpp_editions.patch !Dockerfile diff --git a/plugins/protocolbuffers/cpp/v25.1/Dockerfile b/plugins/protocolbuffers/cpp/v25.1/Dockerfile index 3bb6c7991..418a2d37b 100644 --- a/plugins/protocolbuffers/cpp/v25.1/Dockerfile +++ b/plugins/protocolbuffers/cpp/v25.1/Dockerfile @@ -16,7 +16,9 @@ RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/rele && rm protoc.tar.gz RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ -RUN bazel build '//plugins:protoc-gen-cpp.stripped' +COPY --link disable_cpp_editions.patch . +RUN git apply < disable_cpp_editions.patch \ + && bazel build '//plugins:protoc-gen-cpp.stripped' FROM gcr.io/distroless/cc-debian11 COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . diff --git a/plugins/protocolbuffers/cpp/v25.1/disable_cpp_editions.patch b/plugins/protocolbuffers/cpp/v25.1/disable_cpp_editions.patch new file mode 100644 index 000000000..c4a57ab64 --- /dev/null +++ b/plugins/protocolbuffers/cpp/v25.1/disable_cpp_editions.patch @@ -0,0 +1,20 @@ +diff --git a/src/google/protobuf/compiler/cpp/generator.h b/src/google/protobuf/compiler/cpp/generator.h +index 64f334d5b..fd6e08e84 100644 +--- a/src/google/protobuf/compiler/cpp/generator.h ++++ b/src/google/protobuf/compiler/cpp/generator.h +@@ -70,14 +70,7 @@ class PROTOC_EXPORT CppGenerator : public CodeGenerator { + std::string* error) const override; + + uint64_t GetSupportedFeatures() const override { +- return FEATURE_PROTO3_OPTIONAL | FEATURE_SUPPORTS_EDITIONS; +- } +- +- Edition GetMinimumEdition() const override { return Edition::EDITION_PROTO2; } +- Edition GetMaximumEdition() const override { return Edition::EDITION_2023; } +- +- std::vector GetFeatureExtensions() const override { +- return {GetExtensionReflection(pb::cpp)}; ++ return FEATURE_PROTO3_OPTIONAL; + } + + private: diff --git a/plugins/protocolbuffers/cpp/v25.2/.dockerignore b/plugins/protocolbuffers/cpp/v25.2/.dockerignore index c80455688..ab1677e27 100644 --- a/plugins/protocolbuffers/cpp/v25.2/.dockerignore +++ b/plugins/protocolbuffers/cpp/v25.2/.dockerignore @@ -1,4 +1,5 @@ * !BUILD !cpp.cc +!disable_cpp_editions.patch !Dockerfile diff --git a/plugins/protocolbuffers/cpp/v25.2/Dockerfile b/plugins/protocolbuffers/cpp/v25.2/Dockerfile index 59e8d5251..5ed99f106 100644 --- a/plugins/protocolbuffers/cpp/v25.2/Dockerfile +++ b/plugins/protocolbuffers/cpp/v25.2/Dockerfile @@ -16,7 +16,9 @@ RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/rele && rm protoc.tar.gz RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ -RUN bazel build '//plugins:protoc-gen-cpp.stripped' +COPY --link disable_cpp_editions.patch . +RUN git apply < disable_cpp_editions.patch \ + && bazel build '//plugins:protoc-gen-cpp.stripped' FROM gcr.io/distroless/cc-debian12:latest@sha256:6714977f9f02632c31377650c15d89a7efaebf43bab0f37c712c30fc01edb973 AS base diff --git a/plugins/protocolbuffers/cpp/v25.2/disable_cpp_editions.patch b/plugins/protocolbuffers/cpp/v25.2/disable_cpp_editions.patch new file mode 100644 index 000000000..c4a57ab64 --- /dev/null +++ b/plugins/protocolbuffers/cpp/v25.2/disable_cpp_editions.patch @@ -0,0 +1,20 @@ +diff --git a/src/google/protobuf/compiler/cpp/generator.h b/src/google/protobuf/compiler/cpp/generator.h +index 64f334d5b..fd6e08e84 100644 +--- a/src/google/protobuf/compiler/cpp/generator.h ++++ b/src/google/protobuf/compiler/cpp/generator.h +@@ -70,14 +70,7 @@ class PROTOC_EXPORT CppGenerator : public CodeGenerator { + std::string* error) const override; + + uint64_t GetSupportedFeatures() const override { +- return FEATURE_PROTO3_OPTIONAL | FEATURE_SUPPORTS_EDITIONS; +- } +- +- Edition GetMinimumEdition() const override { return Edition::EDITION_PROTO2; } +- Edition GetMaximumEdition() const override { return Edition::EDITION_2023; } +- +- std::vector GetFeatureExtensions() const override { +- return {GetExtensionReflection(pb::cpp)}; ++ return FEATURE_PROTO3_OPTIONAL; + } + + private: From 1e76052467086e18789d7e53230a3fe53939b719 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 26 Nov 2024 15:43:19 -0500 Subject: [PATCH 04/23] Update to latest image --- plugins/protocolbuffers/cpp/v26.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/protocolbuffers/cpp/v26.0/Dockerfile b/plugins/protocolbuffers/cpp/v26.0/Dockerfile index aa55a75ce..0430c1385 100644 --- a/plugins/protocolbuffers/cpp/v26.0/Dockerfile +++ b/plugins/protocolbuffers/cpp/v26.0/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --link --from=base / / From b86d1fdfea2ee57fd6e583f04da9dae6f12dda2e Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 26 Nov 2024 15:45:13 -0500 Subject: [PATCH 05/23] Update to latest base image --- plugins/protocolbuffers/cpp/v25.2/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v25.3/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/protocolbuffers/cpp/v25.2/Dockerfile b/plugins/protocolbuffers/cpp/v25.2/Dockerfile index 5ed99f106..7e3eef8eb 100644 --- a/plugins/protocolbuffers/cpp/v25.2/Dockerfile +++ b/plugins/protocolbuffers/cpp/v25.2/Dockerfile @@ -20,7 +20,7 @@ COPY --link disable_cpp_editions.patch . RUN git apply < disable_cpp_editions.patch \ && bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:6714977f9f02632c31377650c15d89a7efaebf43bab0f37c712c30fc01edb973 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --link --from=base / / diff --git a/plugins/protocolbuffers/cpp/v25.3/Dockerfile b/plugins/protocolbuffers/cpp/v25.3/Dockerfile index 5cbb19ef7..bf0a822bb 100644 --- a/plugins/protocolbuffers/cpp/v25.3/Dockerfile +++ b/plugins/protocolbuffers/cpp/v25.3/Dockerfile @@ -20,7 +20,7 @@ COPY --link disable_cpp_editions.patch . RUN git apply < disable_cpp_editions.patch \ && bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:e1065a1d58800a7294f74e67c32ec4146d09d6cbe471c1fa7ed456b2d2bf06e0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --link --from=base / / From c03363cfe6db9454288b6901cc5b8d39dfe41a41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:15:08 -0600 Subject: [PATCH 06/23] Bump the distroless group in /.github/docker with 6 updates (#1587) Bumps the distroless group in /.github/docker with 6 updates: | Package | From | To | | --- | --- | --- | | distroless/base-debian12 | ``8fe31fb`` | ``7a4bffc`` | | distroless/cc-debian12 | ``6f05aba`` | ``2fb6959`` | | distroless/java21-debian12 | ``d2d4515`` | ``75bff39`` | | distroless/nodejs22-debian12 | ``f71f4b7`` | ``c218f62`` | | distroless/python3-debian12 | ``5c732db`` | ``6ddcc8e`` | | distroless/static-debian12 | ``cc226ca`` | ``f4a57e8`` | Updates `distroless/base-debian12` from `8fe31fb` to `7a4bffc` Updates `distroless/cc-debian12` from `6f05aba` to `2fb6959` Updates `distroless/java21-debian12` from `d2d4515` to `75bff39` Updates `distroless/nodejs22-debian12` from `f71f4b7` to `c218f62` Updates `distroless/python3-debian12` from `5c732db` to `6ddcc8e` Updates `distroless/static-debian12` from `cc226ca` to `f4a57e8` Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/docker/Dockerfile.distroless-base-debian | 2 +- .github/docker/Dockerfile.distroless-cc-debian | 2 +- .github/docker/Dockerfile.distroless-java-debian | 2 +- .github/docker/Dockerfile.distroless-nodejs-debian | 2 +- .github/docker/Dockerfile.distroless-python-debian | 2 +- .github/docker/Dockerfile.distroless-static-debian | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/docker/Dockerfile.distroless-base-debian b/.github/docker/Dockerfile.distroless-base-debian index 9e50ab65b..4f72a52df 100644 --- a/.github/docker/Dockerfile.distroless-base-debian +++ b/.github/docker/Dockerfile.distroless-base-debian @@ -1,3 +1,3 @@ -FROM gcr.io/distroless/base-debian12:latest@sha256:8fe31fb9d159141d9c3ff99f1fd287239d89d97ea95fea1f08f82ea5f2b544da +FROM gcr.io/distroless/base-debian12:latest@sha256:7a4bffcb07307d97aa731b50cb6ab22a68a8314426f4e4428335939b5b1943a5 CMD echo this is a dummy file used to automate dependency upgrades for plugins diff --git a/.github/docker/Dockerfile.distroless-cc-debian b/.github/docker/Dockerfile.distroless-cc-debian index 6f29718b5..44a1d7721 100644 --- a/.github/docker/Dockerfile.distroless-cc-debian +++ b/.github/docker/Dockerfile.distroless-cc-debian @@ -1,3 +1,3 @@ -FROM gcr.io/distroless/cc-debian12:latest@sha256:6f05aba4de16e89f8d879bf2a1364de3e41aba04f1dcbba8c75494f6134b4b13 +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 CMD echo this is a dummy file used to automate dependency upgrades for plugins diff --git a/.github/docker/Dockerfile.distroless-java-debian b/.github/docker/Dockerfile.distroless-java-debian index ae495cc7f..fb8d374d7 100644 --- a/.github/docker/Dockerfile.distroless-java-debian +++ b/.github/docker/Dockerfile.distroless-java-debian @@ -1,3 +1,3 @@ -FROM gcr.io/distroless/java21-debian12:latest@sha256:d2d4515f1062fac83c307260a14b523fe6027d0ce22e3b77abfc8bef874b5497 +FROM gcr.io/distroless/java21-debian12:latest@sha256:75bff39aa6eaaa759db7b42c68ec63b444ce981d65b8682264ba29724411e0bd CMD echo this is a dummy file used to automate dependency upgrades for plugins diff --git a/.github/docker/Dockerfile.distroless-nodejs-debian b/.github/docker/Dockerfile.distroless-nodejs-debian index 39e0a6153..c9055e365 100644 --- a/.github/docker/Dockerfile.distroless-nodejs-debian +++ b/.github/docker/Dockerfile.distroless-nodejs-debian @@ -1,3 +1,3 @@ -FROM gcr.io/distroless/nodejs22-debian12:latest@sha256:f71f4b7976f952df9c72b4d2ce82e09f0f57d398a25c0c3ebd63557e973f1ee7 +FROM gcr.io/distroless/nodejs22-debian12:latest@sha256:c218f62198d07fc67e36fff5639985f29b1bdcf04a601c1d23c0ab1121f55f0b CMD echo this is a dummy file used to automate dependency upgrades for plugins diff --git a/.github/docker/Dockerfile.distroless-python-debian b/.github/docker/Dockerfile.distroless-python-debian index 132986a95..87be3f46e 100644 --- a/.github/docker/Dockerfile.distroless-python-debian +++ b/.github/docker/Dockerfile.distroless-python-debian @@ -1,3 +1,3 @@ -FROM gcr.io/distroless/python3-debian12:latest@sha256:5c732dbcb05a53ffa7d3e9094bfa75b27eeaf5df6edf116d552414e010d124a2 +FROM gcr.io/distroless/python3-debian12:latest@sha256:6ddcc8e7ee34406c83dc2d201b92150b9e401d16514086e0c08c95da834c12fd CMD echo this is a dummy file used to automate dependency upgrades for plugins diff --git a/.github/docker/Dockerfile.distroless-static-debian b/.github/docker/Dockerfile.distroless-static-debian index 93ff16e06..62c5901e2 100644 --- a/.github/docker/Dockerfile.distroless-static-debian +++ b/.github/docker/Dockerfile.distroless-static-debian @@ -1,3 +1,3 @@ -FROM gcr.io/distroless/static-debian12:latest@sha256:cc226ca14d17d01d4b278d9489da930a0dd11150df10ae95829d13e6d00fbdbf +FROM gcr.io/distroless/static-debian12:latest@sha256:f4a57e8ffd7ba407bdd0eb315bb54ef1f21a2100a7f032e9102e4da34fe7c196 CMD echo this is a dummy file used to automate dependency upgrades for plugins From 14db30e6c1f70350ac40f02e00bf87afc4445925 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:16:00 -0600 Subject: [PATCH 07/23] Bump bazel-public/bazel from 7.4.0 to 7.4.1 in /.github/docker (#1589) Bumps bazel-public/bazel from 7.4.0 to 7.4.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bazel-public/bazel&package-manager=docker&previous-version=7.4.0&new-version=7.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/docker/Dockerfile.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/docker/Dockerfile.bazel b/.github/docker/Dockerfile.bazel index 09d33eb94..f94d82668 100644 --- a/.github/docker/Dockerfile.bazel +++ b/.github/docker/Dockerfile.bazel @@ -1,3 +1,3 @@ -FROM gcr.io/bazel-public/bazel:7.4.0 +FROM gcr.io/bazel-public/bazel:7.4.1 CMD echo this is a dummy file used to automate dependency upgrades for plugins From 704b1b66e7c4fc410c3e49078cd3594d5569afef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 08:44:27 -0600 Subject: [PATCH 08/23] Bump dotnet/sdk from 8.0.403-bookworm-slim to 8.0.404-bookworm-slim in /.github/docker (#1590) --- .github/docker/Dockerfile.dotnetrestore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/docker/Dockerfile.dotnetrestore b/.github/docker/Dockerfile.dotnetrestore index a0b228293..92490a85a 100644 --- a/.github/docker/Dockerfile.dotnetrestore +++ b/.github/docker/Dockerfile.dotnetrestore @@ -1,3 +1,3 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0.403-bookworm-slim@sha256:b38da1961b1358940c634560747e09ef8047234e66c71033f19ac2e777f60240 +FROM mcr.microsoft.com/dotnet/sdk:8.0.404-bookworm-slim@sha256:f91f9181d68b5ed2c8dea199dbbd2f6d172e60bdc43f8a67878b1ad140cf8d6b CMD echo this is a dummy file used to automate dependency upgrades for plugins From 8151e01df6feef38e993fb5756d2ef05dd95ed0a Mon Sep 17 00:00:00 2001 From: "app-token-plugins[bot]" <116026991+app-token-plugins[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:22:17 -0500 Subject: [PATCH 09/23] Update protocolbuffers/go v1.35.2 (#1591) New plugin versions found. Please review. Co-authored-by: mfridman <6278244+mfridman@users.noreply.github.com> --- .../protocolbuffers/go/v1.35.2/.dockerignore | 2 ++ plugins/protocolbuffers/go/v1.35.2/Dockerfile | 15 +++++++++++++++ .../go/v1.35.2/buf.plugin.yaml | 19 +++++++++++++++++++ .../go/v1.35.2/eliza/plugin.sum | 1 + .../go/v1.35.2/petapis/plugin.sum | 1 + 5 files changed, 38 insertions(+) create mode 100644 plugins/protocolbuffers/go/v1.35.2/.dockerignore create mode 100644 plugins/protocolbuffers/go/v1.35.2/Dockerfile create mode 100644 plugins/protocolbuffers/go/v1.35.2/buf.plugin.yaml create mode 100644 tests/testdata/buf.build/protocolbuffers/go/v1.35.2/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/go/v1.35.2/petapis/plugin.sum diff --git a/plugins/protocolbuffers/go/v1.35.2/.dockerignore b/plugins/protocolbuffers/go/v1.35.2/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/protocolbuffers/go/v1.35.2/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/protocolbuffers/go/v1.35.2/Dockerfile b/plugins/protocolbuffers/go/v1.35.2/Dockerfile new file mode 100644 index 000000000..50963f962 --- /dev/null +++ b/plugins/protocolbuffers/go/v1.35.2/Dockerfile @@ -0,0 +1,15 @@ +# syntax=docker/dockerfile:1.10 +FROM --platform=$BUILDPLATFORM golang:1.23.3-bookworm AS build + +ARG TARGETOS TARGETARCH +ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH + +RUN --mount=type=cache,target=/go/pkg/mod \ + go install -ldflags "-s -w" -trimpath google.golang.org/protobuf/cmd/protoc-gen-go@v1.35.2 \ + && mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-go /go/bin/protoc-gen-go || true + +FROM scratch +COPY --from=build --link /etc/passwd /etc/passwd +COPY --from=build --link --chown=root:root /go/bin/protoc-gen-go . +USER nobody +ENTRYPOINT [ "/protoc-gen-go" ] diff --git a/plugins/protocolbuffers/go/v1.35.2/buf.plugin.yaml b/plugins/protocolbuffers/go/v1.35.2/buf.plugin.yaml new file mode 100644 index 000000000..c4471bc6b --- /dev/null +++ b/plugins/protocolbuffers/go/v1.35.2/buf.plugin.yaml @@ -0,0 +1,19 @@ +version: v1 +name: buf.build/protocolbuffers/go +plugin_version: v1.35.2 +source_url: https://github.com/protocolbuffers/protobuf-go +integration_guide_url: https://protobuf.dev/getting-started/gotutorial +description: Base types for Go. Generates message and enum types. +output_languages: + - go +registry: + go: + # https://github.com/protocolbuffers/protobuf-go/blob/v1.35.2/go.mod#L3 + min_version: "1.21" + deps: + - module: google.golang.org/protobuf + version: v1.35.2 + opts: + - paths=source_relative +spdx_license_id: BSD-3-Clause +license_url: https://github.com/protocolbuffers/protobuf-go/blob/v1.35.2/LICENSE diff --git a/tests/testdata/buf.build/protocolbuffers/go/v1.35.2/eliza/plugin.sum b/tests/testdata/buf.build/protocolbuffers/go/v1.35.2/eliza/plugin.sum new file mode 100644 index 000000000..9205391c2 --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/go/v1.35.2/eliza/plugin.sum @@ -0,0 +1 @@ +h1:FMSn7zhSrpekJ9js+TiFRqxeBe4rI2gUYe5UWKmXpio= diff --git a/tests/testdata/buf.build/protocolbuffers/go/v1.35.2/petapis/plugin.sum b/tests/testdata/buf.build/protocolbuffers/go/v1.35.2/petapis/plugin.sum new file mode 100644 index 000000000..b71e55beb --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/go/v1.35.2/petapis/plugin.sum @@ -0,0 +1 @@ +h1:6PP6VH51HIlHCyXHJYeC6rw7yyK/70hBdcNWoeyHQVE= From 1f253eefea0d60ea318dda74b35f58b44985a645 Mon Sep 17 00:00:00 2001 From: Saquib Mian Date: Fri, 15 Nov 2024 15:05:35 -0500 Subject: [PATCH 10/23] Bump `protocolbuffers/csharp@28.3` to `netstandard2.0` (#1592) .NET 9 SDK [raises](https://learn.microsoft.com/en-ca/dotnet/core/compatibility/sdk/9.0/netstandard-warning) a (suppressable) build warning about this, largely to encourage developers to upgrade. This should not be an issue for consumers, as the more important consideration is the hosting application's target framework. More importantly, using `netstandard1.1` results in a vulnerable version of `System.Net.Http` being pulled in (`4.3.0`) via `Google.Protobuf`'s `netstandard1.1` deps. Upgrading to `netstandard2.0` resolves this. `grpc/csharp` is already using `netstandard2.0`. No other C# plugins exist. --- plugins/protocolbuffers/csharp/v28.3/buf.plugin.yaml | 2 +- plugins/protocolbuffers/csharp/v28.3/build.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/protocolbuffers/csharp/v28.3/buf.plugin.yaml b/plugins/protocolbuffers/csharp/v28.3/buf.plugin.yaml index 80d2c1a47..1a489c73b 100644 --- a/plugins/protocolbuffers/csharp/v28.3/buf.plugin.yaml +++ b/plugins/protocolbuffers/csharp/v28.3/buf.plugin.yaml @@ -12,7 +12,7 @@ registry: - base_namespace= nuget: target_frameworks: - - netstandard1.1 + - netstandard2.0 deps: - name: Google.Protobuf version: 3.28.3 diff --git a/plugins/protocolbuffers/csharp/v28.3/build.csproj b/plugins/protocolbuffers/csharp/v28.3/build.csproj index df69d3d87..88b3e73f5 100644 --- a/plugins/protocolbuffers/csharp/v28.3/build.csproj +++ b/plugins/protocolbuffers/csharp/v28.3/build.csproj @@ -1,6 +1,6 @@ - netstandard1.1 + netstandard2.0 From 1eb1b8889fd4f0dd879db4f1161bf0cbf6ebe668 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 08:54:32 -0500 Subject: [PATCH 11/23] Bump github.com/bufbuild/buf from 1.46.0 to 1.47.2 (#1594) --- go.mod | 10 ++++------ go.sum | 20 ++++++++------------ 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 38b496f55..339c26fb7 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.23.0 require ( aead.dev/minisign v0.3.0 - github.com/bufbuild/buf v1.46.0 + github.com/bufbuild/buf v1.47.2 github.com/google/go-containerregistry v0.20.2 github.com/google/go-github/v66 v66.0.0 github.com/hashicorp/go-retryablehttp v0.7.7 @@ -27,7 +27,7 @@ require ( github.com/docker/docker-credential-helpers v0.8.2 // indirect github.com/felixge/fgprof v0.9.5 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/pprof v0.0.0-20241023014458-598669927662 // indirect + github.com/google/pprof v0.0.0-20241101162523-b92577c0c142 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/klauspost/compress v1.17.11 // indirect @@ -42,8 +42,6 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/cobra v1.8.1 // indirect github.com/vbatts/tar-split v0.11.6 // indirect - go.uber.org/atomic v1.11.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.28.0 // indirect - golang.org/x/sys v0.26.0 // indirect + golang.org/x/crypto v0.29.0 // indirect + golang.org/x/sys v0.27.0 // indirect ) diff --git a/go.sum b/go.sum index 2b7972ab7..f5686a439 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ aead.dev/minisign v0.3.0 h1:8Xafzy5PEVZqYDNP60yJHARlW1eOQtsKNp/Ph2c0vRA= aead.dev/minisign v0.3.0/go.mod h1:NLvG3Uoq3skkRMDuc3YHpWUTMTrSExqm+Ij73W13F6Y= buf.build/go/spdx v0.2.0 h1:IItqM0/cMxvFJJumcBuP8NrsIzMs/UYjp/6WSpq8LTw= buf.build/go/spdx v0.2.0/go.mod h1:bXdwQFem9Si3nsbNy8aJKGPoaPi5DKwdeEp5/ArZ6w8= -github.com/bufbuild/buf v1.46.0 h1:QqlFiy2l0F+hhyTF9xm7j91E7ovGyZVnneG2y38F0rk= -github.com/bufbuild/buf v1.46.0/go.mod h1:oN16LKwdlgji2eHLn3R07dxnQjxm9Q0pdUor5VXj3H8= +github.com/bufbuild/buf v1.47.2 h1:fA5e2yVQGabxAz7W5aNbO7Fku1P6TpoHhjs1wER1pOc= +github.com/bufbuild/buf v1.47.2/go.mod h1:1Xd0QG0a1uCGk7cODUenpQ8E5l7bj2Ry9tnUfERm1YI= github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= github.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs= github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww= @@ -47,8 +47,8 @@ github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= -github.com/google/pprof v0.0.0-20241023014458-598669927662 h1:SKMkD83p7FwUqKmBsPdLHF5dNyxq3jOWwu9w9UyH5vA= -github.com/google/pprof v0.0.0-20241023014458-598669927662/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20241101162523-b92577c0c142 h1:sAGdeJj0bnMgUNVeUpp6AYlVdCt3/GdI3pGRqsNSQLs= +github.com/google/pprof v0.0.0-20241101162523-b92577c0c142/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= @@ -107,12 +107,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/vbatts/tar-split v0.11.6 h1:4SjTW5+PU11n6fZenf2IPoV8/tz3AaYHMWjf23envGs= github.com/vbatts/tar-split v0.11.6/go.mod h1:dqKNtesIOr2j2Qv3W/cHjnvk9I8+G7oAkFDFN6TCBEI= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= @@ -123,8 +119,8 @@ golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From 6f15a341f87280413539fc71e1f2825f04f9da81 Mon Sep 17 00:00:00 2001 From: "app-token-plugins[bot]" <116026991+app-token-plugins[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 08:56:46 -0500 Subject: [PATCH 12/23] Update grpc to v1.68.0 (#1593) --- plugins/grpc/cpp/v1.68.0/.dockerignore | 2 ++ plugins/grpc/cpp/v1.68.0/Dockerfile | 29 +++++++++++++++ plugins/grpc/cpp/v1.68.0/buf.plugin.yaml | 13 +++++++ plugins/grpc/csharp/v1.68.0/.dockerignore | 3 ++ plugins/grpc/csharp/v1.68.0/Dockerfile | 35 +++++++++++++++++++ plugins/grpc/csharp/v1.68.0/buf.plugin.yaml | 20 +++++++++++ plugins/grpc/csharp/v1.68.0/build.csproj | 9 +++++ plugins/grpc/objc/v1.68.0/.dockerignore | 2 ++ plugins/grpc/objc/v1.68.0/Dockerfile | 29 +++++++++++++++ plugins/grpc/objc/v1.68.0/buf.plugin.yaml | 11 ++++++ plugins/grpc/php/v1.68.0/.dockerignore | 2 ++ plugins/grpc/php/v1.68.0/Dockerfile | 29 +++++++++++++++ plugins/grpc/php/v1.68.0/buf.plugin.yaml | 11 ++++++ plugins/grpc/python/v1.68.0/.dockerignore | 2 ++ plugins/grpc/python/v1.68.0/Dockerfile | 29 +++++++++++++++ plugins/grpc/python/v1.68.0/buf.plugin.yaml | 19 ++++++++++ plugins/grpc/ruby/v1.68.0/.dockerignore | 2 ++ plugins/grpc/ruby/v1.68.0/Dockerfile | 29 +++++++++++++++ plugins/grpc/ruby/v1.68.0/buf.plugin.yaml | 11 ++++++ .../grpc/cpp/v1.68.0/eliza/plugin.sum | 1 + .../grpc/cpp/v1.68.0/petapis/plugin.sum | 1 + .../grpc/csharp/v1.68.0/eliza/plugin.sum | 1 + .../grpc/csharp/v1.68.0/petapis/plugin.sum | 1 + .../grpc/objc/v1.68.0/eliza/plugin.sum | 1 + .../grpc/objc/v1.68.0/petapis/plugin.sum | 1 + .../grpc/php/v1.68.0/eliza/plugin.sum | 1 + .../grpc/php/v1.68.0/petapis/plugin.sum | 1 + .../grpc/python/v1.68.0/eliza/plugin.sum | 1 + .../grpc/python/v1.68.0/petapis/plugin.sum | 1 + .../grpc/ruby/v1.68.0/eliza/plugin.sum | 1 + .../grpc/ruby/v1.68.0/petapis/plugin.sum | 1 + 31 files changed, 299 insertions(+) create mode 100644 plugins/grpc/cpp/v1.68.0/.dockerignore create mode 100644 plugins/grpc/cpp/v1.68.0/Dockerfile create mode 100644 plugins/grpc/cpp/v1.68.0/buf.plugin.yaml create mode 100644 plugins/grpc/csharp/v1.68.0/.dockerignore create mode 100644 plugins/grpc/csharp/v1.68.0/Dockerfile create mode 100644 plugins/grpc/csharp/v1.68.0/buf.plugin.yaml create mode 100644 plugins/grpc/csharp/v1.68.0/build.csproj create mode 100644 plugins/grpc/objc/v1.68.0/.dockerignore create mode 100644 plugins/grpc/objc/v1.68.0/Dockerfile create mode 100644 plugins/grpc/objc/v1.68.0/buf.plugin.yaml create mode 100644 plugins/grpc/php/v1.68.0/.dockerignore create mode 100644 plugins/grpc/php/v1.68.0/Dockerfile create mode 100644 plugins/grpc/php/v1.68.0/buf.plugin.yaml create mode 100644 plugins/grpc/python/v1.68.0/.dockerignore create mode 100644 plugins/grpc/python/v1.68.0/Dockerfile create mode 100644 plugins/grpc/python/v1.68.0/buf.plugin.yaml create mode 100644 plugins/grpc/ruby/v1.68.0/.dockerignore create mode 100644 plugins/grpc/ruby/v1.68.0/Dockerfile create mode 100644 plugins/grpc/ruby/v1.68.0/buf.plugin.yaml create mode 100644 tests/testdata/buf.build/grpc/cpp/v1.68.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/grpc/cpp/v1.68.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/grpc/csharp/v1.68.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/grpc/csharp/v1.68.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/grpc/objc/v1.68.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/grpc/objc/v1.68.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/grpc/php/v1.68.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/grpc/php/v1.68.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/grpc/python/v1.68.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/grpc/python/v1.68.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/grpc/ruby/v1.68.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/grpc/ruby/v1.68.0/petapis/plugin.sum diff --git a/plugins/grpc/cpp/v1.68.0/.dockerignore b/plugins/grpc/cpp/v1.68.0/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/grpc/cpp/v1.68.0/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/grpc/cpp/v1.68.0/Dockerfile b/plugins/grpc/cpp/v1.68.0/Dockerfile new file mode 100644 index 000000000..733a51bb8 --- /dev/null +++ b/plugins/grpc/cpp/v1.68.0/Dockerfile @@ -0,0 +1,29 @@ +# syntax=docker/dockerfile:1.10 +FROM debian:bookworm-20241111 AS build + +ARG TARGETARCH +ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true" + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip +RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.23.0/bazelisk-linux-${TARGETARCH} \ + && chmod +x /usr/local/bin/bazelisk \ + && mkdir /build \ + && chown nobody:nogroup /build \ + && usermod --home /build nobody + +USER nobody +WORKDIR /build + +RUN git clone --depth 1 --branch v1.68.0 https://github.com/grpc/grpc +WORKDIR /build/grpc +RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support +RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_cpp_plugin.stripped + +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_cpp_plugin . +USER nobody +ENTRYPOINT ["/grpc_cpp_plugin"] diff --git a/plugins/grpc/cpp/v1.68.0/buf.plugin.yaml b/plugins/grpc/cpp/v1.68.0/buf.plugin.yaml new file mode 100644 index 000000000..bb8c2cf54 --- /dev/null +++ b/plugins/grpc/cpp/v1.68.0/buf.plugin.yaml @@ -0,0 +1,13 @@ +version: v1 +name: buf.build/grpc/cpp +plugin_version: v1.68.0 +source_url: https://github.com/grpc/grpc +description: Generates C++ client and server stubs for the gRPC framework. +deps: + - plugin: buf.build/protocolbuffers/cpp:v28.3 +output_languages: + - cpp +spdx_license_id: Apache-2.0 +license_url: https://github.com/grpc/grpc/blob/v1.68.0/LICENSE +registry: + cmake: {} diff --git a/plugins/grpc/csharp/v1.68.0/.dockerignore b/plugins/grpc/csharp/v1.68.0/.dockerignore new file mode 100644 index 000000000..b2a42ae1e --- /dev/null +++ b/plugins/grpc/csharp/v1.68.0/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!build.csproj diff --git a/plugins/grpc/csharp/v1.68.0/Dockerfile b/plugins/grpc/csharp/v1.68.0/Dockerfile new file mode 100644 index 000000000..da7c8df91 --- /dev/null +++ b/plugins/grpc/csharp/v1.68.0/Dockerfile @@ -0,0 +1,35 @@ +# syntax=docker/dockerfile:1.10 +FROM debian:bookworm-20241111 AS build + +ARG TARGETARCH +ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true" + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip +RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.23.0/bazelisk-linux-${TARGETARCH} \ + && chmod +x /usr/local/bin/bazelisk \ + && mkdir /build \ + && chown nobody:nogroup /build \ + && usermod --home /build nobody + +USER nobody +WORKDIR /build + +RUN git clone --depth 1 --branch v1.68.0 https://github.com/grpc/grpc +WORKDIR /build/grpc +RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support +RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_csharp_plugin.stripped + +FROM mcr.microsoft.com/dotnet/sdk:8.0.404-bookworm-slim@sha256:f91f9181d68b5ed2c8dea199dbbd2f6d172e60bdc43f8a67878b1ad140cf8d6b AS dotnetrestore +WORKDIR /build +COPY --link ./build.csproj /build/build.csproj +RUN mkdir /nuget && dotnet restore --packages /nuget + +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=dotnetrestore /nuget /nuget +COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_csharp_plugin . +USER nobody +ENTRYPOINT ["/grpc_csharp_plugin"] diff --git a/plugins/grpc/csharp/v1.68.0/buf.plugin.yaml b/plugins/grpc/csharp/v1.68.0/buf.plugin.yaml new file mode 100644 index 000000000..6ae3071e6 --- /dev/null +++ b/plugins/grpc/csharp/v1.68.0/buf.plugin.yaml @@ -0,0 +1,20 @@ +version: v1 +name: buf.build/grpc/csharp +plugin_version: v1.68.0 +source_url: https://github.com/grpc/grpc +description: Generates C# client and server stubs for the gRPC framework. +deps: + - plugin: buf.build/protocolbuffers/csharp:v28.3 +output_languages: + - csharp +spdx_license_id: Apache-2.0 +license_url: https://github.com/grpc/grpc/blob/v1.68.0/LICENSE +registry: + opts: + - base_namespace= + nuget: + target_frameworks: + - netstandard2.0 + deps: + - name: Grpc.Net.Common + version: 2.66.0 diff --git a/plugins/grpc/csharp/v1.68.0/build.csproj b/plugins/grpc/csharp/v1.68.0/build.csproj new file mode 100644 index 000000000..06fced75e --- /dev/null +++ b/plugins/grpc/csharp/v1.68.0/build.csproj @@ -0,0 +1,9 @@ + + + netstandard2.0 + + + + + + diff --git a/plugins/grpc/objc/v1.68.0/.dockerignore b/plugins/grpc/objc/v1.68.0/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/grpc/objc/v1.68.0/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/grpc/objc/v1.68.0/Dockerfile b/plugins/grpc/objc/v1.68.0/Dockerfile new file mode 100644 index 000000000..70c5c1304 --- /dev/null +++ b/plugins/grpc/objc/v1.68.0/Dockerfile @@ -0,0 +1,29 @@ +# syntax=docker/dockerfile:1.10 +FROM debian:bookworm-20241111 AS build + +ARG TARGETARCH +ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true" + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip +RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.23.0/bazelisk-linux-${TARGETARCH} \ + && chmod +x /usr/local/bin/bazelisk \ + && mkdir /build \ + && chown nobody:nogroup /build \ + && usermod --home /build nobody + +USER nobody +WORKDIR /build + +RUN git clone --depth 1 --branch v1.68.0 https://github.com/grpc/grpc +WORKDIR /build/grpc +RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support +RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_objective_c_plugin.stripped + +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_objective_c_plugin . +USER nobody +ENTRYPOINT ["/grpc_objective_c_plugin"] diff --git a/plugins/grpc/objc/v1.68.0/buf.plugin.yaml b/plugins/grpc/objc/v1.68.0/buf.plugin.yaml new file mode 100644 index 000000000..1d9a24bcc --- /dev/null +++ b/plugins/grpc/objc/v1.68.0/buf.plugin.yaml @@ -0,0 +1,11 @@ +version: v1 +name: buf.build/grpc/objc +plugin_version: v1.68.0 +source_url: https://github.com/grpc/grpc +description: Generates Objective-C client and server stubs for the gRPC framework. +deps: + - plugin: buf.build/protocolbuffers/objc:v28.3 +output_languages: + - objective_c +spdx_license_id: Apache-2.0 +license_url: https://github.com/grpc/grpc/blob/v1.68.0/LICENSE diff --git a/plugins/grpc/php/v1.68.0/.dockerignore b/plugins/grpc/php/v1.68.0/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/grpc/php/v1.68.0/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/grpc/php/v1.68.0/Dockerfile b/plugins/grpc/php/v1.68.0/Dockerfile new file mode 100644 index 000000000..54fd37c35 --- /dev/null +++ b/plugins/grpc/php/v1.68.0/Dockerfile @@ -0,0 +1,29 @@ +# syntax=docker/dockerfile:1.10 +FROM debian:bookworm-20241111 AS build + +ARG TARGETARCH +ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true" + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip +RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.23.0/bazelisk-linux-${TARGETARCH} \ + && chmod +x /usr/local/bin/bazelisk \ + && mkdir /build \ + && chown nobody:nogroup /build \ + && usermod --home /build nobody + +USER nobody +WORKDIR /build + +RUN git clone --depth 1 --branch v1.68.0 https://github.com/grpc/grpc +WORKDIR /build/grpc +RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support +RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_php_plugin.stripped + +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_php_plugin . +USER nobody +ENTRYPOINT ["/grpc_php_plugin"] diff --git a/plugins/grpc/php/v1.68.0/buf.plugin.yaml b/plugins/grpc/php/v1.68.0/buf.plugin.yaml new file mode 100644 index 000000000..696270bf9 --- /dev/null +++ b/plugins/grpc/php/v1.68.0/buf.plugin.yaml @@ -0,0 +1,11 @@ +version: v1 +name: buf.build/grpc/php +plugin_version: v1.68.0 +source_url: https://github.com/grpc/grpc +description: Generates PHP client and server stubs for the gRPC framework. +deps: + - plugin: buf.build/protocolbuffers/php:v28.3 +output_languages: + - php +spdx_license_id: Apache-2.0 +license_url: https://github.com/grpc/grpc/blob/v1.68.0/LICENSE diff --git a/plugins/grpc/python/v1.68.0/.dockerignore b/plugins/grpc/python/v1.68.0/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/grpc/python/v1.68.0/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/grpc/python/v1.68.0/Dockerfile b/plugins/grpc/python/v1.68.0/Dockerfile new file mode 100644 index 000000000..ead525a48 --- /dev/null +++ b/plugins/grpc/python/v1.68.0/Dockerfile @@ -0,0 +1,29 @@ +# syntax=docker/dockerfile:1.10 +FROM debian:bookworm-20241111 AS build + +ARG TARGETARCH +ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true" + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip +RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.23.0/bazelisk-linux-${TARGETARCH} \ + && chmod +x /usr/local/bin/bazelisk \ + && mkdir /build \ + && chown nobody:nogroup /build \ + && usermod --home /build nobody + +USER nobody +WORKDIR /build + +RUN git clone --depth 1 --branch v1.68.0 https://github.com/grpc/grpc +WORKDIR /build/grpc +RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support +RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_python_plugin.stripped + +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_python_plugin . +USER nobody +ENTRYPOINT ["/grpc_python_plugin"] diff --git a/plugins/grpc/python/v1.68.0/buf.plugin.yaml b/plugins/grpc/python/v1.68.0/buf.plugin.yaml new file mode 100644 index 000000000..650f42e44 --- /dev/null +++ b/plugins/grpc/python/v1.68.0/buf.plugin.yaml @@ -0,0 +1,19 @@ +version: v1 +name: buf.build/grpc/python +plugin_version: v1.68.0 +source_url: https://github.com/grpc/grpc +description: Generates Python client and server stubs for the gRPC framework. +deps: + - plugin: buf.build/protocolbuffers/python:v28.3 +output_languages: + - python +spdx_license_id: Apache-2.0 +license_url: https://github.com/grpc/grpc/blob/v1.68.0/LICENSE +registry: + python: + package_type: "runtime" + # https://github.com/grpc/grpc/blob/v1.68.0/src/python/grpcio/python_version.py#L19 + requires_python: ">=3.8" + deps: + # https://pypi.org/project/grpcio/ + - "grpcio" diff --git a/plugins/grpc/ruby/v1.68.0/.dockerignore b/plugins/grpc/ruby/v1.68.0/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/grpc/ruby/v1.68.0/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/grpc/ruby/v1.68.0/Dockerfile b/plugins/grpc/ruby/v1.68.0/Dockerfile new file mode 100644 index 000000000..f16f0027a --- /dev/null +++ b/plugins/grpc/ruby/v1.68.0/Dockerfile @@ -0,0 +1,29 @@ +# syntax=docker/dockerfile:1.10 +FROM debian:bookworm-20241111 AS build + +ARG TARGETARCH +ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true" + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip +RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.23.0/bazelisk-linux-${TARGETARCH} \ + && chmod +x /usr/local/bin/bazelisk \ + && mkdir /build \ + && chown nobody:nogroup /build \ + && usermod --home /build nobody + +USER nobody +WORKDIR /build + +RUN git clone --depth 1 --branch v1.68.0 https://github.com/grpc/grpc +WORKDIR /build/grpc +RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support +RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_ruby_plugin.stripped + +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_ruby_plugin . +USER nobody +ENTRYPOINT ["/grpc_ruby_plugin"] diff --git a/plugins/grpc/ruby/v1.68.0/buf.plugin.yaml b/plugins/grpc/ruby/v1.68.0/buf.plugin.yaml new file mode 100644 index 000000000..a72a28a91 --- /dev/null +++ b/plugins/grpc/ruby/v1.68.0/buf.plugin.yaml @@ -0,0 +1,11 @@ +version: v1 +name: buf.build/grpc/ruby +plugin_version: v1.68.0 +source_url: https://github.com/grpc/grpc +description: Generates Ruby client and server stubs for the gRPC framework. +deps: + - plugin: buf.build/protocolbuffers/ruby:v28.3 +output_languages: + - ruby +spdx_license_id: Apache-2.0 +license_url: https://github.com/grpc/grpc/blob/v1.68.0/LICENSE diff --git a/tests/testdata/buf.build/grpc/cpp/v1.68.0/eliza/plugin.sum b/tests/testdata/buf.build/grpc/cpp/v1.68.0/eliza/plugin.sum new file mode 100644 index 000000000..11d7bae9c --- /dev/null +++ b/tests/testdata/buf.build/grpc/cpp/v1.68.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:+TEOhXAY3kEbot+Yi4zMrlVqpygzcZGd8rNsYRm1K/c= diff --git a/tests/testdata/buf.build/grpc/cpp/v1.68.0/petapis/plugin.sum b/tests/testdata/buf.build/grpc/cpp/v1.68.0/petapis/plugin.sum new file mode 100644 index 000000000..d1fd57a3e --- /dev/null +++ b/tests/testdata/buf.build/grpc/cpp/v1.68.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:QNggIsJlvPRCdsT8EEOrIhD3r6tTDrD6KOna3Fue4JE= diff --git a/tests/testdata/buf.build/grpc/csharp/v1.68.0/eliza/plugin.sum b/tests/testdata/buf.build/grpc/csharp/v1.68.0/eliza/plugin.sum new file mode 100644 index 000000000..956a52d4b --- /dev/null +++ b/tests/testdata/buf.build/grpc/csharp/v1.68.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:4waUym8vI0ZEOq/TtnJRKRUPmHk4QL8zPXRwJhywvI0= diff --git a/tests/testdata/buf.build/grpc/csharp/v1.68.0/petapis/plugin.sum b/tests/testdata/buf.build/grpc/csharp/v1.68.0/petapis/plugin.sum new file mode 100644 index 000000000..481fcb91a --- /dev/null +++ b/tests/testdata/buf.build/grpc/csharp/v1.68.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:kxBF97RNEQQiB/oEduqOgDZAxiXauyz+6hguxnCyP7I= diff --git a/tests/testdata/buf.build/grpc/objc/v1.68.0/eliza/plugin.sum b/tests/testdata/buf.build/grpc/objc/v1.68.0/eliza/plugin.sum new file mode 100644 index 000000000..4a8ce4e1b --- /dev/null +++ b/tests/testdata/buf.build/grpc/objc/v1.68.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:xH0+e+UVLoU5KFcWSB5RfrGIxbyztCgFOquLQjg2/ps= diff --git a/tests/testdata/buf.build/grpc/objc/v1.68.0/petapis/plugin.sum b/tests/testdata/buf.build/grpc/objc/v1.68.0/petapis/plugin.sum new file mode 100644 index 000000000..7a01cb23f --- /dev/null +++ b/tests/testdata/buf.build/grpc/objc/v1.68.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:P+OQBrxyTpehogGY3ZUlcIQ2pRq1iA9xpxjKXSN7u2E= diff --git a/tests/testdata/buf.build/grpc/php/v1.68.0/eliza/plugin.sum b/tests/testdata/buf.build/grpc/php/v1.68.0/eliza/plugin.sum new file mode 100644 index 000000000..350cc30e3 --- /dev/null +++ b/tests/testdata/buf.build/grpc/php/v1.68.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:gCX+94Y87fKbGc7nBkZ5sqxwMypA12/rrOdVb9YaOkY= diff --git a/tests/testdata/buf.build/grpc/php/v1.68.0/petapis/plugin.sum b/tests/testdata/buf.build/grpc/php/v1.68.0/petapis/plugin.sum new file mode 100644 index 000000000..2f2d65d31 --- /dev/null +++ b/tests/testdata/buf.build/grpc/php/v1.68.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:0h6mmZ/IPFQQD8Mq95Adum4ekVPiiZy05xjy3uqhI48= diff --git a/tests/testdata/buf.build/grpc/python/v1.68.0/eliza/plugin.sum b/tests/testdata/buf.build/grpc/python/v1.68.0/eliza/plugin.sum new file mode 100644 index 000000000..0208ffc62 --- /dev/null +++ b/tests/testdata/buf.build/grpc/python/v1.68.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:tzSa6/8xdKOIrF60gIktE2W8FbyoVb782wtuyK8wYcY= diff --git a/tests/testdata/buf.build/grpc/python/v1.68.0/petapis/plugin.sum b/tests/testdata/buf.build/grpc/python/v1.68.0/petapis/plugin.sum new file mode 100644 index 000000000..ca968829a --- /dev/null +++ b/tests/testdata/buf.build/grpc/python/v1.68.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:/bm8y8KHZ5OaVGv2GDuXQc1ADOO5BrN+KJXEJO4iMy0= diff --git a/tests/testdata/buf.build/grpc/ruby/v1.68.0/eliza/plugin.sum b/tests/testdata/buf.build/grpc/ruby/v1.68.0/eliza/plugin.sum new file mode 100644 index 000000000..d04ee7f9b --- /dev/null +++ b/tests/testdata/buf.build/grpc/ruby/v1.68.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:y47G0y23L+GoClu0Kfl4ZgiV++TIrlmPeBxw0sKANjA= diff --git a/tests/testdata/buf.build/grpc/ruby/v1.68.0/petapis/plugin.sum b/tests/testdata/buf.build/grpc/ruby/v1.68.0/petapis/plugin.sum new file mode 100644 index 000000000..7e7dee7f8 --- /dev/null +++ b/tests/testdata/buf.build/grpc/ruby/v1.68.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:jT5MBhIRa08sICxgjVvNAQgauC2GnD8G9OZ64P+N5gY= From 4429a225a39e13e97d698ccab08875afcd4933ec Mon Sep 17 00:00:00 2001 From: "Philip K. Warren" Date: Tue, 19 Nov 2024 08:41:39 -0600 Subject: [PATCH 13/23] Update community/stephenh-ts-proto to v2.3.0 (#1595) --- .../stephenh-ts-proto/v2.3.0/.dockerignore | 3 + .../stephenh-ts-proto/v2.3.0/Dockerfile | 19 ++++ .../stephenh-ts-proto/v2.3.0/buf.plugin.yaml | 10 +++ .../v2.3.0/package-lock.json | 87 +++++++++++++++++++ .../stephenh-ts-proto/v2.3.0/package.json | 7 ++ .../stephenh-ts-proto/v2.3.0/eliza/plugin.sum | 1 + .../v2.3.0/petapis/plugin.sum | 1 + 7 files changed, 128 insertions(+) create mode 100644 plugins/community/stephenh-ts-proto/v2.3.0/.dockerignore create mode 100644 plugins/community/stephenh-ts-proto/v2.3.0/Dockerfile create mode 100644 plugins/community/stephenh-ts-proto/v2.3.0/buf.plugin.yaml create mode 100644 plugins/community/stephenh-ts-proto/v2.3.0/package-lock.json create mode 100644 plugins/community/stephenh-ts-proto/v2.3.0/package.json create mode 100644 tests/testdata/buf.build/community/stephenh-ts-proto/v2.3.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/community/stephenh-ts-proto/v2.3.0/petapis/plugin.sum diff --git a/plugins/community/stephenh-ts-proto/v2.3.0/.dockerignore b/plugins/community/stephenh-ts-proto/v2.3.0/.dockerignore new file mode 100644 index 000000000..771bbbaa9 --- /dev/null +++ b/plugins/community/stephenh-ts-proto/v2.3.0/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!package*.json diff --git a/plugins/community/stephenh-ts-proto/v2.3.0/Dockerfile b/plugins/community/stephenh-ts-proto/v2.3.0/Dockerfile new file mode 100644 index 000000000..d1ff44719 --- /dev/null +++ b/plugins/community/stephenh-ts-proto/v2.3.0/Dockerfile @@ -0,0 +1,19 @@ +# syntax=docker/dockerfile:1.10 +FROM node:22.11.0-bookworm AS build +WORKDIR /app +COPY --link package*.json . +RUN npm ci +RUN sed -i -e 's|/usr/bin/env node|/nodejs/bin/node|g' /app/node_modules/ts-proto/protoc-gen-ts_proto \ + && rm -f /app/node_modules/dprint-node/*darwin*.node /app/node_modules/dprint-node/*win32*.node + +FROM gcr.io/distroless/nodejs22-debian12:latest@sha256:c218f62198d07fc67e36fff5639985f29b1bdcf04a601c1d23c0ab1121f55f0b AS node + +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=node --chmod=0755 /nodejs/bin/node /nodejs/bin/node +COPY --link --from=build /app /app +USER nobody +ENTRYPOINT ["/nodejs/bin/node"] +CMD [ "/app/node_modules/.bin/protoc-gen-ts_proto" ] diff --git a/plugins/community/stephenh-ts-proto/v2.3.0/buf.plugin.yaml b/plugins/community/stephenh-ts-proto/v2.3.0/buf.plugin.yaml new file mode 100644 index 000000000..59c0faa38 --- /dev/null +++ b/plugins/community/stephenh-ts-proto/v2.3.0/buf.plugin.yaml @@ -0,0 +1,10 @@ +version: v1 +name: buf.build/community/stephenh-ts-proto +plugin_version: v2.3.0 +source_url: https://github.com/stephenh/ts-proto +integration_guide_url: https://github.com/stephenh/ts-proto#quickstart +description: An idiomatic protobuf generator for TypeScript. +output_languages: + - typescript +spdx_license_id: Apache-2.0 +license_url: https://github.com/stephenh/ts-proto/blob/v2.3.0/LICENSE diff --git a/plugins/community/stephenh-ts-proto/v2.3.0/package-lock.json b/plugins/community/stephenh-ts-proto/v2.3.0/package-lock.json new file mode 100644 index 000000000..334d0b962 --- /dev/null +++ b/plugins/community/stephenh-ts-proto/v2.3.0/package-lock.json @@ -0,0 +1,87 @@ +{ + "name": "plugins-stephenh-ts-proto", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "plugins-stephenh-ts-proto", + "version": "1.0.0", + "dependencies": { + "ts-proto": "2.3.0" + } + }, + "node_modules/@bufbuild/protobuf": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.2.2.tgz", + "integrity": "sha512-UNtPCbrwrenpmrXuRwn9jYpPoweNXj8X5sMvYgsqYyaH8jQ6LfUJSk3dJLnBK+6sfYPrF4iAIo5sd5HQ+tg75A==", + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "node_modules/case-anything": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz", + "integrity": "sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==", + "license": "MIT", + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "license": "Apache-2.0", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dprint-node": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", + "integrity": "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==", + "license": "MIT", + "dependencies": { + "detect-libc": "^1.0.3" + } + }, + "node_modules/ts-poet": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.9.0.tgz", + "integrity": "sha512-roe6W6MeZmCjRmppyfOURklO5tQFQ6Sg7swURKkwYJvV7dbGCrK28um5+51iW3twdPRKtwarqFAVMU6G1mvnuQ==", + "license": "Apache-2.0", + "dependencies": { + "dprint-node": "^1.0.8" + } + }, + "node_modules/ts-proto": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-2.3.0.tgz", + "integrity": "sha512-dOkOa4gac9zhDFsHDtTRdcAJJRDorySWwGbNhpyxtZKbTnZOM2DlnCB390ZrjTOxtx6dOB4mjFmEUcgUtbwnaQ==", + "license": "ISC", + "dependencies": { + "@bufbuild/protobuf": "^2.0.0", + "case-anything": "^2.1.13", + "ts-poet": "^6.7.0", + "ts-proto-descriptors": "2.0.0" + }, + "bin": { + "protoc-gen-ts_proto": "protoc-gen-ts_proto" + } + }, + "node_modules/ts-proto-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-2.0.0.tgz", + "integrity": "sha512-wHcTH3xIv11jxgkX5OyCSFfw27agpInAd6yh89hKG6zqIXnjW9SYqSER2CVQxdPj4czeOhGagNvZBEbJPy7qkw==", + "license": "ISC", + "dependencies": { + "@bufbuild/protobuf": "^2.0.0" + } + } + } +} diff --git a/plugins/community/stephenh-ts-proto/v2.3.0/package.json b/plugins/community/stephenh-ts-proto/v2.3.0/package.json new file mode 100644 index 000000000..d1b47052b --- /dev/null +++ b/plugins/community/stephenh-ts-proto/v2.3.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "plugins-stephenh-ts-proto", + "version": "1.0.0", + "dependencies": { + "ts-proto": "2.3.0" + } +} diff --git a/tests/testdata/buf.build/community/stephenh-ts-proto/v2.3.0/eliza/plugin.sum b/tests/testdata/buf.build/community/stephenh-ts-proto/v2.3.0/eliza/plugin.sum new file mode 100644 index 000000000..04a167583 --- /dev/null +++ b/tests/testdata/buf.build/community/stephenh-ts-proto/v2.3.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:lTQoEljena4SJd63iBCJ/LbWcveGgRtwrb5mFskNn20= diff --git a/tests/testdata/buf.build/community/stephenh-ts-proto/v2.3.0/petapis/plugin.sum b/tests/testdata/buf.build/community/stephenh-ts-proto/v2.3.0/petapis/plugin.sum new file mode 100644 index 000000000..6d24373b2 --- /dev/null +++ b/tests/testdata/buf.build/community/stephenh-ts-proto/v2.3.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:4Pd/uU6S1+Gb6KLVUxBNKsRE17X9iReiiUMPUglixOM= From 10ad6cdafc0c8551429c5221e5755f4ed0db009d Mon Sep 17 00:00:00 2001 From: Michael Fridman Date: Wed, 20 Nov 2024 10:56:08 -0500 Subject: [PATCH 14/23] Deprecate connectrpc/es and connectrpc/query-es (#1597) --- plugins/bufbuild/connect-es/v0.13.0/buf.plugin.yaml | 2 +- plugins/bufbuild/connect-query/v0.4.1/buf.plugin.yaml | 2 +- plugins/bufbuild/es/v2.2.2/buf.plugin.yaml | 2 +- plugins/connectrpc/es/v1.6.1/buf.plugin.yaml | 3 ++- plugins/connectrpc/query-es/v1.4.2/buf.plugin.yaml | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/bufbuild/connect-es/v0.13.0/buf.plugin.yaml b/plugins/bufbuild/connect-es/v0.13.0/buf.plugin.yaml index a62412898..5593db5e9 100644 --- a/plugins/bufbuild/connect-es/v0.13.0/buf.plugin.yaml +++ b/plugins/bufbuild/connect-es/v0.13.0/buf.plugin.yaml @@ -2,7 +2,7 @@ version: v1 name: buf.build/bufbuild/connect-es plugin_version: v0.13.0 source_url: https://github.com/bufbuild/connect-es -description: Generates code that is compatible with browsers and Node.js for working with Connect, gRPC, and gRPC-Web. +description: Generates code that is compatible with browsers and Node.js for working with Connect, gRPC, and gRPC-Web. This plugin is deprecated because it has moved to the connectrpc org. deps: - plugin: buf.build/bufbuild/es:v1.3.0 output_languages: diff --git a/plugins/bufbuild/connect-query/v0.4.1/buf.plugin.yaml b/plugins/bufbuild/connect-query/v0.4.1/buf.plugin.yaml index 10f4da4c0..9d9cd0ce2 100644 --- a/plugins/bufbuild/connect-query/v0.4.1/buf.plugin.yaml +++ b/plugins/bufbuild/connect-query/v0.4.1/buf.plugin.yaml @@ -2,7 +2,7 @@ version: v1 name: buf.build/bufbuild/connect-query plugin_version: v0.4.1 source_url: https://github.com/bufbuild/connect-query -description: Generates client stubs for calling Connect services with TanStack Query. +description: Generates client stubs for calling Connect services with TanStack Query. This plugin is deprecated because it has moved to the connectrpc org. deps: - plugin: buf.build/bufbuild/es:v1.3.0 output_languages: diff --git a/plugins/bufbuild/es/v2.2.2/buf.plugin.yaml b/plugins/bufbuild/es/v2.2.2/buf.plugin.yaml index 061bf9485..62c29cd4d 100644 --- a/plugins/bufbuild/es/v2.2.2/buf.plugin.yaml +++ b/plugins/bufbuild/es/v2.2.2/buf.plugin.yaml @@ -3,7 +3,7 @@ name: buf.build/bufbuild/es plugin_version: v2.2.2 source_url: https://github.com/bufbuild/protobuf-es integration_guide_url: https://github.com/bufbuild/protobuf-es#quickstart -description: Base types for TypeScript/JavaScript for use in web browsers and Node.js. Generates message and enum types. +description: Types for TypeScript/JavaScript for use in web browsers and Node.js. Generates message and enum types, but also services for use with Connect v2. output_languages: - javascript - typescript diff --git a/plugins/connectrpc/es/v1.6.1/buf.plugin.yaml b/plugins/connectrpc/es/v1.6.1/buf.plugin.yaml index de275dd9e..7c80bdce0 100644 --- a/plugins/connectrpc/es/v1.6.1/buf.plugin.yaml +++ b/plugins/connectrpc/es/v1.6.1/buf.plugin.yaml @@ -3,7 +3,7 @@ name: buf.build/connectrpc/es plugin_version: v1.6.1 source_url: https://github.com/connectrpc/connect-es integration_guide_url: https://connectrpc.com/docs/web/getting-started -description: Generates code that is compatible with browsers and Node.js for working with Connect, gRPC, and gRPC-Web. +description: Generates code that is compatible with browsers and Node.js for working with Connect, gRPC, and gRPC-Web. This plugin is for Connect-ES v1. For Connect-ES v2, you'll only need the bufbuild/es plugin. deps: - plugin: buf.build/bufbuild/es:v1.10.0 output_languages: @@ -18,3 +18,4 @@ registry: version: ^1.6.1 spdx_license_id: Apache-2.0 license_url: https://github.com/connectrpc/connect-es/blob/v1.6.1/LICENSE +deprecated: true diff --git a/plugins/connectrpc/query-es/v1.4.2/buf.plugin.yaml b/plugins/connectrpc/query-es/v1.4.2/buf.plugin.yaml index 0f701a815..a5e504b09 100644 --- a/plugins/connectrpc/query-es/v1.4.2/buf.plugin.yaml +++ b/plugins/connectrpc/query-es/v1.4.2/buf.plugin.yaml @@ -3,7 +3,7 @@ name: buf.build/connectrpc/query-es plugin_version: v1.4.2 source_url: https://github.com/connectrpc/connect-query-es integration_guide_url: https://connectrpc.com/docs/web/query/getting-started -description: Generates client stubs for calling Connect services with TanStack Query. +description: Generates client stubs for calling Connect services with TanStack Query. This plugin is for Connect-ES v1. For Connect-ES v2, you'll only need the bufbuild/es plugin. deps: - plugin: buf.build/bufbuild/es:v1.10.0 output_languages: @@ -20,3 +20,4 @@ registry: version: ^v1.10.0 spdx_license_id: Apache-2.0 license_url: https://github.com/connectrpc/connect-query-es/blob/v1.4.2/LICENSE +deprecated: true From c3d99d85df584bec6c2796b985ac097a5fc28efd Mon Sep 17 00:00:00 2001 From: Michael Fridman Date: Wed, 20 Nov 2024 11:56:51 -0500 Subject: [PATCH 15/23] Add connectrpc/query-es v2.0.0 (#1598) --- .../query-es/v1.4.2/buf.plugin.yaml | 3 +- .../connectrpc/query-es/v2.0.0/.dockerignore | 3 + plugins/connectrpc/query-es/v2.0.0/Dockerfile | 21 + .../query-es/v2.0.0/buf.plugin.yaml | 22 + .../query-es/v2.0.0/package-lock.json | 537 ++++++++++++++++++ .../connectrpc/query-es/v2.0.0/package.json | 10 + .../query-es/v2.0.0/eliza/plugin.sum | 1 + .../query-es/v2.0.0/petapis/plugin.sum | 1 + 8 files changed, 596 insertions(+), 2 deletions(-) create mode 100644 plugins/connectrpc/query-es/v2.0.0/.dockerignore create mode 100644 plugins/connectrpc/query-es/v2.0.0/Dockerfile create mode 100644 plugins/connectrpc/query-es/v2.0.0/buf.plugin.yaml create mode 100644 plugins/connectrpc/query-es/v2.0.0/package-lock.json create mode 100644 plugins/connectrpc/query-es/v2.0.0/package.json create mode 100644 tests/testdata/buf.build/connectrpc/query-es/v2.0.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/connectrpc/query-es/v2.0.0/petapis/plugin.sum diff --git a/plugins/connectrpc/query-es/v1.4.2/buf.plugin.yaml b/plugins/connectrpc/query-es/v1.4.2/buf.plugin.yaml index a5e504b09..0f701a815 100644 --- a/plugins/connectrpc/query-es/v1.4.2/buf.plugin.yaml +++ b/plugins/connectrpc/query-es/v1.4.2/buf.plugin.yaml @@ -3,7 +3,7 @@ name: buf.build/connectrpc/query-es plugin_version: v1.4.2 source_url: https://github.com/connectrpc/connect-query-es integration_guide_url: https://connectrpc.com/docs/web/query/getting-started -description: Generates client stubs for calling Connect services with TanStack Query. This plugin is for Connect-ES v1. For Connect-ES v2, you'll only need the bufbuild/es plugin. +description: Generates client stubs for calling Connect services with TanStack Query. deps: - plugin: buf.build/bufbuild/es:v1.10.0 output_languages: @@ -20,4 +20,3 @@ registry: version: ^v1.10.0 spdx_license_id: Apache-2.0 license_url: https://github.com/connectrpc/connect-query-es/blob/v1.4.2/LICENSE -deprecated: true diff --git a/plugins/connectrpc/query-es/v2.0.0/.dockerignore b/plugins/connectrpc/query-es/v2.0.0/.dockerignore new file mode 100644 index 000000000..771bbbaa9 --- /dev/null +++ b/plugins/connectrpc/query-es/v2.0.0/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!package*.json diff --git a/plugins/connectrpc/query-es/v2.0.0/Dockerfile b/plugins/connectrpc/query-es/v2.0.0/Dockerfile new file mode 100644 index 000000000..df07a5455 --- /dev/null +++ b/plugins/connectrpc/query-es/v2.0.0/Dockerfile @@ -0,0 +1,21 @@ +# syntax=docker/dockerfile:1.10 +FROM node:22.11.0-bookworm AS build +WORKDIR /app +COPY --link package*.json . +RUN npm ci \ + && find node_modules/typescript ! -name 'typescript.js' ! -name 'package.json' -type f -exec rm -f {} + \ + && find node_modules/typescript -depth -type d -empty -delete \ + && ./node_modules/.bin/esbuild ./node_modules/.bin/protoc-gen-connect-query --bundle --external:typescript --platform=node --outfile=protoc-gen-connect-query.js + +FROM gcr.io/distroless/nodejs22-debian12:latest@sha256:c218f62198d07fc67e36fff5639985f29b1bdcf04a601c1d23c0ab1121f55f0b AS node + +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=node --chmod=0755 /nodejs/bin/node /nodejs/bin/node +COPY --link --from=build --chmod=0755 /app/protoc-gen-connect-query.js /app/protoc-gen-connect-query.js +COPY --link --from=build /app/node_modules/typescript /app/node_modules/typescript +USER nobody +ENTRYPOINT ["/nodejs/bin/node"] +CMD [ "/app/protoc-gen-connect-query.js" ] diff --git a/plugins/connectrpc/query-es/v2.0.0/buf.plugin.yaml b/plugins/connectrpc/query-es/v2.0.0/buf.plugin.yaml new file mode 100644 index 000000000..716dac9ae --- /dev/null +++ b/plugins/connectrpc/query-es/v2.0.0/buf.plugin.yaml @@ -0,0 +1,22 @@ +version: v1 +name: buf.build/connectrpc/query-es +plugin_version: v2.0.0 +source_url: https://github.com/connectrpc/connect-query-es +integration_guide_url: https://connectrpc.com/docs/web/query/getting-started +description: Generates stubs for calling Connect RPCs with TanStack Query. +deps: + - plugin: buf.build/bufbuild/es:v2.2.2 +output_languages: + - javascript + - typescript +registry: + npm: + import_style: module + rewrite_import_path_suffix: connectquery.js + deps: + - package: '@connectrpc/connect-query' + version: ^2.0.0 + - package: '@bufbuild/protobuf' + version: ^2.2.2 +spdx_license_id: Apache-2.0 +license_url: https://github.com/connectrpc/connect-query-es/blob/v2.0.0/LICENSE diff --git a/plugins/connectrpc/query-es/v2.0.0/package-lock.json b/plugins/connectrpc/query-es/v2.0.0/package-lock.json new file mode 100644 index 000000000..9506f3798 --- /dev/null +++ b/plugins/connectrpc/query-es/v2.0.0/package-lock.json @@ -0,0 +1,537 @@ +{ + "name": "plugins-connectrpc-query-es", + "version": "2.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "plugins-connectrpc-query-es", + "version": "2.0.0", + "dependencies": { + "@connectrpc/protoc-gen-connect-query": "2.0.0" + }, + "devDependencies": { + "esbuild": "^0.21.3" + } + }, + "node_modules/@bufbuild/protobuf": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.2.2.tgz", + "integrity": "sha512-UNtPCbrwrenpmrXuRwn9jYpPoweNXj8X5sMvYgsqYyaH8jQ6LfUJSk3dJLnBK+6sfYPrF4iAIo5sd5HQ+tg75A==", + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "node_modules/@bufbuild/protoplugin": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-2.2.2.tgz", + "integrity": "sha512-EKKrjBsA/F2l502PPWfmvx//qRJpOXpyDhwFOYSbwRYfqzEUuuNSb1A+YGE7iDxoEqxwo+len/CJny29iP1ESg==", + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "2.2.2", + "@typescript/vfs": "^1.5.2", + "typescript": "5.4.5" + } + }, + "node_modules/@connectrpc/protoc-gen-connect-query": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@connectrpc/protoc-gen-connect-query/-/protoc-gen-connect-query-2.0.0.tgz", + "integrity": "sha512-19L2C+E2JKmt+ZRXj0L2B/htCAJGLPDkg8p9zm0BNgAFaXRmAFiPE1yoozvX6QUVo4JvbEeHWBgoB566/ryN+w==", + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "^2.2.1", + "@bufbuild/protoplugin": "^2.2.1" + }, + "bin": { + "protoc-gen-connect-query": "bin/protoc-gen-connect-query" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@bufbuild/protoc-gen-es": "2.x" + }, + "peerDependenciesMeta": { + "@bufbuild/protoc-gen-es": { + "optional": true + } + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@typescript/vfs": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.0.tgz", + "integrity": "sha512-hvJUjNVeBMp77qPINuUvYXj4FyWeeMMKZkxEATEU3hqBAQ7qdTBCUFT7Sp0Zu0faeEtFf+ldXxMEDr/bk73ISg==", + "license": "MIT", + "dependencies": { + "debug": "^4.1.1" + }, + "peerDependencies": { + "typescript": "*" + } + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + } + } +} diff --git a/plugins/connectrpc/query-es/v2.0.0/package.json b/plugins/connectrpc/query-es/v2.0.0/package.json new file mode 100644 index 000000000..117b43c1f --- /dev/null +++ b/plugins/connectrpc/query-es/v2.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "plugins-connectrpc-query-es", + "version": "2.0.0", + "dependencies": { + "@connectrpc/protoc-gen-connect-query": "2.0.0" + }, + "devDependencies": { + "esbuild": "^0.21.3" + } +} diff --git a/tests/testdata/buf.build/connectrpc/query-es/v2.0.0/eliza/plugin.sum b/tests/testdata/buf.build/connectrpc/query-es/v2.0.0/eliza/plugin.sum new file mode 100644 index 000000000..2d2f6c6b5 --- /dev/null +++ b/tests/testdata/buf.build/connectrpc/query-es/v2.0.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:b6lto6bM27bcUbEjeyLk3OXj6c+TAb66gA2ZMmtHYSE= diff --git a/tests/testdata/buf.build/connectrpc/query-es/v2.0.0/petapis/plugin.sum b/tests/testdata/buf.build/connectrpc/query-es/v2.0.0/petapis/plugin.sum new file mode 100644 index 000000000..87bed3701 --- /dev/null +++ b/tests/testdata/buf.build/connectrpc/query-es/v2.0.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:bpPc1UYB2qVoZNlr8iNzttrtPDtglmC6vnBEOjYHGzY= From 3d91f23032e827359e23a1e210f88453fff2b9d7 Mon Sep 17 00:00:00 2001 From: Michael Fridman Date: Wed, 20 Nov 2024 12:48:22 -0500 Subject: [PATCH 16/23] Disable protoc-gen-connect-es updates (#1599) --- plugins/connectrpc/es/source.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/connectrpc/es/source.yaml b/plugins/connectrpc/es/source.yaml index ab51d01ba..7bb55366a 100644 --- a/plugins/connectrpc/es/source.yaml +++ b/plugins/connectrpc/es/source.yaml @@ -1,3 +1,6 @@ source: + # No more plugin updates + # See https://github.com/connectrpc/connect-es/blob/v2.0.0/MIGRATING.md#dependency-updates-in-packagejson for more information + disabled: true npm_registry: name: "@connectrpc/protoc-gen-connect-es" From 54d3f66bd49912ba3cbe0b0186e3b37af00cb166 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 09:12:52 -0600 Subject: [PATCH 17/23] Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#1601) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0.
Release notes

Sourced from github.com/stretchr/testify's releases.

v1.10.0

What's Changed

Functional Changes

Fixes

Documantation, Build & CI

New Contributors

... (truncated)

Commits
  • 89cbdd9 Merge pull request #1626 from arjun-1/fix-functional-options-diff-indirect-calls
  • 07bac60 Merge pull request #1667 from sikehish/flaky
  • 716de8d Increase timeouts in Test_Mock_Called_blocks to reduce flakiness in CI
  • 118fb83 NotSame should fail if args are not pointers #1661 (#1664)
  • 7d99b2b attempt 2
  • 05f87c0 more similar
  • ea7129e better fmt
  • a1b9c9e Merge pull request #1663 from ybrustin/master
  • 8302de9 Merge branch 'master' into master
  • 89352f7 Merge pull request #1518 from hendrywiranto/adjust-readme-remove-v2
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/stretchr/testify&package-manager=go_modules&previous-version=1.9.0&new-version=1.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 339c26fb7..66dd44cd1 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.7 github.com/sethvargo/go-envconfig v1.1.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 golang.org/x/mod v0.22.0 golang.org/x/oauth2 v0.24.0 golang.org/x/sync v0.9.0 diff --git a/go.sum b/go.sum index f5686a439..863a69ab5 100644 --- a/go.sum +++ b/go.sum @@ -103,8 +103,8 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/vbatts/tar-split v0.11.6 h1:4SjTW5+PU11n6fZenf2IPoV8/tz3AaYHMWjf23envGs= github.com/vbatts/tar-split v0.11.6/go.mod h1:dqKNtesIOr2j2Qv3W/cHjnvk9I8+G7oAkFDFN6TCBEI= golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= From 2f49d4a1f7a0297f5c2a40cf49eeb424308ef07f Mon Sep 17 00:00:00 2001 From: Michael Fridman Date: Tue, 26 Nov 2024 12:15:03 -0500 Subject: [PATCH 18/23] Update grpc-ecosystem plugins to v2.24.0 (#1602) Fix #1600 --- .../gateway/v2.24.0/.dockerignore | 3 + .../grpc-ecosystem/gateway/v2.24.0/Dockerfile | 21 + .../gateway/v2.24.0/buf.plugin.yaml | 23 + .../separate_pkg_additional_imports.patch | 778 ++++++++++++++++++ .../openapiv2/v2.24.0/.dockerignore | 2 + .../openapiv2/v2.24.0/Dockerfile | 17 + .../openapiv2/v2.24.0/buf.plugin.yaml | 7 + .../gateway/v2.24.0/eliza/plugin.sum | 1 + .../gateway/v2.24.0/grpc-gateway/plugin.sum | 1 + .../gateway/v2.24.0/petapis/plugin.sum | 1 + .../openapiv2/v2.24.0/eliza/plugin.sum | 1 + .../openapiv2/v2.24.0/petapis/plugin.sum | 1 + 12 files changed, 856 insertions(+) create mode 100644 plugins/grpc-ecosystem/gateway/v2.24.0/.dockerignore create mode 100644 plugins/grpc-ecosystem/gateway/v2.24.0/Dockerfile create mode 100644 plugins/grpc-ecosystem/gateway/v2.24.0/buf.plugin.yaml create mode 100644 plugins/grpc-ecosystem/gateway/v2.24.0/separate_pkg_additional_imports.patch create mode 100644 plugins/grpc-ecosystem/openapiv2/v2.24.0/.dockerignore create mode 100644 plugins/grpc-ecosystem/openapiv2/v2.24.0/Dockerfile create mode 100644 plugins/grpc-ecosystem/openapiv2/v2.24.0/buf.plugin.yaml create mode 100644 tests/testdata/buf.build/grpc-ecosystem/gateway/v2.24.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/grpc-ecosystem/gateway/v2.24.0/grpc-gateway/plugin.sum create mode 100644 tests/testdata/buf.build/grpc-ecosystem/gateway/v2.24.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/grpc-ecosystem/openapiv2/v2.24.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/grpc-ecosystem/openapiv2/v2.24.0/petapis/plugin.sum diff --git a/plugins/grpc-ecosystem/gateway/v2.24.0/.dockerignore b/plugins/grpc-ecosystem/gateway/v2.24.0/.dockerignore new file mode 100644 index 000000000..12458999e --- /dev/null +++ b/plugins/grpc-ecosystem/gateway/v2.24.0/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!separate_pkg_additional_imports.patch diff --git a/plugins/grpc-ecosystem/gateway/v2.24.0/Dockerfile b/plugins/grpc-ecosystem/gateway/v2.24.0/Dockerfile new file mode 100644 index 000000000..b7708e862 --- /dev/null +++ b/plugins/grpc-ecosystem/gateway/v2.24.0/Dockerfile @@ -0,0 +1,21 @@ +# syntax=docker/dockerfile:1.10 +FROM --platform=$BUILDPLATFORM golang:1.23.3-bookworm AS build + +ARG TARGETOS TARGETARCH +ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH + +WORKDIR /tmp +RUN git clone --depth 1 --branch v2.24.0 https://github.com/grpc-ecosystem/grpc-gateway.git +COPY --link separate_pkg_additional_imports.patch /tmp/separate_pkg_additional_imports.patch +WORKDIR /tmp/grpc-gateway +RUN git apply /tmp/separate_pkg_additional_imports.patch +WORKDIR /tmp/grpc-gateway/protoc-gen-grpc-gateway +RUN --mount=type=cache,target=/go/pkg/mod \ + go install -ldflags="-s -w" -trimpath \ + && mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-grpc-gateway /go/bin/protoc-gen-grpc-gateway || true + +FROM scratch +COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd +COPY --from=build --link --chown=root:root /go/bin/protoc-gen-grpc-gateway / +USER nobody +ENTRYPOINT [ "/protoc-gen-grpc-gateway" ] diff --git a/plugins/grpc-ecosystem/gateway/v2.24.0/buf.plugin.yaml b/plugins/grpc-ecosystem/gateway/v2.24.0/buf.plugin.yaml new file mode 100644 index 000000000..bedc9088c --- /dev/null +++ b/plugins/grpc-ecosystem/gateway/v2.24.0/buf.plugin.yaml @@ -0,0 +1,23 @@ +version: v1 +name: buf.build/grpc-ecosystem/gateway +plugin_version: v2.24.0 +source_url: https://github.com/grpc-ecosystem/grpc-gateway +integration_guide_url: https://github.com/grpc-ecosystem/grpc-gateway#usage +description: gRPC to JSON proxy generator following the gRPC HTTP spec. +output_languages: + - go +registry: + go: + min_version: "1.22" + deps: + - module: github.com/grpc-ecosystem/grpc-gateway/v2 + version: v2.24.0 + opts: + - paths=source_relative + - standalone=true + - separate_package=true +deps: + - plugin: buf.build/protocolbuffers/go:v1.35.2 + - plugin: buf.build/grpc/go:v1.5.1 +spdx_license_id: BSD-3-Clause +license_url: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.24.0/LICENSE.txt diff --git a/plugins/grpc-ecosystem/gateway/v2.24.0/separate_pkg_additional_imports.patch b/plugins/grpc-ecosystem/gateway/v2.24.0/separate_pkg_additional_imports.patch new file mode 100644 index 000000000..b2635a84a --- /dev/null +++ b/plugins/grpc-ecosystem/gateway/v2.24.0/separate_pkg_additional_imports.patch @@ -0,0 +1,778 @@ +diff --git a/internal/descriptor/buf_build.go b/internal/descriptor/buf_build.go +new file mode 100644 +index 00000000..f2e1e13c +--- /dev/null ++++ b/internal/descriptor/buf_build.go +@@ -0,0 +1,63 @@ ++package descriptor ++ ++import ( ++ "path/filepath" ++ "strings" ++) ++ ++const ( ++ BaseTypePackageSubPath = baseTypePackageName + "/go" ++ // TODO: change "v2" to "v3" when v3 of grpc gateway is released, ++ // or, even better, stop generating at the extra location. ++ GatewayPackageSubPath = "grpc-ecosystem/gateway/v2" ++) ++ ++const ( ++ baseTypePackageName = "protocolbuffers" ++ grpcPackageName = "grpc" ++ grpcPackageSubPath = grpcPackageName + "/go" ++) ++ ++// SetSeparatePackage sets separatePackage ++func (r *Registry) SetSeparatePackage(use bool) { ++ r.separatePackage = use ++} ++ ++// IncludeAdditionalImports adds additionalImports to the registry on a per-package basis ++func (r *Registry) IncludeAdditionalImports(svc *Service, goPkg GoPackage) { ++ if !r.separatePackage { ++ return ++ } ++ if r.additionalImports == nil { ++ r.additionalImports = make(map[string][]string) ++ } ++ // when generating a separate package for the gateway, we need to generate an import statement ++ // for the gRPC stubs that are no longer in the same package. This is done by adding the grpc ++ // package to the additionalImports list. In order to prepare a valid import statement, we'll replace ++ // the source package name, something like: ../pet/v1/v1petgateway with ../pet/v1/v1petgrpc ++ ++ packageName := strings.TrimSuffix(goPkg.Name, "gateway") + grpcPackageName ++ svc.GRPCFile = &File{ ++ GoPkg: GoPackage{ ++ // additionally, as the `go_package` option is passed through from the generator, and can only be ++ // set the one time, without making major changes, we'll use the package name sent through the ++ // options as a basis, and replace the source package name with the grpc package name. ++ Path: strings.Replace( ++ filepath.Join(goPkg.Path, packageName), ++ BaseTypePackageSubPath, ++ grpcPackageSubPath, ++ 1, ++ ), ++ Name: strings.Replace(packageName, BaseTypePackageSubPath, grpcPackageSubPath, 1), ++ }, ++ } ++ r.additionalImports[goPkg.Path] = append(r.additionalImports[goPkg.Path], svc.GRPCFile.GoPkg.Path) ++} ++ ++// GetAdditionalImports returns additionalImports ++func (r *Registry) GetAdditionalImports(goPkg GoPackage) []string { ++ if !r.separatePackage || r.additionalImports == nil { ++ return nil ++ } ++ return r.additionalImports[goPkg.Path] ++} +diff --git a/internal/descriptor/registry.go b/internal/descriptor/registry.go +index 99ed9e25..41c1f852 100644 +--- a/internal/descriptor/registry.go ++++ b/internal/descriptor/registry.go +@@ -157,6 +157,13 @@ type Registry struct { + // allowPatchFeature determines whether to use PATCH feature involving update masks (using google.protobuf.FieldMask). + allowPatchFeature bool + ++ // separatePackage determines whether to output the generated code into a separate package. ++ separatePackage bool ++ ++ // additionalImports is a list of additional imports to be added to the generated code. ++ // N.B. additional imports is not a flag option ++ additionalImports map[string][]string ++ + // preserveRPCOrder, if true, will ensure the order of paths emitted in openapi swagger files mirror + // the order of RPC methods found in proto files. If false, emitted paths will be ordered alphabetically. + preserveRPCOrder bool +@@ -267,6 +274,9 @@ func (r *Registry) loadFile(filePath string, file *protogen.File) { + pkg.Alias = "ext" + cases.Title(language.AmericanEnglish).String(pkg.Name) + } + ++ if r.separatePackage { ++ pkg.Name += "gateway" ++ } + if err := r.ReserveGoPackageAlias(pkg.Name, pkg.Path); err != nil { + for i := 0; ; i++ { + alias := fmt.Sprintf("%s_%d", pkg.Name, i) +diff --git a/internal/descriptor/services.go b/internal/descriptor/services.go +index ad1764ce..ae58f7e3 100644 +--- a/internal/descriptor/services.go ++++ b/internal/descriptor/services.go +@@ -29,6 +29,7 @@ func (r *Registry) loadServices(file *File) error { + ServiceDescriptorProto: sd, + ForcePrefixedName: r.standalone, + } ++ r.IncludeAdditionalImports(svc, file.GoPkg) + for _, md := range sd.GetMethod() { + if grpclog.V(2) { + grpclog.Infof("Processing %s.%s", sd.GetName(), md.GetName()) +diff --git a/internal/descriptor/types.go b/internal/descriptor/types.go +index 5a43472b..c0c02966 100644 +--- a/internal/descriptor/types.go ++++ b/internal/descriptor/types.go +@@ -164,6 +164,9 @@ type Service struct { + *descriptorpb.ServiceDescriptorProto + // File is the file where this service is defined. + File *File ++ // GRPCFile is the file where this service's gRPC stubs are defined. ++ // This is nil if the service's gRPC stubs are defined alongside the messages. ++ GRPCFile *File + // Methods is the list of methods defined in this service. + Methods []*Method + // ForcePrefixedName when set to true, prefixes a type with a package prefix. +@@ -173,7 +176,9 @@ type Service struct { + // FQSN returns the fully qualified service name of this service. + func (s *Service) FQSN() string { + components := []string{""} +- if s.File.Package != nil { ++ if s.GRPCFile != nil && s.GRPCFile.GetPackage() != "" { ++ components = append(components, s.GRPCFile.GetPackage()) ++ } else if s.File.Package != nil { + components = append(components, s.File.GetPackage()) + } + components = append(components, s.GetName()) +@@ -185,7 +190,11 @@ func (s *Service) InstanceName() string { + if !s.ForcePrefixedName { + return s.GetName() + } +- return fmt.Sprintf("%s.%s", s.File.Pkg(), s.GetName()) ++ pkg := s.File.Pkg() ++ if s.GRPCFile != nil { ++ pkg = s.GRPCFile.Pkg() ++ } ++ return fmt.Sprintf("%s.%s", pkg, s.GetName()) + } + + // ClientConstructorName returns name of the Client constructor with package prefix if needed +@@ -194,7 +203,11 @@ func (s *Service) ClientConstructorName() string { + if !s.ForcePrefixedName { + return constructor + } +- return fmt.Sprintf("%s.%s", s.File.Pkg(), constructor) ++ pkg := s.File.Pkg() ++ if s.GRPCFile != nil { ++ pkg = s.GRPCFile.Pkg() ++ } ++ return fmt.Sprintf("%s.%s", pkg, constructor) + } + + // Method wraps descriptorpb.MethodDescriptorProto for richer features. +diff --git a/protoc-gen-grpc-gateway/internal/gengateway/generator.go b/protoc-gen-grpc-gateway/internal/gengateway/generator.go +index 819cbf55..a2160896 100644 +--- a/protoc-gen-grpc-gateway/internal/gengateway/generator.go ++++ b/protoc-gen-grpc-gateway/internal/gengateway/generator.go +@@ -5,6 +5,7 @@ import ( + "fmt" + "go/format" + "path" ++ "strings" + + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" + gen "github.com/grpc-ecosystem/grpc-gateway/v2/internal/generator" +@@ -22,11 +23,18 @@ type generator struct { + registerFuncSuffix string + allowPatchFeature bool + standalone bool ++ separatePackage bool + } + + // New returns a new generator which generates grpc gateway files. +-func New(reg *descriptor.Registry, useRequestContext bool, registerFuncSuffix string, +- allowPatchFeature, standalone bool) gen.Generator { ++func New( ++ reg *descriptor.Registry, ++ useRequestContext bool, ++ registerFuncSuffix string, ++ allowPatchFeature bool, ++ standalone bool, ++ separatePackage bool, ++) gen.Generator { + var imports []descriptor.GoPackage + for _, pkgpath := range []string{ + "context", +@@ -66,6 +74,7 @@ func New(reg *descriptor.Registry, useRequestContext bool, registerFuncSuffix st + registerFuncSuffix: registerFuncSuffix, + allowPatchFeature: allowPatchFeature, + standalone: standalone, ++ separatePackage: separatePackage, + } + } + +@@ -76,7 +85,7 @@ func (g *generator) Generate(targets []*descriptor.File) ([]*descriptor.Response + grpclog.Infof("Processing %s", file.GetName()) + } + +- code, err := g.generate(file) ++ code, err := g.generate(file, nil) + if errors.Is(err, errNoTargetService) { + if grpclog.V(1) { + grpclog.Infof("%s: %v", file.GetName(), err) +@@ -91,10 +100,64 @@ func (g *generator) Generate(targets []*descriptor.File) ([]*descriptor.Response + grpclog.Errorf("%v: %s", err, code) + return nil, err + } ++ if !g.separatePackage { ++ files = append(files, &descriptor.ResponseFile{ ++ GoPkg: file.GoPkg, ++ CodeGeneratorResponse_File: &pluginpb.CodeGeneratorResponse_File{ ++ Name: proto.String(file.GeneratedFilenamePrefix + ".pb.gw.go"), ++ Content: proto.String(string(formatted)), ++ }, ++ }) ++ continue ++ } ++ goPkg := descriptor.GoPackage{ ++ Path: path.Join(file.GoPkg.Path, file.GoPkg.Name), ++ Name: file.GoPkg.Name, ++ } ++ fileNamePrefix := path.Join(path.Dir(file.GeneratedFilenamePrefix), file.GoPkg.Name, path.Base(file.GeneratedFilenamePrefix)) + files = append(files, &descriptor.ResponseFile{ +- GoPkg: file.GoPkg, ++ GoPkg: goPkg, + CodeGeneratorResponse_File: &pluginpb.CodeGeneratorResponse_File{ +- Name: proto.String(file.GeneratedFilenamePrefix + ".pb.gw.go"), ++ Name: proto.String(fileNamePrefix + ".pb.gw.go"), ++ Content: proto.String(string(formatted)), ++ }, ++ }) ++ // There was a bug where we include an extra path element (the filename), resulting ++ // in a stuttering import path. Fixing this bug cannot involve removing the Go file ++ // generated at the wrong path, because that would be a breaking change. ++ // ++ // Instead, we generate the same file both at the right path and at the wrong path, ++ // marking the file (its package) at the wrong path as deprecated. ++ // ++ // If gateway has a new major version, we should then stop generating at the wrong path. ++ aliasedPackage := &descriptor.GoPackage{ ++ // When generating for generated SDK, the original goPkg points to code generated by "protocolbuffers/go", ++ // but we are aliasing to a package generated by "grpc-ecosystem/gateway". ++ Path: strings.Replace(goPkg.Path, "/"+descriptor.BaseTypePackageSubPath, "/"+descriptor.GatewayPackageSubPath, 1), ++ Name: goPkg.Name, ++ Alias: "gateway", ++ } ++ code, err = g.generate(file, aliasedPackage) ++ if errors.Is(err, errNoTargetService) { ++ if grpclog.V(1) { ++ grpclog.Infof("%s: %v", file.GetName(), err) ++ } ++ continue ++ } ++ if err != nil { ++ return nil, err ++ } ++ formatted, err = format.Source([]byte(code)) ++ if err != nil { ++ grpclog.Errorf("%v: %s", err, code) ++ return nil, err ++ } ++ // The prefix is incorrect, but we are still generating it for backwards compatibility. ++ fileNamePrefix = path.Join(file.GeneratedFilenamePrefix, file.GoPkg.Name, path.Base(file.GeneratedFilenamePrefix)) ++ files = append(files, &descriptor.ResponseFile{ ++ GoPkg: goPkg, ++ CodeGeneratorResponse_File: &pluginpb.CodeGeneratorResponse_File{ ++ Name: proto.String(fileNamePrefix + ".pb.gw.go"), + Content: proto.String(string(formatted)), + }, + }) +@@ -102,7 +165,7 @@ func (g *generator) Generate(targets []*descriptor.File) ([]*descriptor.Response + return files, nil + } + +-func (g *generator) generate(file *descriptor.File) (string, error) { ++func (g *generator) generate(file *descriptor.File, aliasedPkg *descriptor.GoPackage) (string, error) { + pkgSeen := make(map[string]bool) + var imports []descriptor.GoPackage + for _, pkg := range g.baseImports { +@@ -110,6 +173,14 @@ func (g *generator) generate(file *descriptor.File) (string, error) { + imports = append(imports, pkg) + } + ++ for _, additionalImport := range g.reg.GetAdditionalImports(file.GoPkg) { ++ elems := strings.Split(additionalImport, "/") ++ imports = append(imports, descriptor.GoPackage{ ++ Path: additionalImport, ++ Name: elems[len(elems)-1], ++ }) ++ } ++ + if g.standalone { + imports = append(imports, file.GoPkg) + } +@@ -127,6 +198,7 @@ func (g *generator) generate(file *descriptor.File) (string, error) { + } + } + params := param{ ++ AliasedPkg: aliasedPkg, + File: file, + Imports: imports, + UseRequestContext: g.useRequestContext, +diff --git a/protoc-gen-grpc-gateway/internal/gengateway/generator_test.go b/protoc-gen-grpc-gateway/internal/gengateway/generator_test.go +index 2c5fe023..02d3a000 100644 +--- a/protoc-gen-grpc-gateway/internal/gengateway/generator_test.go ++++ b/protoc-gen-grpc-gateway/internal/gengateway/generator_test.go +@@ -1,6 +1,9 @@ + package gengateway + + import ( ++ "fmt" ++ "path/filepath" ++ "strings" + "testing" + + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" +@@ -75,6 +78,18 @@ func newExampleFileDescriptorWithGoPkg(gp *descriptor.GoPackage, filenamePrefix + } + } + ++func newExampleFileDescriptorWithGoPkgWithoutBinding(gp *descriptor.GoPackage, filenamePrefix string) *descriptor.File { ++ file := newExampleFileDescriptorWithGoPkg(gp, filenamePrefix) ++ for _, service := range file.Services { ++ for _, method := range service.Methods { ++ if method != nil { ++ method.Bindings = nil ++ } ++ } ++ } ++ return file ++} ++ + func TestGenerator_Generate(t *testing.T) { + g := new(generator) + g.reg = descriptor.NewRegistry() +@@ -96,3 +111,232 @@ func TestGenerator_Generate(t *testing.T) { + t.Fatalf("invalid name %q, expected %q", gotName, expectedName) + } + } ++ ++func TestGenerator_GenerateSeparatePackage(t *testing.T) { ++ reg := descriptor.NewRegistry() ++ reg.SetSeparatePackage(true) ++ reg.SetStandalone(true) ++ g := New(reg, true, "Handler", true, true, true) ++ targets := []*descriptor.File{ ++ crossLinkFixture(newExampleFileDescriptorWithGoPkg(&descriptor.GoPackage{ ++ Path: "example.com/mymodule/foo/bar/v1", ++ Name: "v1" + "gateway", // Name is appended with "gateway" with standalone set to true. ++ Alias: "extalias", ++ }, "foo/bar/v1/example")), ++ } ++ // Set ForcePrefixedName (usually set when standalone=true). ++ for _, f := range targets { ++ for _, msg := range f.Messages { ++ msg.ForcePrefixedName = true ++ for _, field := range msg.Fields { ++ field.ForcePrefixedName = true ++ } ++ } ++ for _, enum := range f.Enums { ++ enum.ForcePrefixedName = true ++ } ++ for _, svc := range f.Services { ++ packageName := strings.TrimSuffix(svc.File.GoPkg.Name, "gateway") + "grpc" ++ svc.ForcePrefixedName = true ++ // replicates behavior in internal/descriptor/services.go (loadServices) ++ svc.GRPCFile = &descriptor.File{ ++ GoPkg: descriptor.GoPackage{ ++ Path: strings.Replace( ++ filepath.Join(svc.File.GoPkg.Path, packageName), ++ "protocolbuffers/go", ++ "grpc/go", ++ 1, ++ ), ++ Name: strings.Replace(packageName, "protocolbuffers/go", "grpc/go", 1), ++ }, ++ } ++ reg.IncludeAdditionalImports(svc, f.GoPkg) ++ } ++ } ++ result, err := g.Generate(targets) ++ if err != nil { ++ t.Fatalf("failed to generate stubs: %v", err) ++ } ++ if len(result) != 2 { ++ t.Fatalf("expected to generate 2 files, got: %d", len(result)) ++ } ++ expectedName := "foo/bar/v1/v1gateway/example.pb.gw.go" ++ expectedGoPkgPath := "example.com/mymodule/foo/bar/v1/v1gateway" ++ expectedGoPkgName := "v1gateway" ++ correctFile := result[0] ++ if correctFile == nil { ++ t.Fatal("result is nil") ++ } ++ if correctFile.GetName() != expectedName { ++ t.Errorf("invalid name %q, expected %q", correctFile.GetName(), expectedName) ++ } ++ if correctFile.GoPkg.Path != expectedGoPkgPath { ++ t.Errorf("invalid path %q, expected %q", result[0].GoPkg.Path, expectedGoPkgPath) ++ } ++ if correctFile.GoPkg.Name != expectedGoPkgName { ++ t.Errorf("invalid name %q, expected %q", result[0].GoPkg.Name, expectedGoPkgName) ++ } ++ // Require the two dependencies to be declared as imported packages ++ correctFileContent := correctFile.GetContent() ++ for _, expectedImport := range []string{ ++ `extalias "example.com/mymodule/foo/bar/v1"`, ++ `"example.com/mymodule/foo/bar/v1/v1grpc"`, ++ } { ++ if !strings.Contains(correctFileContent, expectedImport) { ++ t.Errorf("expected to find import %q in the generated file: %s", expectedImport, correctFileContent[:400]) ++ } ++ } ++ ++ expectedName = "foo/bar/v1/example/v1gateway/example.pb.gw.go" ++ // wrong path but correct go package ++ aliasFile := result[1] ++ if aliasFile == nil { ++ t.Fatal("result is nil") ++ } ++ if aliasFile.GetName() != expectedName { ++ t.Errorf("invalid name %q, expected %q", aliasFile.GetName(), expectedName) ++ } ++ if aliasFile.GoPkg.Path != expectedGoPkgPath { ++ t.Errorf("invalid path %q, expected %q", aliasFile.GoPkg.Path, expectedGoPkgPath) ++ } ++ if aliasFile.GoPkg.Name != expectedGoPkgName { ++ t.Errorf("invalid name %q, expected %q", aliasFile.GoPkg.Name, expectedGoPkgName) ++ } ++ aliasFileContent := aliasFile.GetContent() ++ // Require the two dependencies to be declared as imported packages ++ expectedImport := `gateway "example.com/mymodule/foo/bar/v1/v1gateway"` ++ if !strings.Contains(aliasFileContent, expectedImport) { ++ t.Errorf("expected to find import %q in the generated file: %s...", expectedImport, aliasFileContent[:500]) ++ } ++ aliasedFunctions := []string{ ++ "RegisterExampleServiceHandlerServer", ++ "RegisterExampleServiceHandlerClient", ++ "RegisterExampleServiceHandlerFromEndpoint", ++ "RegisterExampleServiceHandler", ++ } ++ for _, aliasedFunction := range aliasedFunctions { ++ aliasDefinition := fmt.Sprintf("%[1]s = gateway.%[1]s", aliasedFunction) ++ if !strings.Contains(aliasFileContent, aliasDefinition) { ++ t.Fatalf("expected %q in the alias file: %s", aliasDefinition, aliasFileContent) ++ } ++ if strings.Contains(correctFileContent, aliasDefinition) { ++ t.Fatalf("unexpected alias %q in the correct file: %s", aliasDefinition, correctFileContent) ++ } ++ } ++} ++ ++func TestGenerator_GenerateSeparatePackage_WithoutBinding(t *testing.T) { ++ reg := descriptor.NewRegistry() ++ reg.SetSeparatePackage(true) ++ reg.SetStandalone(true) ++ g := New(reg, true, "Handler", true, true, true) ++ targets := []*descriptor.File{ ++ crossLinkFixture(newExampleFileDescriptorWithGoPkgWithoutBinding(&descriptor.GoPackage{ ++ Path: "example.com/mymodule/foo/bar/v1", ++ Name: "v1" + "gateway", ++ Alias: "extalias", ++ }, "foo/bar/v1/example")), ++ } ++ result, err := g.Generate(targets) ++ if err != nil { ++ t.Fatalf("failed to generate stubs: %v", err) ++ } ++ if len(result) != 0 { ++ t.Fatalf("expected to generate 0 file, got: %d", len(result)) ++ } ++} ++ ++func TestGenerator_GenerateSeparatePackage_WithOmitPackageDoc_Local(t *testing.T) { ++ reg := descriptor.NewRegistry() ++ reg.SetSeparatePackage(true) ++ reg.SetStandalone(true) ++ reg.SetOmitPackageDoc(true) ++ g := New(reg, true, "Handler", true, true, true) ++ targets := []*descriptor.File{ ++ crossLinkFixture(newExampleFileDescriptorWithGoPkg(&descriptor.GoPackage{ ++ Path: "example.com/mymodule/foo/bar/v1", ++ Name: "v1" + "gateway", ++ Alias: "extalias", ++ }, "foo/bar/v1/example")), ++ } ++ result, err := g.Generate(targets) ++ if err != nil { ++ t.Fatalf("failed to generate stubs: %v", err) ++ } ++ if len(result) != 2 { ++ t.Fatalf("expected to generate 2 files, got: %d", len(result)) ++ } ++ correctFileContent := result[0].GetContent() ++ if strings.Contains(correctFileContent, "Deprecated:") { ++ t.Errorf("the correct file should not be deprecated: %s...", correctFileContent[:500]) ++ } ++ deprecationDoc := `/* ++Deprecated: This package has moved to "example.com/mymodule/foo/bar/v1/v1gateway". Use that import path instead. ++*/` ++ aliasFileContent := result[1].GetContent() ++ // Even though omit_package_doc is set, we still need to deprecate the package. ++ if !strings.Contains(aliasFileContent, deprecationDoc) { ++ t.Errorf("expected to find deprecation doc in the alias file: %s...", aliasFileContent[:500]) ++ } ++} ++ ++func TestGenerator_GenerateSeparatePackage_WithOmitPackageDoc_Generate_SDK(t *testing.T) { ++ reg := descriptor.NewRegistry() ++ reg.SetSeparatePackage(true) ++ reg.SetStandalone(true) ++ reg.SetOmitPackageDoc(true) ++ g := New(reg, true, "Handler", true, true, true) ++ targets := []*descriptor.File{ ++ crossLinkFixture(newExampleFileDescriptorWithGoPkg(&descriptor.GoPackage{ ++ Path: "example.com/gen/go/owner/module/protocolbuffers/go/foo/bar/v1", ++ Name: "v1" + "gateway", ++ Alias: "extalias", ++ }, "foo/bar/v1/example")), ++ } ++ result, err := g.Generate(targets) ++ if err != nil { ++ t.Fatalf("failed to generate stubs: %v", err) ++ } ++ if len(result) != 2 { ++ t.Fatalf("expected to generate 2 files, got: %d", len(result)) ++ } ++ correctFileContent := result[0].GetContent() ++ if strings.Contains(correctFileContent, "Deprecated:") { ++ t.Errorf("the correct file should not be deprecated: %s...", correctFileContent[:500]) ++ } ++ deprecationDoc := `/* ++Deprecated: This package has moved to "example.com/gen/go/owner/module/grpc-ecosystem/gateway/v2/foo/bar/v1/v1gateway". Use that import path instead. ++*/` ++ aliasFileContent := result[1].GetContent() ++ // Even though omit_package_doc is set, we still need to deprecate the package. ++ if !strings.Contains(aliasFileContent, deprecationDoc) { ++ t.Errorf("expected to find deprecation doc in the alias file: %s...", aliasFileContent[:500]) ++ } ++} ++ ++func TestGenerator_GenerateSeparatePackage_WithoutService(t *testing.T) { ++ reg := descriptor.NewRegistry() ++ reg.SetSeparatePackage(true) ++ reg.SetStandalone(true) ++ g := New(reg, true, "Handler", true, true, true) ++ targets := []*descriptor.File{ ++ { ++ FileDescriptorProto: &descriptorpb.FileDescriptorProto{ ++ Name: proto.String("example.proto"), ++ Package: proto.String("example"), ++ }, ++ GoPkg: descriptor.GoPackage{ ++ Path: "foo/bar/baz/gen/v1", ++ Name: "v1", ++ }, ++ GeneratedFilenamePrefix: "gen/v1/example", ++ }, ++ } ++ result, err := g.Generate(targets) ++ if err != nil { ++ t.Fatalf("failed to generate stubs: %v", err) ++ } ++ if len(result) != 0 { ++ t.Fatalf("expected to generate 0 file, got: %d", len(result)) ++ } ++} +diff --git a/protoc-gen-grpc-gateway/internal/gengateway/template.go b/protoc-gen-grpc-gateway/internal/gengateway/template.go +index 090a3290..410060ae 100644 +--- a/protoc-gen-grpc-gateway/internal/gengateway/template.go ++++ b/protoc-gen-grpc-gateway/internal/gengateway/template.go +@@ -16,6 +16,7 @@ import ( + + type param struct { + *descriptor.File ++ AliasedPkg *descriptor.GoPackage + Imports []descriptor.GoPackage + UseRequestContext bool + RegisterFuncSuffix string +@@ -144,6 +145,7 @@ func (f queryParamFilter) String() string { + } + + type trailerParams struct { ++ AliasedPkg *descriptor.GoPackage + Services []*descriptor.Service + UseRequestContext bool + RegisterFuncSuffix string +@@ -173,11 +175,14 @@ func applyTemplate(p param, reg *descriptor.Registry) (string, error) { + methName := casing.Camel(*meth.Name) + meth.Name = &methName + for _, b := range meth.Bindings { ++ methodWithBindingsSeen = true ++ if p.AliasedPkg != nil { ++ break ++ } + if err := reg.CheckDuplicateAnnotation(b.HTTPMethod, b.PathTmpl.Template, svc); err != nil { + return "", err + } + +- methodWithBindingsSeen = true + if err := handlerTemplate.Execute(w, binding{ + Binding: b, + Registry: reg, +@@ -205,6 +210,7 @@ func applyTemplate(p param, reg *descriptor.Registry) (string, error) { + } + + tp := trailerParams{ ++ AliasedPkg: p.AliasedPkg, + Services: targetServices, + UseRequestContext: p.UseRequestContext, + RegisterFuncSuffix: p.RegisterFuncSuffix, +@@ -240,8 +246,19 @@ var ( + Package {{ .GoPkg.Name }} is a reverse proxy. + + It translates gRPC into RESTful JSON APIs. ++{{if $.AliasedPkg}} ++Deprecated: This package has moved to "{{$.AliasedPkg.Path}}". Use that import path instead. ++{{- end}} ++*/ ++{{- else if $.AliasedPkg}} ++/* ++Deprecated: This package has moved to "{{$.AliasedPkg.Path}}". Use that import path instead. ++*/ + */{{ end }} + package {{ .GoPkg.Name }} ++{{- if $.AliasedPkg}} ++import {{$.AliasedPkg}} ++{{- else}} + import ( + {{ range $i := .Imports }}{{ if $i.Standard }}{{ $i | printf "%s\n" }}{{ end }}{{ end }} + +@@ -258,6 +275,7 @@ var ( + _ = utilities.NewDoubleArray + _ = metadata.Join + ) ++{{- end}} + `)) + + handlerTemplate = template.Must(template.New("handler").Parse(` +@@ -624,6 +642,9 @@ func local_request_{{ .Method.Service.GetName }}_{{ .Method.GetName }}_{{ .Index + }`)) + + localTrailerTemplate = template.Must(template.New("local-trailer").Funcs(funcMap).Parse(` ++{{- if $.AliasedPkg }} ++var ( ++{{- end }} + {{ $UseRequestContext := .UseRequestContext }} + {{ range $svc := .Services }} + // Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}Server registers the http handlers for service {{ $svc.GetName }} to "mux". +@@ -631,6 +652,9 @@ func local_request_{{ .Method.Service.GetName }}_{{ .Method.GetName }}_{{ .Index + // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. + // Note that using this registration option will cause many gRPC library features to stop working. Consider using Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}FromEndpoint instead. + // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. ++{{- if $.AliasedPkg}} ++ Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}Server = {{$.AliasedPkg.Alias}}.Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}Server ++{{- else}} + func Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}Server(ctx context.Context, mux *runtime.ServeMux, server {{ $svc.InstanceName }}Server) error { + {{- range $m := $svc.Methods }} + {{- range $b := $m.Bindings }} +@@ -679,6 +703,7 @@ func Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}Server(ctx context.Cont + {{- end }} + return nil + } ++{{end}} + {{ end }}`)) + + trailerTemplate = template.Must(template.New("trailer").Funcs(funcMap).Parse(` +@@ -686,6 +711,9 @@ func Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}Server(ctx context.Cont + {{range $svc := .Services}} + // Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}FromEndpoint is same as Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }} but + // automatically dials to "endpoint" and closes the connection when "ctx" gets done. ++{{- if $.AliasedPkg}} ++ Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}FromEndpoint = {{$.AliasedPkg.Alias}}.Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}FromEndpoint ++{{- else}} + func Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}FromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { +@@ -707,18 +735,26 @@ func Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}FromEndpoint(ctx contex + }() + return Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}(ctx, mux, conn) + } ++{{- end}} + + // Register{{ $svc.GetName}}{{ $.RegisterFuncSuffix}} registers the http handlers for service {{ $svc.GetName }} to "mux". + // The handlers forward requests to the grpc endpoint over "conn". ++{{- if $.AliasedPkg}} ++ Register{{$svc.GetName}}{{$.RegisterFuncSuffix}} = {{$.AliasedPkg.Alias}}.Register{{$svc.GetName}}{{$.RegisterFuncSuffix}} ++{{- else}} + func Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}Client(ctx, mux, {{ $svc.ClientConstructorName }}(conn)) + } ++{{- end}} + + // Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}Client registers the http handlers for service {{ $svc.GetName }} + // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "{{ $svc.InstanceName }}Client". + // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "{{ $svc.InstanceName }}Client" + // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in + // "{{ $svc.InstanceName }}Client" to call the correct interceptors. This client ignores the HTTP middlewares. ++{{- if $.AliasedPkg}} ++ Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}Client = {{$.AliasedPkg.Alias}}.Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}Client ++{{- else}} + func Register{{ $svc.GetName }}{{ $.RegisterFuncSuffix }}Client(ctx context.Context, mux *runtime.ServeMux, client {{ $svc.InstanceName }}Client) error { + {{- range $m := $svc.Methods }} + {{- range $b := $m.Bindings }} +@@ -809,5 +845,9 @@ var ( + {{- end }} + {{- end }} + ) +-{{ end }}`)) ++{{end}} ++{{end}} ++{{- if $.AliasedPkg}} ++) ++{{- end}}`)) + ) +diff --git a/protoc-gen-grpc-gateway/main.go b/protoc-gen-grpc-gateway/main.go +index 086a4624..5f65b894 100644 +--- a/protoc-gen-grpc-gateway/main.go ++++ b/protoc-gen-grpc-gateway/main.go +@@ -10,6 +10,7 @@ + package main + + import ( ++ "errors" + "flag" + "fmt" + "os" +@@ -36,6 +37,7 @@ var ( + versionFlag = flag.Bool("version", false, "print the current version") + warnOnUnboundMethods = flag.Bool("warn_on_unbound_methods", false, "emit a warning message if an RPC method has no HttpRule annotation") + generateUnboundMethods = flag.Bool("generate_unbound_methods", false, "generate proxy methods even for RPC methods that have no HttpRule annotation") ++ separatePackage = flag.Bool("separate_package", false, "generate gateway code to v1gateway package (requires standalone=true).") + + _ = flag.Bool("logtostderr", false, "Legacy glog compatibility. This flag is a no-op, you can safely remove it") + ) +@@ -73,15 +75,22 @@ func main() { + ParamFunc: flag.CommandLine.Set, + }.Run(func(gen *protogen.Plugin) error { + reg := descriptor.NewRegistry() +- + if err := applyFlags(reg); err != nil { + return err + } +- ++ if *separatePackage && !*standalone { ++ return errors.New("option separate_package=true must be specified with standalone=true") ++ } ++ generator := gengateway.New( ++ reg, ++ *useRequestContext, ++ *registerFuncSuffix, ++ *allowPatchFeature, ++ *standalone, ++ *separatePackage, ++ ) + codegenerator.SetSupportedFeaturesOnPluginGen(gen) + +- generator := gengateway.New(reg, *useRequestContext, *registerFuncSuffix, *allowPatchFeature, *standalone) +- + if grpclog.V(1) { + grpclog.Infof("Parsing code generator request") + } +@@ -135,6 +144,7 @@ func applyFlags(reg *descriptor.Registry) error { + } + reg.SetStandalone(*standalone) + reg.SetAllowDeleteBody(*allowDeleteBody) ++ reg.SetSeparatePackage(*separatePackage) + + flag.Visit(func(f *flag.Flag) { + if f.Name == "allow_repeated_fields_in_body" { diff --git a/plugins/grpc-ecosystem/openapiv2/v2.24.0/.dockerignore b/plugins/grpc-ecosystem/openapiv2/v2.24.0/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/grpc-ecosystem/openapiv2/v2.24.0/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/grpc-ecosystem/openapiv2/v2.24.0/Dockerfile b/plugins/grpc-ecosystem/openapiv2/v2.24.0/Dockerfile new file mode 100644 index 000000000..9ce7a8fe1 --- /dev/null +++ b/plugins/grpc-ecosystem/openapiv2/v2.24.0/Dockerfile @@ -0,0 +1,17 @@ +# syntax=docker/dockerfile:1.10 +FROM --platform=$BUILDPLATFORM golang:1.23.3-bookworm AS build + +ARG TARGETOS TARGETARCH +ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH + +FROM golang:1.23.3-bookworm AS build +RUN --mount=type=cache,target=/go/pkg/mod \ + CGO_ENABLED=0 \ + go install -ldflags="-s -w" -trimpath github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.24.0 \ + && mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-openapiv2 /go/bin/protoc-gen-openapiv2 || true + +FROM scratch +COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd +COPY --from=build --link /go/bin/protoc-gen-openapiv2 / +USER nobody +ENTRYPOINT [ "/protoc-gen-openapiv2" ] diff --git a/plugins/grpc-ecosystem/openapiv2/v2.24.0/buf.plugin.yaml b/plugins/grpc-ecosystem/openapiv2/v2.24.0/buf.plugin.yaml new file mode 100644 index 000000000..3df5b0f43 --- /dev/null +++ b/plugins/grpc-ecosystem/openapiv2/v2.24.0/buf.plugin.yaml @@ -0,0 +1,7 @@ +version: v1 +name: buf.build/grpc-ecosystem/openapiv2 +plugin_version: v2.24.0 +source_url: https://github.com/grpc-ecosystem/grpc-gateway +description: Generates OpenAPI definitions for Protobuf services. +spdx_license_id: BSD-3-Clause +license_url: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.24.0/LICENSE.txt diff --git a/tests/testdata/buf.build/grpc-ecosystem/gateway/v2.24.0/eliza/plugin.sum b/tests/testdata/buf.build/grpc-ecosystem/gateway/v2.24.0/eliza/plugin.sum new file mode 100644 index 000000000..7d9c0f31d --- /dev/null +++ b/tests/testdata/buf.build/grpc-ecosystem/gateway/v2.24.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= diff --git a/tests/testdata/buf.build/grpc-ecosystem/gateway/v2.24.0/grpc-gateway/plugin.sum b/tests/testdata/buf.build/grpc-ecosystem/gateway/v2.24.0/grpc-gateway/plugin.sum new file mode 100644 index 000000000..2244228ca --- /dev/null +++ b/tests/testdata/buf.build/grpc-ecosystem/gateway/v2.24.0/grpc-gateway/plugin.sum @@ -0,0 +1 @@ +h1:GFLDxXT2WmGviWG2h8He1zxs7Z68Sl+Gylv/IBgQvu0= diff --git a/tests/testdata/buf.build/grpc-ecosystem/gateway/v2.24.0/petapis/plugin.sum b/tests/testdata/buf.build/grpc-ecosystem/gateway/v2.24.0/petapis/plugin.sum new file mode 100644 index 000000000..7d9c0f31d --- /dev/null +++ b/tests/testdata/buf.build/grpc-ecosystem/gateway/v2.24.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= diff --git a/tests/testdata/buf.build/grpc-ecosystem/openapiv2/v2.24.0/eliza/plugin.sum b/tests/testdata/buf.build/grpc-ecosystem/openapiv2/v2.24.0/eliza/plugin.sum new file mode 100644 index 000000000..06875f679 --- /dev/null +++ b/tests/testdata/buf.build/grpc-ecosystem/openapiv2/v2.24.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:i/zjVkZaxoFgKQESrbFwisCaDNzRLPWmUND0XCR+IlI= diff --git a/tests/testdata/buf.build/grpc-ecosystem/openapiv2/v2.24.0/petapis/plugin.sum b/tests/testdata/buf.build/grpc-ecosystem/openapiv2/v2.24.0/petapis/plugin.sum new file mode 100644 index 000000000..7b9624ad7 --- /dev/null +++ b/tests/testdata/buf.build/grpc-ecosystem/openapiv2/v2.24.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:SybfdW8LTRLCVcNSux9/dP9iFEQFhWbADwdaILiM0EY= From 905a24e35d24a234dd0523945d52bea4ba328d92 Mon Sep 17 00:00:00 2001 From: Michael Fridman Date: Tue, 26 Nov 2024 12:52:15 -0500 Subject: [PATCH 19/23] Disable protoc-gen-bq-schema sync (#1604) --- plugins/googlecloudplatform/bq-schema/source.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/googlecloudplatform/bq-schema/source.yaml b/plugins/googlecloudplatform/bq-schema/source.yaml index 08382499b..45b4b5f55 100644 --- a/plugins/googlecloudplatform/bq-schema/source.yaml +++ b/plugins/googlecloudplatform/bq-schema/source.yaml @@ -1,4 +1,7 @@ source: + # Disabled until we have a proper release + # See: https://github.com/GoogleCloudPlatform/protoc-gen-bq-schema/pull/52 + disabled: true github: owner: GoogleCloudPlatform repository: protoc-gen-bq-schema From a0a79d39aeb42ebe2a108952bb1e5dc339a5dc14 Mon Sep 17 00:00:00 2001 From: Michael Fridman Date: Tue, 26 Nov 2024 14:36:46 -0500 Subject: [PATCH 20/23] Add protoc-gen-bq-schema v2.0.1 (#1605) --- plugins/googlecloudplatform/bq-schema/source.yaml | 3 --- .../bq-schema/v2.0.1/.dockerignore | 2 ++ .../bq-schema/v2.0.1/Dockerfile | 15 +++++++++++++++ .../bq-schema/v2.0.1/buf.plugin.yaml | 7 +++++++ .../bq-schema/v2.0.1/bq-schema/plugin.sum | 1 + .../bq-schema/v2.0.1/eliza/plugin.sum | 1 + .../bq-schema/v2.0.1/petapis/plugin.sum | 1 + 7 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 plugins/googlecloudplatform/bq-schema/v2.0.1/.dockerignore create mode 100644 plugins/googlecloudplatform/bq-schema/v2.0.1/Dockerfile create mode 100644 plugins/googlecloudplatform/bq-schema/v2.0.1/buf.plugin.yaml create mode 100644 tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/bq-schema/plugin.sum create mode 100644 tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/petapis/plugin.sum diff --git a/plugins/googlecloudplatform/bq-schema/source.yaml b/plugins/googlecloudplatform/bq-schema/source.yaml index 45b4b5f55..08382499b 100644 --- a/plugins/googlecloudplatform/bq-schema/source.yaml +++ b/plugins/googlecloudplatform/bq-schema/source.yaml @@ -1,7 +1,4 @@ source: - # Disabled until we have a proper release - # See: https://github.com/GoogleCloudPlatform/protoc-gen-bq-schema/pull/52 - disabled: true github: owner: GoogleCloudPlatform repository: protoc-gen-bq-schema diff --git a/plugins/googlecloudplatform/bq-schema/v2.0.1/.dockerignore b/plugins/googlecloudplatform/bq-schema/v2.0.1/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/googlecloudplatform/bq-schema/v2.0.1/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/googlecloudplatform/bq-schema/v2.0.1/Dockerfile b/plugins/googlecloudplatform/bq-schema/v2.0.1/Dockerfile new file mode 100644 index 000000000..0f9b0a040 --- /dev/null +++ b/plugins/googlecloudplatform/bq-schema/v2.0.1/Dockerfile @@ -0,0 +1,15 @@ +# syntax=docker/dockerfile:1.10 +FROM --platform=$BUILDPLATFORM golang:1.23.3-bookworm AS build + +ARG TARGETOS TARGETARCH +ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH + +RUN --mount=type=cache,target=/go/pkg/mod \ + go install -ldflags="-s -w" -trimpath github.com/GoogleCloudPlatform/protoc-gen-bq-schema/v2@v2.0.1 \ + && mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-bq-schema /go/bin/protoc-gen-bq-schema || true + +FROM scratch +COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd +COPY --from=build --link /go/bin/protoc-gen-bq-schema / +USER nobody +ENTRYPOINT [ "/protoc-gen-bq-schema", "-logtostderr=true" ] diff --git a/plugins/googlecloudplatform/bq-schema/v2.0.1/buf.plugin.yaml b/plugins/googlecloudplatform/bq-schema/v2.0.1/buf.plugin.yaml new file mode 100644 index 000000000..d42125afd --- /dev/null +++ b/plugins/googlecloudplatform/bq-schema/v2.0.1/buf.plugin.yaml @@ -0,0 +1,7 @@ +version: v1 +name: buf.build/googlecloudplatform/bq-schema +plugin_version: v2.0.1 +source_url: https://github.com/GoogleCloudPlatform/protoc-gen-bq-schema +description: A plugin to convert Protobuf messages into JSON schema files for BigQuery. +spdx_license_id: Apache-2.0 +license_url: https://github.com/GoogleCloudPlatform/protoc-gen-bq-schema/blob/v2.0.1/LICENSE diff --git a/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/bq-schema/plugin.sum b/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/bq-schema/plugin.sum new file mode 100644 index 000000000..799ae9ed7 --- /dev/null +++ b/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/bq-schema/plugin.sum @@ -0,0 +1 @@ +h1:lNkjrxnPqxLv2yMj/Uk+MEnZXimFsus4qjt9W9Ys/aI= diff --git a/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/eliza/plugin.sum b/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/eliza/plugin.sum new file mode 100644 index 000000000..7d9c0f31d --- /dev/null +++ b/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/eliza/plugin.sum @@ -0,0 +1 @@ +h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= diff --git a/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/petapis/plugin.sum b/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/petapis/plugin.sum new file mode 100644 index 000000000..7d9c0f31d --- /dev/null +++ b/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/petapis/plugin.sum @@ -0,0 +1 @@ +h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= From a411150ed2c90b7c0ec62803baa2c2931f3e89cb Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 26 Nov 2024 15:50:05 -0500 Subject: [PATCH 21/23] Squash layers and update images --- plugins/protocolbuffers/cpp/v25.1/Dockerfile | 7 +++++-- plugins/protocolbuffers/cpp/v26.1/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v27.0/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v27.1/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v27.2/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v27.3/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v27.4/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v28.0/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v28.1/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v28.2/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v28.3/Dockerfile | 2 +- 11 files changed, 15 insertions(+), 12 deletions(-) diff --git a/plugins/protocolbuffers/cpp/v25.1/Dockerfile b/plugins/protocolbuffers/cpp/v25.1/Dockerfile index 418a2d37b..819671047 100644 --- a/plugins/protocolbuffers/cpp/v25.1/Dockerfile +++ b/plugins/protocolbuffers/cpp/v25.1/Dockerfile @@ -20,7 +20,10 @@ COPY --link disable_cpp_editions.patch . RUN git apply < disable_cpp_editions.patch \ && bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian11 -COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . USER nobody ENTRYPOINT ["/protoc-gen-cpp"] diff --git a/plugins/protocolbuffers/cpp/v26.1/Dockerfile b/plugins/protocolbuffers/cpp/v26.1/Dockerfile index c8b1ece04..306f22879 100644 --- a/plugins/protocolbuffers/cpp/v26.1/Dockerfile +++ b/plugins/protocolbuffers/cpp/v26.1/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:3b75fdd33932d16e53a461277becf57c4f815c6cee5f6bc8f52457c095e004c8 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --link --from=base / / diff --git a/plugins/protocolbuffers/cpp/v27.0/Dockerfile b/plugins/protocolbuffers/cpp/v27.0/Dockerfile index cb35851f8..0ebfd9381 100644 --- a/plugins/protocolbuffers/cpp/v27.0/Dockerfile +++ b/plugins/protocolbuffers/cpp/v27.0/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:e1065a1d58800a7294f74e67c32ec4146d09d6cbe471c1fa7ed456b2d2bf06e0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v27.1/Dockerfile b/plugins/protocolbuffers/cpp/v27.1/Dockerfile index 6f158773f..bd4559ec3 100644 --- a/plugins/protocolbuffers/cpp/v27.1/Dockerfile +++ b/plugins/protocolbuffers/cpp/v27.1/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:e1065a1d58800a7294f74e67c32ec4146d09d6cbe471c1fa7ed456b2d2bf06e0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v27.2/Dockerfile b/plugins/protocolbuffers/cpp/v27.2/Dockerfile index ba342d6f7..224426581 100644 --- a/plugins/protocolbuffers/cpp/v27.2/Dockerfile +++ b/plugins/protocolbuffers/cpp/v27.2/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:e1065a1d58800a7294f74e67c32ec4146d09d6cbe471c1fa7ed456b2d2bf06e0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v27.3/Dockerfile b/plugins/protocolbuffers/cpp/v27.3/Dockerfile index 2e12e061a..7e4bc5158 100644 --- a/plugins/protocolbuffers/cpp/v27.3/Dockerfile +++ b/plugins/protocolbuffers/cpp/v27.3/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:3b75fdd33932d16e53a461277becf57c4f815c6cee5f6bc8f52457c095e004c8 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v27.4/Dockerfile b/plugins/protocolbuffers/cpp/v27.4/Dockerfile index 6094217f8..fc1962406 100644 --- a/plugins/protocolbuffers/cpp/v27.4/Dockerfile +++ b/plugins/protocolbuffers/cpp/v27.4/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:3b75fdd33932d16e53a461277becf57c4f815c6cee5f6bc8f52457c095e004c8 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v28.0/Dockerfile b/plugins/protocolbuffers/cpp/v28.0/Dockerfile index bae5e789a..0ba0129b9 100644 --- a/plugins/protocolbuffers/cpp/v28.0/Dockerfile +++ b/plugins/protocolbuffers/cpp/v28.0/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:3b75fdd33932d16e53a461277becf57c4f815c6cee5f6bc8f52457c095e004c8 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v28.1/Dockerfile b/plugins/protocolbuffers/cpp/v28.1/Dockerfile index 56b8b366d..add6742fa 100644 --- a/plugins/protocolbuffers/cpp/v28.1/Dockerfile +++ b/plugins/protocolbuffers/cpp/v28.1/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:b6e1e913f633495eeb80a41e03de1a41aa863e9b19902309b180ffdc4b99db2c AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v28.2/Dockerfile b/plugins/protocolbuffers/cpp/v28.2/Dockerfile index 6f9b9e6d9..e9d68ffae 100644 --- a/plugins/protocolbuffers/cpp/v28.2/Dockerfile +++ b/plugins/protocolbuffers/cpp/v28.2/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:b6e1e913f633495eeb80a41e03de1a41aa863e9b19902309b180ffdc4b99db2c AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v28.3/Dockerfile b/plugins/protocolbuffers/cpp/v28.3/Dockerfile index 0a1e3777f..04a9ae833 100644 --- a/plugins/protocolbuffers/cpp/v28.3/Dockerfile +++ b/plugins/protocolbuffers/cpp/v28.3/Dockerfile @@ -21,7 +21,7 @@ RUN bazelisk ${BAZEL_OPTS} build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazelisk ${BAZEL_OPTS} build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:3310655aac0d85eb9d579792387af1ff3eb7a1667823478be58020ab0e0d97a8 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base FROM scratch COPY --from=base --link / / From 304e1a7f926003ae2239851575747ee50a3c105e Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 26 Nov 2024 21:51:09 -0500 Subject: [PATCH 22/23] Revert 26.1 plugins and squash layers/upgrade to Debian 12 in 25.0 plugin --- plugins/protocolbuffers/cpp/v25.0/Dockerfile | 7 +++++-- plugins/protocolbuffers/cpp/v26.1/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v27.0/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v27.1/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v27.2/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v27.3/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v27.4/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v28.0/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v28.1/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v28.2/Dockerfile | 2 +- plugins/protocolbuffers/cpp/v28.3/Dockerfile | 2 +- 11 files changed, 15 insertions(+), 12 deletions(-) diff --git a/plugins/protocolbuffers/cpp/v25.0/Dockerfile b/plugins/protocolbuffers/cpp/v25.0/Dockerfile index 642aa88fb..ed1989453 100644 --- a/plugins/protocolbuffers/cpp/v25.0/Dockerfile +++ b/plugins/protocolbuffers/cpp/v25.0/Dockerfile @@ -20,7 +20,10 @@ COPY --link disable_cpp_editions.patch . RUN git apply < disable_cpp_editions.patch \ && bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian11 -COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . +FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . USER nobody ENTRYPOINT ["/protoc-gen-cpp"] diff --git a/plugins/protocolbuffers/cpp/v26.1/Dockerfile b/plugins/protocolbuffers/cpp/v26.1/Dockerfile index 306f22879..c8b1ece04 100644 --- a/plugins/protocolbuffers/cpp/v26.1/Dockerfile +++ b/plugins/protocolbuffers/cpp/v26.1/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:3b75fdd33932d16e53a461277becf57c4f815c6cee5f6bc8f52457c095e004c8 AS base FROM scratch COPY --link --from=base / / diff --git a/plugins/protocolbuffers/cpp/v27.0/Dockerfile b/plugins/protocolbuffers/cpp/v27.0/Dockerfile index 0ebfd9381..cb35851f8 100644 --- a/plugins/protocolbuffers/cpp/v27.0/Dockerfile +++ b/plugins/protocolbuffers/cpp/v27.0/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:e1065a1d58800a7294f74e67c32ec4146d09d6cbe471c1fa7ed456b2d2bf06e0 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v27.1/Dockerfile b/plugins/protocolbuffers/cpp/v27.1/Dockerfile index bd4559ec3..6f158773f 100644 --- a/plugins/protocolbuffers/cpp/v27.1/Dockerfile +++ b/plugins/protocolbuffers/cpp/v27.1/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:e1065a1d58800a7294f74e67c32ec4146d09d6cbe471c1fa7ed456b2d2bf06e0 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v27.2/Dockerfile b/plugins/protocolbuffers/cpp/v27.2/Dockerfile index 224426581..ba342d6f7 100644 --- a/plugins/protocolbuffers/cpp/v27.2/Dockerfile +++ b/plugins/protocolbuffers/cpp/v27.2/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:e1065a1d58800a7294f74e67c32ec4146d09d6cbe471c1fa7ed456b2d2bf06e0 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v27.3/Dockerfile b/plugins/protocolbuffers/cpp/v27.3/Dockerfile index 7e4bc5158..2e12e061a 100644 --- a/plugins/protocolbuffers/cpp/v27.3/Dockerfile +++ b/plugins/protocolbuffers/cpp/v27.3/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:3b75fdd33932d16e53a461277becf57c4f815c6cee5f6bc8f52457c095e004c8 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v27.4/Dockerfile b/plugins/protocolbuffers/cpp/v27.4/Dockerfile index fc1962406..6094217f8 100644 --- a/plugins/protocolbuffers/cpp/v27.4/Dockerfile +++ b/plugins/protocolbuffers/cpp/v27.4/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:3b75fdd33932d16e53a461277becf57c4f815c6cee5f6bc8f52457c095e004c8 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v28.0/Dockerfile b/plugins/protocolbuffers/cpp/v28.0/Dockerfile index 0ba0129b9..bae5e789a 100644 --- a/plugins/protocolbuffers/cpp/v28.0/Dockerfile +++ b/plugins/protocolbuffers/cpp/v28.0/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:3b75fdd33932d16e53a461277becf57c4f815c6cee5f6bc8f52457c095e004c8 AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v28.1/Dockerfile b/plugins/protocolbuffers/cpp/v28.1/Dockerfile index add6742fa..56b8b366d 100644 --- a/plugins/protocolbuffers/cpp/v28.1/Dockerfile +++ b/plugins/protocolbuffers/cpp/v28.1/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:b6e1e913f633495eeb80a41e03de1a41aa863e9b19902309b180ffdc4b99db2c AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v28.2/Dockerfile b/plugins/protocolbuffers/cpp/v28.2/Dockerfile index e9d68ffae..6f9b9e6d9 100644 --- a/plugins/protocolbuffers/cpp/v28.2/Dockerfile +++ b/plugins/protocolbuffers/cpp/v28.2/Dockerfile @@ -18,7 +18,7 @@ RUN bazel build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazel build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:b6e1e913f633495eeb80a41e03de1a41aa863e9b19902309b180ffdc4b99db2c AS base FROM scratch COPY --from=base --link / / diff --git a/plugins/protocolbuffers/cpp/v28.3/Dockerfile b/plugins/protocolbuffers/cpp/v28.3/Dockerfile index 04a9ae833..0a1e3777f 100644 --- a/plugins/protocolbuffers/cpp/v28.3/Dockerfile +++ b/plugins/protocolbuffers/cpp/v28.3/Dockerfile @@ -21,7 +21,7 @@ RUN bazelisk ${BAZEL_OPTS} build '//:protoc_lib' COPY --link BUILD cpp.cc plugins/ RUN bazelisk ${BAZEL_OPTS} build '//plugins:protoc-gen-cpp.stripped' -FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 AS base +FROM gcr.io/distroless/cc-debian12:latest@sha256:3310655aac0d85eb9d579792387af1ff3eb7a1667823478be58020ab0e0d97a8 AS base FROM scratch COPY --from=base --link / / From c0c6effcb87ee96dec2a71f4ccc37793853c1225 Mon Sep 17 00:00:00 2001 From: "Philip K. Warren" Date: Wed, 27 Nov 2024 09:51:05 -0600 Subject: [PATCH 23/23] Bump additional base images --- plugins/protocolbuffers/cpp/v25.0/Dockerfile | 4 ++-- plugins/protocolbuffers/cpp/v25.1/Dockerfile | 4 ++-- plugins/protocolbuffers/cpp/v25.2/Dockerfile | 4 ++-- plugins/protocolbuffers/cpp/v25.3/Dockerfile | 4 ++-- plugins/protocolbuffers/cpp/v26.0/Dockerfile | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/protocolbuffers/cpp/v25.0/Dockerfile b/plugins/protocolbuffers/cpp/v25.0/Dockerfile index ed1989453..9707154c4 100644 --- a/plugins/protocolbuffers/cpp/v25.0/Dockerfile +++ b/plugins/protocolbuffers/cpp/v25.0/Dockerfile @@ -1,5 +1,5 @@ -# syntax=docker/dockerfile:1.5 -FROM debian:bullseye-20231030 AS build +# syntax=docker/dockerfile:1.10 +FROM debian:bookworm-20241111 AS build ARG TARGETARCH diff --git a/plugins/protocolbuffers/cpp/v25.1/Dockerfile b/plugins/protocolbuffers/cpp/v25.1/Dockerfile index 819671047..21525a31f 100644 --- a/plugins/protocolbuffers/cpp/v25.1/Dockerfile +++ b/plugins/protocolbuffers/cpp/v25.1/Dockerfile @@ -1,5 +1,5 @@ -# syntax=docker/dockerfile:1.5 -FROM debian:bullseye-20231030 AS build +# syntax=docker/dockerfile:1.10 +FROM debian:bookworm-20241111 AS build ARG TARGETARCH diff --git a/plugins/protocolbuffers/cpp/v25.2/Dockerfile b/plugins/protocolbuffers/cpp/v25.2/Dockerfile index 7e3eef8eb..e27383aa1 100644 --- a/plugins/protocolbuffers/cpp/v25.2/Dockerfile +++ b/plugins/protocolbuffers/cpp/v25.2/Dockerfile @@ -1,5 +1,5 @@ -# syntax=docker/dockerfile:1.5 -FROM debian:bookworm-20231218 AS build +# syntax=docker/dockerfile:1.10 +FROM debian:bookworm-20241111 AS build ARG TARGETARCH diff --git a/plugins/protocolbuffers/cpp/v25.3/Dockerfile b/plugins/protocolbuffers/cpp/v25.3/Dockerfile index bf0a822bb..8b6a5fb0d 100644 --- a/plugins/protocolbuffers/cpp/v25.3/Dockerfile +++ b/plugins/protocolbuffers/cpp/v25.3/Dockerfile @@ -1,5 +1,5 @@ -# syntax=docker/dockerfile:1.7 -FROM debian:bookworm-20240211 AS build +# syntax=docker/dockerfile:1.10 +FROM debian:bookworm-20241111 AS build ARG TARGETARCH diff --git a/plugins/protocolbuffers/cpp/v26.0/Dockerfile b/plugins/protocolbuffers/cpp/v26.0/Dockerfile index 0430c1385..6a43b71cb 100644 --- a/plugins/protocolbuffers/cpp/v26.0/Dockerfile +++ b/plugins/protocolbuffers/cpp/v26.0/Dockerfile @@ -1,5 +1,5 @@ -# syntax=docker/dockerfile:1.5 -FROM debian:bookworm-20240311 AS build +# syntax=docker/dockerfile:1.10 +FROM debian:bookworm-20241111 AS build ARG TARGETARCH