Skip to content

Proper tracking of production proto files #12003

@aaronc

Description

@aaronc

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 some v1beta1 packages are used in production and should be considered stable in spite of containing beta. Also, some v1 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. This release/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:

  • the api module code should get regenerated and tagged with a (non-alpha/beta/rc) release
  • the proto files should get pushed to buf schema registry

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 of api on main.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions