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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(schema_registry): add support for protobuf schemas #10409

Merged
merged 1 commit into from Apr 17, 2023

Conversation

thalesmg
Copy link
Contributor

@thalesmg thalesmg commented Apr 14, 2023

Fixes https://emqx.atlassian.net/browse/EMQX-9470

Summary

馃 Generated by Copilot at 8f7c584

This pull request adds support for protobuf schemas and serdes in the schema registry app, using the gpb library and dynamic module loading. It also updates the test suites, the HTTP API, the i18n file, and the build script to handle the new feature.

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Changed lines covered in coverage report
  • Change log has been added to changes/{ce,ee}/(feat|perf|fix)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • If there should be document changes, a PR to emqx-docs.git is sent, or a jira ticket is created to follow up
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • [na] If changed package build workflow, pass this action (manual trigger)
  • [na] Change log has been added to changes/ dir for user-facing artifacts update

echo "gpb should not be included in the release"
exit 1
fi
:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Talking to @zmstone , we decided to lift this restriction on gpb because it is actually LGPL and not GPLv3.

@thalesmg thalesmg force-pushed the protobuf-schema-v50 branch 2 times, most recently from 617b854 to e65903e Compare April 14, 2023 20:58
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 4703843216

  • 54 of 61 (88.52%) changed or added relevant lines in 3 files are covered.
  • 19 unchanged lines in 11 files lost coverage.
  • Overall coverage increased (+0.1%) to 81.336%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib-ee/emqx_ee_schema_registry/src/emqx_ee_schema_registry_schema.erl 7 8 87.5%
lib-ee/emqx_ee_schema_registry/src/emqx_ee_schema_registry_serde.erl 45 51 88.24%
Files with Coverage Reduction New Missed Lines %
apps/emqx_bridge/src/emqx_bridge_resource.erl 1 73.5%
apps/emqx_gateway_mqttsn/src/emqx_mqttsn_channel.erl 1 73.13%
apps/emqx_machine/src/emqx_machine.erl 1 77.42%
apps/emqx_management/src/emqx_mgmt_util.erl 1 13.79%
apps/emqx_resource/src/emqx_resource_buffer_worker.erl 1 94.57%
apps/emqx/src/emqx_crl_cache.erl 1 91.21%
apps/emqx/src/emqx_logger.erl 1 80.49%
apps/emqx/src/emqx_schema.erl 1 90.0%
apps/emqx/src/emqx_sys_mon.erl 1 91.67%
apps/emqx/src/emqx_channel.erl 2 87.64%
Totals Coverage Status
Change from base Build 4702850776: 0.1%
Covered Lines: 25611
Relevant Lines: 31488

馃挍 - Coveralls

@thalesmg thalesmg marked this pull request as ready for review April 17, 2023 14:21
@thalesmg thalesmg requested a review from a team as a code owner April 17, 2023 14:21
ieQu1
ieQu1 previously approved these changes Apr 17, 2023
@thalesmg
Copy link
Contributor Author

Had to rebase to fix conflicts in the i18n files.

@thalesmg thalesmg requested a review from ieQu1 April 17, 2023 16:34
@thalesmg thalesmg merged commit 586cd54 into emqx:master Apr 17, 2023
111 checks passed
@thalesmg thalesmg deleted the protobuf-schema-v50 branch April 17, 2023 17: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.

None yet

3 participants