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(plugin): avro config schema store and encode/decode #12910

Merged
merged 22 commits into from Apr 26, 2024

Conversation

JimMoen
Copy link
Member

@JimMoen JimMoen commented Apr 22, 2024

Fixes EMQX-12187

Release version: v/e5.7.0

Summary

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
  • Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • Change log has been added to changes/(ce|ee)/(feat|perf|fix|breaking)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

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

@JimMoen JimMoen force-pushed the EMQX-12187/feat-plugin-config-ui branch from d5e1b72 to e7fdaf2 Compare April 23, 2024 17:08
@JimMoen JimMoen changed the title Emqx 12187/feat plugin config UI feat(plugin): avro config schema store and encode/decode Apr 23, 2024
@JimMoen JimMoen force-pushed the EMQX-12187/feat-plugin-config-ui branch 2 times, most recently from 91bea75 to d62c5e0 Compare April 24, 2024 06:58
@JimMoen JimMoen marked this pull request as ready for review April 24, 2024 09:10
@JimMoen JimMoen requested review from a team and lafirest as code owners April 24, 2024 09:10
apps/emqx_plugins/src/emqx_plugins_serde.erl Outdated Show resolved Hide resolved
apps/emqx_plugins/src/emqx_plugins_serde.erl Outdated Show resolved Hide resolved
apps/emqx_plugins/src/emqx_plugins_serde.erl Outdated Show resolved Hide resolved
apps/emqx_plugins/src/emqx_plugins_serde.erl Outdated Show resolved Hide resolved
apps/emqx_plugins/src/emqx_plugins_serde.erl Outdated Show resolved Hide resolved
apps/emqx_management/src/emqx_mgmt_api_plugins.erl Outdated Show resolved Hide resolved
apps/emqx_management/src/emqx_mgmt_api_plugins.erl Outdated Show resolved Hide resolved
apps/emqx_management/src/emqx_mgmt_api_plugins.erl Outdated Show resolved Hide resolved
apps/emqx_management/src/emqx_mgmt_api_plugins.erl Outdated Show resolved Hide resolved
apps/emqx_plugins/src/emqx_plugins_serde.erl Outdated Show resolved Hide resolved
Copy link
Member

@zmstone zmstone left a comment

Choose a reason for hiding this comment

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

There is also a new (optional) callback to be added to the template plugins to handle config changes.
e.g.
on_config_change(OldConfig, NewConfig) -> ...

apps/emqx_plugins/src/emqx_plugins_serde.erl Outdated Show resolved Hide resolved
apps/emqx_management/src/emqx_mgmt_api_plugins.erl Outdated Show resolved Hide resolved
apps/emqx_plugins/src/emqx_plugins.erl Outdated Show resolved Hide resolved
@JimMoen JimMoen force-pushed the EMQX-12187/feat-plugin-config-ui branch from 36256d3 to 6713777 Compare April 26, 2024 03:52
@JimMoen JimMoen changed the base branch from master to release-57 April 26, 2024 03:52
@zmstone
Copy link
Member

zmstone commented Apr 26, 2024

@JimMoen JimMoen force-pushed the EMQX-12187/feat-plugin-config-ui branch from 6713777 to bf7f5a0 Compare April 26, 2024 10:29
@JimMoen JimMoen force-pushed the EMQX-12187/feat-plugin-config-ui branch from bf7f5a0 to 5ff4e76 Compare April 26, 2024 12:56
@JimMoen JimMoen merged commit a3320ab into emqx:release-57 Apr 26, 2024
172 checks passed
@JimMoen JimMoen deleted the EMQX-12187/feat-plugin-config-ui branch April 28, 2024 01:51
Comment on lines +1060 to +1061
write_avro_bin(NameVsn, AvroBin) ->
ok = file:write_file(avro_config_file(NameVsn), AvroBin).
Copy link
Member Author

Choose a reason for hiding this comment

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

Rename the old configuration file for backup.
Similar to cluster.hocon

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

2 participants