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(ruleengine): port random && uuid_v4 functions from v4 #11166

Merged
merged 2 commits into from Jun 30, 2023

Conversation

lafirest
Copy link
Member

@lafirest lafirest commented Jun 30, 2023

Fixes EMQX-10443

Summary

馃 Generated by Copilot at b75801b

Added new rule engine functions for generating random values and UUIDs. Updated the emqx_rule_engine dependency list to include the uuid application.

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

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

@lafirest lafirest marked this pull request as ready for review June 30, 2023 06:58
@lafirest lafirest requested review from a team and kjellwinblad as code owners June 30, 2023 06:58
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 5420061146

  • 0 of 4 (0.0%) changed or added relevant lines in 1 file are covered.
  • 35 unchanged lines in 11 files lost coverage.
  • Overall coverage decreased (-0.05%) to 81.945%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/emqx_rule_engine/src/emqx_rule_funcs.erl 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
apps/emqx_conf/src/emqx_conf_schema.erl 1 94.74%
apps/emqx_gateway_exproto/src/emqx_exproto_gcli.erl 1 64.15%
apps/emqx_gateway_mqttsn/src/emqx_mqttsn_channel.erl 1 73.69%
apps/emqx/src/emqx_schema.erl 1 87.5%
apps/emqx/src/emqx_session.erl 1 87.65%
apps/emqx_utils/src/emqx_utils.erl 1 82.3%
apps/emqx_bridge_gcp_pubsub/src/emqx_bridge_gcp_pubsub_consumer_worker.erl 2 93.31%
apps/emqx_dashboard/src/emqx_dashboard_monitor.erl 2 64.14%
apps/emqx_resource/src/emqx_resource_buffer_worker.erl 3 93.18%
apps/emqx/src/emqx_channel.erl 3 87.41%
Totals Coverage Status
Change from base Build 5419115689: -0.05%
Covered Lines: 30676
Relevant Lines: 37435

馃挍 - Coveralls

@@ -1186,3 +1205,6 @@ convert_timestamp(MillisecondsTimestamp) ->
Secs = MicroTimestamp div 1000_000 - MegaSecs * 1000_000,
MicroSecs = MicroTimestamp rem 1000_000,
{MegaSecs, Secs, MicroSecs}.

uuid_str(UUID, DisplyOpt) ->
uuid:uuid_to_string(UUID, DisplyOpt).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
uuid:uuid_to_string(UUID, DisplyOpt).
uuid:uuid_to_string(UUID, DisplayOpt).

Copy link
Member Author

Choose a reason for hiding this comment

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

Will fix it in other PR

@@ -1186,3 +1205,6 @@ convert_timestamp(MillisecondsTimestamp) ->
Secs = MicroTimestamp div 1000_000 - MegaSecs * 1000_000,
MicroSecs = MicroTimestamp rem 1000_000,
{MegaSecs, Secs, MicroSecs}.

uuid_str(UUID, DisplyOpt) ->
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
uuid_str(UUID, DisplyOpt) ->
uuid_str(UUID, DisplayOpt) ->

@lafirest lafirest merged commit 1ea92d4 into emqx:master Jun 30, 2023
140 checks passed
@lafirest lafirest deleted the feat/porti_uuid_el_v4 branch June 30, 2023 10:37
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

4 participants