-
Notifications
You must be signed in to change notification settings - Fork 707
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
protovalidate: support new protovalidate-go Validator interface #746
Merged
johanbrandhorst
merged 4 commits into
grpc-ecosystem:main
from
zchee:support-protovalidate-go-0.9
Feb 11, 2025
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d89418e
interceptors/protovalidate: support protovalidate-go.Validator interface
zchee f99b389
testing/testpb: revert regenerate pb
zchee 7ba0f46
go.mod: revert add toolchain directive
zchee 25b0ce0
Revert "go.mod: revert add toolchain directive"
zchee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
module github.com/grpc-ecosystem/go-grpc-middleware/v2 | ||
|
||
go 1.21 | ||
go 1.21.1 | ||
|
||
toolchain go1.21.13 | ||
|
||
require ( | ||
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230802163732-1c33ebd9ecfa.1 | ||
github.com/bufbuild/protovalidate-go v0.2.1 | ||
github.com/stretchr/testify v1.8.4 | ||
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.4-20250130201111-63bb56e20495.1 | ||
github.com/bufbuild/protovalidate-go v0.9.1 | ||
github.com/stretchr/testify v1.10.0 | ||
golang.org/x/net v0.28.0 | ||
golang.org/x/oauth2 v0.22.0 | ||
google.golang.org/grpc v1.67.1 | ||
google.golang.org/protobuf v1.34.2 | ||
google.golang.org/protobuf v1.36.4 | ||
) | ||
|
||
require ( | ||
cloud.google.com/go/compute v1.23.4 // indirect | ||
cel.dev/expr v0.19.1 // indirect | ||
cloud.google.com/go/compute/metadata v0.5.0 // indirect | ||
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9 // indirect | ||
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/google/cel-go v0.17.1 // indirect | ||
github.com/google/cel-go v0.23.0 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/stoewer/go-strcase v1.3.0 // indirect | ||
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect | ||
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect | ||
golang.org/x/sys v0.24.0 // indirect | ||
golang.org/x/text v0.17.0 // indirect | ||
google.golang.org/appengine v1.6.8 // indirect | ||
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect | ||
golang.org/x/text v0.21.0 // indirect | ||
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert these changes, as a library we should not specify subversions of the Go version. See grpc/grpc-go#7831.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert but failed CI:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please re-revert it and we can figure out the CI failure. CI is unstable as it is, don't trust it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johanbrandhorst done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Clearly we still need to run
go mod tidy
, and clearly that introduces thetoolchain
directive (and minor version requirement). Could you try to figure out which of the upgrades here is introducing the toolchain directive? It shouldn't be added just on its own.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johanbrandhorst This issue not related to upgrade protovalidate-go. I think should be separate PR or issue and fix until next release if you want (I don't want do it at this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you saying that the toolchain is being added when running
go mod tidy
onmain
? I think this is the first time we've seen it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, as I said on #746 (comment), it seems to be related to:
From the updated
go.mod
, thecel.dev/expr
has atoolchain
directive:I don't know which is the root cause.
Several developers are already waiting for this PR via emoji action. The go-grpc-middleware maintainers are concerned about the issue of the "toolcahin" directive in go.mod due to go-grpc-ecosystem policy, but users (including me) just want to upgrade the protovalidate-go. Those are separate issues, and the
main
branch is not stable, so if the concerns about thetoolchain
directive take precedence, please ensure the maintainers understand and resolve those issues, then upgrade the protovalidate-go by maintainers until the next release. Please feel free to close this PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cel-spec does seems to be the culprit. I think it's fair to say that we could merge this with the new toolchain directive if we can plan to remove it again before the next release. We'd need to create an issue with cel-spec to get them to remove their spec (or potentially look into their dependencies which may have forced its addition). In any case, if you'd like to just run
go mod tidy
in this PR and push that, we can get this upgrade merged.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done.