Skip to content
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

feat(source): embed protobuf well known types when using schema registry #13370

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

xiangjinwu
Copy link
Contributor

@xiangjinwu xiangjinwu commented Nov 11, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

These 12 proto source files containing well known types shall be bundled together with protoc / libprotobuf as they may not be available from schema registry.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

Protobuf well known types can now be used without including them in schema registry.

Copy link
Member

@BugenZhao BugenZhao left a comment

Choose a reason for hiding this comment

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

@@ -98,6 +98,10 @@ RUST_LOG="info,risingwave_stream=info,risingwave_batch=info,risingwave_storage=i
cargo make ci-start ci-1cn-1fe
python3 -m pip install requests protobuf confluent-kafka
python3 e2e_test/schema_registry/pb.py "message_queue:29092" "http://message_queue:8081" "sr_pb_test" 20
echo "make sure google/protobuf/source_context.proto is NOT in schema registry"
Copy link
Member

Choose a reason for hiding this comment

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

This is really a good practice!

@xiangjinwu
Copy link
Contributor Author

Does https://docs.rs/prost-types/latest/prost_types/ help?

It only contains generated rust code, rather than the raw proto source required by SourceTreeDescriptorDatabase::build_file_descriptor_set.

@xiangjinwu xiangjinwu force-pushed the feat-source-proto-schema-registry-well-known-types branch from b3ce125 to 48bad7e Compare November 13, 2023 03:42
Copy link
Member

@BugenZhao BugenZhao left a comment

Choose a reason for hiding this comment

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

LGTM!

@xiangjinwu xiangjinwu enabled auto-merge November 13, 2023 04:01
@xiangjinwu xiangjinwu added this pull request to the merge queue Nov 13, 2023
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

Merging #13370 (48bad7e) into main (eabfeba) will increase coverage by 0.06%.
Report is 2 commits behind head on main.
The diff coverage is 53.84%.

@@            Coverage Diff             @@
##             main   #13370      +/-   ##
==========================================
+ Coverage   67.79%   67.86%   +0.06%     
==========================================
  Files        1526     1526              
  Lines      259801   259812      +11     
==========================================
+ Hits       176145   176330     +185     
+ Misses      83656    83482     -174     
Flag Coverage Δ
rust 67.86% <53.84%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/connector/src/schema/schema_registry/client.rs 0.65% <ø> (+0.02%) ⬆️
src/frontend/src/handler/create_table.rs 83.79% <100.00%> (ø)
...c/connector/src/parser/protobuf/schema_resolver.rs 0.00% <0.00%> (ø)
src/frontend/src/handler/create_source.rs 58.42% <65.00%> (+0.28%) ⬆️

... and 21 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Merged via the queue into main with commit 255d651 Nov 13, 2023
11 of 12 checks passed
@xiangjinwu xiangjinwu deleted the feat-source-proto-schema-registry-well-known-types branch November 13, 2023 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants