-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Proper tracking of production proto files #12003
Comments
Going to ask some silly questions first...
So why are they called
So why are they called Also, to look at what's in production, why not just look at the latest tag(s) released? |
So re-reading this, is the idea that |
This will break clients which depend on
When we are in the process of building a module we may do this on
The alternative is that we can always do alpha or beta until right at the point where we cut a release but this involves more complicated refactoring late in the game. And also, because of the multi-module approach, alpha and beta proto files from other modules that are WIP can leak into the release tag of a stable module
That's fine if we only have one SDK release tag, but if we have sub-modules then this could combine a mixture of things. For instance, maybe we create the release branch for staking when gov still has some WIP stuff in its proto files. |
Exactly. Just the canonical proto files + api module that are in production releases. |
Makes sense to me then. |
It's kind of a nasty problem honestly. This is the best solution I've been able to think of. If someone has a better solution I'm all ears |
Actually the alternative I can think of is having per go module a separate:
So you'd have:
And no root /proto or /api folders So there's a one to one mapping of go modules to proto and api modules. This is probably more correct, but seems like a fair amount of reorganization |
Would rather go with the ideal approach if it's possible after 0.46 |
I think the sub-sub module (#12003 (comment)) is more clear, because it is well encapsulated and can be tagged together with the module release. If I understand it correctly, we will still have v1, v2 subdirectories, right?
|
It would actually be |
We could structure api go modules in two different ways:
I think I prefer approach 1 which wouldn't change any existing package imports using the api module |
I first addressed this issue in #10582 (comment) and commented briefly on a solution here: #11993 (comment).
Problem Definition
Currently, the main branch has a mixture of proto files which are used in production and still in development. This isn't simply a question of whether the proto package is
v1beta1
,v1
, etc. because somev1beta1
packages are used in production and should be considered stable in spite of containingbeta
. Also, somev1
packages are still in flux because they're not yet used in production.Thus what is in the api module and buf schema registry is not reliable for use against production chains.
Proposed Solution
I propose create a branch
release/api
where proto files that are used to generate code in a non-alpha/beta/rc release are backported to. Thisrelease/api
should be the 100% certain source of truth for which proto files are actually used in production and should generally be updated right after a non-alpha/beta/rc release is cut.When these proto files are updated, two things should happen:
In this way, the latest commit on the buf schema registry and the latest release tag of the api module will always contain a set of production proto files which can be used to target any production SDK release.
Also, we should used
release/api
as the input to buf breaking and make this a required check so that we know we are never breaking production proto files.In the meantime, this will allow iteration of non-production proto files on
main
and other branches without confusing clients. Whenever a tag of the api module is needed in a pre-release of another module, we can make an alpha or beta tag ofapi
on main.The text was updated successfully, but these errors were encountered: