-
Notifications
You must be signed in to change notification settings - Fork 30
Add ability to depend on an arbitrary upstream commit #295
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Sri Krishna <[email protected]>
|
The latest Buf updates on your PR. Results from workflow Buf / validate-protos (pull_request).
|
| ifeq ($(PROTOVALIDATE_RELEASE_VERSION), TRUE) | ||
| go mod edit -dropreplace=buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go | ||
| go get buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go@$(PROTOVALIDATE_GEN_SDK_VERSION) | ||
| else | ||
| $(BIN)/buf generate --template buf.gen.upstream.yaml $(PROTOVALIDATE_PROTO_PATH) | ||
| echo "go 1.24.0" >> upstream/module/go.mod | ||
| go mod edit -replace=buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go=./upstream/module | ||
| endif |
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.
Although replace directive doesn't impact downstream users, this ensures that at release time the version matches gen sdk version and removes the replace directive
Signed-off-by: Sri Krishna <[email protected]>
Signed-off-by: Sri Krishna <[email protected]>
rodaine
left a comment
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.
I know this makes development of pv-go easier, but we don't want users to rely on this generated code and add to our support burden when things don't align properly. We should be able to do this in a transparent way.
They won't, because to cut a release we will use a release version of protovalidate just like today and that removes the replace directive and the generated code. The only problem I see is if users depend on an arbitrary commit which I don't think we need to support. |
|
There's no PR description that states the problem this solves. Is this just so we can development and test against arbitrary versions of the protos? I would think we could include a lot of that plumbing, but then also have some other CI check to make sure we don't ever commit that to main. I think commits on main should always use a release of the protos. What kinds of features are we thinking of that might necessitate working on unreleased versions of the proto on the main branch? I imagine they could be potentially be done via longer-lived dev branches instead of merging such a dependency to main, no? |
Yes. In an ideal world, we would make changes in validate.proto, cut a release, then update the implementations to match, and release them too. In practice, this does not work out. For example, the In practice, it's mandatory that we vet changes to validate.proto in implementations before cutting a release. This PR adds the capability to implement changes without a release (mitigating the issues outlined above), and to do so incrementally (which makes them reviewable, and provides a reasonable changelog). As a separate change, I believe that we need a reference implementation: When protovalidate-go is merged into the protovalidate repository, every commit to validate.proto can be properly vetted, and contributor PRs get a direct feedback. However, this change doesn't obsolete the changes from this PR, since protovalidate-go relies on a generated SDK. |
No description provided.