Skip to content

chore: fix the proto generation#9844

Merged
plumpy merged 2 commits into
GoogleContainerTools:mainfrom
plumpy:fix-protoc
Jul 22, 2025
Merged

chore: fix the proto generation#9844
plumpy merged 2 commits into
GoogleContainerTools:mainfrom
plumpy:fix-protoc

Conversation

@plumpy

@plumpy plumpy commented Jul 22, 2025

Copy link
Copy Markdown
Contributor

It was using a very old version of Go which was, in turn, using a very
old version of Debian. That version of Debian hasn't been supported for
over a year, so trying to do an apt-get upgrade fails.

Upgrading go to fix that issue required upgrading a whole bunch of other
things. Exciting.

plumpy added 2 commits July 22, 2025 10:29
It was using a very old version of Go which was, in turn, using a very
old version of Debian. That version of Debian hasn't been supported for
over a year, so trying to do an `apt-get upgrade` fails.

Upgrading go to fix that issue required upgrading a whole bunch of other
things. Exciting.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @plumpy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves critical build failures caused by an outdated Go version and its associated dependencies within the protobuf generation pipeline. It comprehensively updates the entire protobuf toolchain, leading to the regeneration of all API definitions and Go source files. These changes ensure the project's build process is stable and adheres to current protobuf and gRPC-Gateway best practices.

Highlights

  • Toolchain Upgrade: Upgraded the Go base image from golang:1.15 to golang:1.24.5 and updated all protobuf generation tools (including protoc, protoc-gen-go, grpc-gateway plugins, and protoc-gen-doc) to their latest compatible versions. This addresses issues with outdated dependencies in the build environment.
  • API Definition Regeneration: Regenerated all Swagger JSON files (skaffold.swagger.json) for both v1 and v2 APIs. This includes changes such as service-prefixed operationIds (e.g., SkaffoldV2Service_ApplicationLogs), explicit default error responses, and streamlined boolean type definitions, aligning with updated gRPC-Gateway conventions.
  • Go Protobuf Code Updates: Regenerated all Go protobuf source files (.pb.go, .pb.gw.go, _grpc.pb.go) for both v1 and v2 APIs. Key changes include updated Go package paths for enums, adoption of modern generic gRPC streaming interfaces, revised handling of default enum values, and improved error logging in generated gRPC-Gateway code.
  • Build Script Refinement: Updated the hack/proto/Dockerfile and hack/generate-proto.sh script to reflect the new Go version, use go install for tool setup, and incorporate jq directly from apt-get, ensuring a more robust and up-to-date protobuf generation pipeline.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Go version and related dependencies for protobuf file generation. I've found two issues in hack/proto/Dockerfile that will prevent the proto generation from succeeding. Please address these issues to ensure the proto generation is reproducible.

Comment thread hack/proto/Dockerfile

FROM golang:1.15 AS generate-files
RUN apt-get update && apt-get install -y unzip moreutils
FROM golang:1.24.5 AS generate-files

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The Go version 1.24.5 specified in the FROM instruction does not appear to be a valid or available tag for the golang Docker image. This will likely cause the docker build command to fail.

Please use a valid and existing Go version.

FROM golang:1.22.4 AS generate-files
Comment thread hack/proto/Dockerfile

WORKDIR /protoc
ENV PROTOC_VERSION=3.17.3
ENV PROTOC_VERSION=31.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The PROTOC_VERSION is set to 31.1, which is not a valid release version for protoc. The wget command on the next line will fail with a 404 error as there is no corresponding release asset on GitHub.

Please use a valid protoc version.

ENV PROTOC_VERSION=27.2
@plumpy plumpy marked this pull request as ready for review July 22, 2025 16:15
@plumpy plumpy requested a review from a team as a code owner July 22, 2025 16:15
@plumpy plumpy merged commit 5c866a1 into GoogleContainerTools:main Jul 22, 2025
12 checks passed
@plumpy plumpy deleted the fix-protoc branch July 22, 2025 16:51
@menahyouyeah menahyouyeah mentioned this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants