chore: fix the proto generation#9844
Conversation
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.
There was a problem hiding this comment.
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.15togolang:1.24.5and updated all protobuf generation tools (includingprotoc,protoc-gen-go,grpc-gatewayplugins, andprotoc-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-prefixedoperationIds (e.g.,SkaffoldV2Service_ApplicationLogs), explicitdefaulterror 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/Dockerfileandhack/generate-proto.shscript to reflect the new Go version, usego installfor tool setup, and incorporatejqdirectly fromapt-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
-
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. ↩
There was a problem hiding this comment.
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.
|
|
||
| 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 |
There was a problem hiding this comment.
|
|
||
| WORKDIR /protoc | ||
| ENV PROTOC_VERSION=3.17.3 | ||
| ENV PROTOC_VERSION=31.1 |
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 upgradefails.Upgrading go to fix that issue required upgrading a whole bunch of other
things. Exciting.