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

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

jsternberg
Copy link
Collaborator

@jsternberg jsternberg commented Sep 14, 2024

This removes the deprecated gogo proto in favor of the standard implementation.

@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.

we should have another target validating generation similar to buildkit one:

and add it to the validate job matrix:

matrix:
target:
- lint
- validate-gomod
- validate-shfmt

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.

Not sure why we need this script, could we not just have it inlined in the dockerfile like https://github.com/moby/buildkit/blob/23a2b6fab3f654e67e4407d5f9ef496ced12f029/hack/dockerfiles/generated-files.Dockerfile#L42-L56?

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.

@jsternberg jsternberg force-pushed the gogoproto-remove branch 2 times, most recently from 4879a07 to ca54b7c Compare September 24, 2024 15:27
go.mod Outdated
github.com/moby/patternmatcher v0.5.0
github.com/opencontainers/go-digest v1.0.0
github.com/pkg/errors v0.9.1
github.com/planetscale/vtprotobuf v0.6.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we want to separate vtproto as well here related to moby/buildkit#5342 (comment)?

@jsternberg
Copy link
Collaborator Author

Removed the vtproto part of this and I'll create a separate PR for vtproto.

This removes the deprecated gogo proto in favor of the standard
implementation.

Signed-off-by: Jonathan A. Sternberg <[email protected]>
@tonistiigi tonistiigi merged commit 7189060 into tonistiigi:master Sep 26, 2024
15 checks passed
@jsternberg jsternberg deleted the gogoproto-remove branch September 26, 2024 04:03
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