Skip to content

Conversation

@teskje
Copy link
Contributor

@teskje teskje commented Oct 14, 2025

This PR replaces the proto definitions in mz-catalog-protos with the equivalent Rust type definitions, obtained through protobuf codegen and subsequent cleanup. This removes the dependency on prost and paves the way for removing one level of StateUpdateKind definitions.

Note that the crate is still called mz-catalog-protos and there are plenty of references to "protos" left in other crates. Cleaning this up is left as a follow-up.

Motivation

  • This PR refactors existing code.

Step (2) of https://github.com/MaterializeInc/database-issues/issues/9792

Tips for reviewer

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@teskje teskje force-pushed the catalog-remove-protobuf branch from 382caf3 to 1eb4f73 Compare December 1, 2025 16:16
Copy link
Member

@antiguru antiguru left a comment

Choose a reason for hiding this comment

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

Looks good! Do you mind filing an issue to add documentation to this crate? The catalog types would greatly benefit from some documentation.

@teskje teskje force-pushed the catalog-remove-protobuf branch 5 times, most recently from 96ce99d to 6c18d2b Compare December 10, 2025 10:51
This commit adds Rust source files describing the existing versioned
catalog definitions. The contained types are generated by running the
protobuf codegen and then cleaning up the result. They have the same
fields and JSON serialization behavior as the proto types, but don't
depend on `prost`.
This commit changes the existing hash checking logic meant to ensure
that the versioned proto files never change to check the new Rust source
files instead.
This commit removes the now unused proto definitions and cleans up the
crate dependencies.
@teskje teskje force-pushed the catalog-remove-protobuf branch from 6c18d2b to 6d93396 Compare December 10, 2025 11:31
@teskje
Copy link
Contributor Author

teskje commented Dec 10, 2025

TFTR!

@teskje teskje marked this pull request as ready for review December 10, 2025 14:51
@teskje teskje requested a review from a team as a code owner December 10, 2025 14:51
@teskje teskje requested a review from aljoscha December 10, 2025 14:51
@teskje teskje merged commit 47eff9e into MaterializeInc:main Dec 10, 2025
328 of 336 checks passed
@teskje teskje deleted the catalog-remove-protobuf branch December 10, 2025 14:51
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.

2 participants