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: add /rule_engine API endpoint #10336

Conversation

sstrigler
Copy link
Contributor

@sstrigler sstrigler commented Apr 5, 2023

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

Summary

馃 Generated by Copilot at 9c6290a

This pull request adds a new feature to the rule engine API, which allows users to get and update the rule engine configuration via the /rule_engine endpoint. It also enhances the rule engine configuration schema by adding a reference field and a helper function. The pull request updates the swagger documentation, the localization files, the changelog, and the test suite accordingly.

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

@sstrigler sstrigler force-pushed the EMQX-8507-rule-engine-need-a-new-api-to-crud-rule-engines-setting-configs branch from 9c6290a to aea870f Compare April 5, 2023 13:19
@sstrigler sstrigler marked this pull request as ready for review April 5, 2023 13:20
@sstrigler sstrigler requested review from a team and kjellwinblad as code owners April 5, 2023 13:20
kjellwinblad
kjellwinblad previously approved these changes Apr 5, 2023
Copy link
Contributor

@kjellwinblad kjellwinblad 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 to me!

rel/i18n/emqx_rule_api_schema.hocon Outdated Show resolved Hide resolved
rel/i18n/emqx_rule_api_schema.hocon Outdated Show resolved Hide resolved
rel/i18n/emqx_rule_engine_api.hocon Outdated Show resolved Hide resolved
rel/i18n/emqx_rule_engine_api.hocon Outdated Show resolved Hide resolved
zmstone
zmstone previously approved these changes Apr 5, 2023
thalesmg
thalesmg previously approved these changes Apr 5, 2023
Co-authored-by: LenaLenaPan <120552185+LenaLenaPan@users.noreply.github.com>
@sstrigler sstrigler dismissed stale reviews from thalesmg and zmstone via e282d36 April 11, 2023 07:34
@sstrigler sstrigler force-pushed the EMQX-8507-rule-engine-need-a-new-api-to-crud-rule-engines-setting-configs branch from bf82d7f to 8ef36f2 Compare April 11, 2023 10:04
@coveralls
Copy link
Collaborator

coveralls commented Apr 11, 2023

Pull Request Test Coverage Report for Build 4668222089

  • 18 of 18 (100.0%) changed or added relevant lines in 3 files are covered.
  • 31 unchanged lines in 12 files lost coverage.
  • Overall coverage increased (+0.02%) to 81.103%

Files with Coverage Reduction New Missed Lines %
apps/emqx_bridge/src/emqx_bridge.erl 1 91.2%
apps/emqx_mqttsn/src/emqx_mqttsn_frame.erl 1 63.48%
apps/emqx/src/emqx_broker.erl 1 87.64%
apps/emqx/src/emqx_cm.erl 1 91.89%
apps/emqx/src/emqx_connection.erl 1 87.96%
apps/emqx/src/emqx_limiter/src/emqx_limiter_server.erl 1 89.08%
apps/emqx/src/emqx_session.erl 1 87.65%
apps/emqx_connector/src/emqx_connector_jwt_worker.erl 2 92.54%
apps/emqx/src/emqx_channel.erl 2 87.64%
apps/emqx/src/emqx_flapping.erl 3 80.85%
Totals Coverage Status
Change from base Build 4642703850: 0.02%
Covered Lines: 25129
Relevant Lines: 30984

馃挍 - Coveralls

@sstrigler sstrigler requested review from thalesmg and removed request for zmstone April 11, 2023 14:44
@sstrigler sstrigler merged commit f668ad7 into emqx:master Apr 12, 2023
106 checks passed
@sstrigler sstrigler deleted the EMQX-8507-rule-engine-need-a-new-api-to-crud-rule-engines-setting-configs branch April 12, 2023 09:44
@sstrigler sstrigler removed the request for review from kjellwinblad April 12, 2023 14:00
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

6 participants