Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

deps: remove deprecated gogo proto #206

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsternberg
Copy link
Collaborator

@jsternberg jsternberg commented Sep 14, 2024

This removes the deprecated gogo proto in favor of the standard implementation with the vtproto implementation for faster marshaling. The standard implementation still uses reflection and is slower than gogo, but gogo is deprecated due to the complexity of the code generation.

vtproto is a project that does a similar thing to gogo but generates code in addition to the standard code generation rather than replacing it.

@jsternberg
Copy link
Collaborator Author

Still need to update the bytes for the windows side of the tests but I need to do that on a windows machine. Is there a way we can improve the tests so it isn't reliant on the exact byte pattern for marshal?

@jsternberg
Copy link
Collaborator Author

I attempted to run the tests on Windows to get the new hashes but I seem to have had almost every test fail due to permission issues there. The CI is reporting a success there but there seems to be some test failures there.

@jsternberg jsternberg force-pushed the gogoproto-remove branch 3 times, most recently from 2030300 to 747a7ee Compare September 16, 2024 20:11
@jsternberg
Copy link
Collaborator Author

Looks like the hashes didn't change when testing with the CI so going to undo that part of the change. This is ready for review now.

@jsternberg jsternberg marked this pull request as ready for review September 16, 2024 20:12
docker-bake.hcl Outdated
@@ -39,6 +39,14 @@ target "lint" {
}
}

target "generate" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added this. I also redid part of the generate script because running protoc is very frustrating. We want the import path to be the fully qualified path so that buildkit can import wire.proto using the fully qualified path, but protoc was just not happy with the paths being different between projects so I just decided "we're doing this in a dockerfile anyway so I'll just write the protoc command there rather than go generate."

docker-bake.hcl Outdated
@@ -39,6 +39,20 @@ target "lint" {
}
}

target "validate-generate" {
Copy link
Owner

Choose a reason for hiding this comment

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

"validate-generated-files"

@tonistiigi
Copy link
Owner

PTAL @kzys

: ${CONTINUOUS_INTEGRATION=}

progressFlag=""
if [ "$CONTINUOUS_INTEGRATION" == "true" ]; then progressFlag="--progress=plain"; fi
Copy link
Collaborator

@crazy-max crazy-max Sep 19, 2024

Choose a reason for hiding this comment

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

This is not needed as there is no tty allocated on GHA and will therefore use plain progress. I think you can just remove this script

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just copied what I saw the existing update and validate scripts were doing. We can always do it a different way.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've updated all of the hack scripts and the dockerfiles to use this inline technique rather than put too much logic in the hack scripts. The hack scripts now just invoke the appropriate bake target and the validate is now inlined in the dockerfile for gomod and generated-files.

This removes the deprecated gogo proto in favor of the standard
implementation with the vtproto implementation for faster marshaling.
The standard implementation still uses reflection and is slower than
gogo, but gogo is deprecated due to the complexity of the code
generation.

vtproto is a project that does a similar thing to gogo but generates
code in addition to the standard code generation rather than replacing
it.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants