Kjell Winblad
a4f855108c
fix: do not crash when showing rule unsing the cmd interface
...
Before the change the command line command
$ bin/emqx ctl rules show rule_0hyd
would crash if the rule had bridge actions. This has now been fixed by
adding a handler for printing bridge actions.
Fixes:
https://emqx.atlassian.net/browse/EMQX-12548
2024-06-18 15:17:25 +02:00
firest
e4e53844d5
feat(events): add new hook && event `client.check_authn_complete`
2024-06-04 17:55:21 +08:00
JianBo He
1642b06bf9
test: add tests
2024-05-07 10:30:53 +08:00
Kjell Winblad
9998940aa2
fix(trace): several improvements thanks to comments from @zmstone
2024-04-11 16:48:43 +02:00
Kjell Winblad
7bcd553786
test: move test case with rule_engine dep from emqx to emqx_rule_engine
2024-04-09 14:08:46 +02:00
Kjell Winblad
c206ee37e0
fix(rule SQL): allow expressions as array items
...
Fixes:
https://github.com/emqx/emqx/issues/12465
https://emqx.atlassian.net/browse/EMQX-11953
2024-03-06 15:38:19 +01:00
Zaiming (Stone) Shi
46877e979b
chore: update copyright-year
2024-02-23 08:21:06 +01:00
Thales Macedo Garitezi
cea857cb8e
fix(rule_api): fix sql test when testing against events
...
Fixes https://emqx.atlassian.net/browse/EMQX-11449
2023-12-04 15:24:09 -03:00
JianBo He
c8b5c51bbc
chore: fix failed test cases
2023-11-28 09:53:46 +08:00
Ivan Dyachkov
0c91bec98d
chore: merge 'upstream/release-53'
2023-11-08 09:24:38 +01:00
Thales Macedo Garitezi
c84e4a4187
fix(rule_engine): don't enable a rule that references non-existent bridge
2023-11-03 09:24:53 -03:00
Andrew Mayorov
f689d6c233
fix(tpl): ensure backward compat in `emqx_rule_engine`
...
Missing bindings in string templates will be rendered as "undefined",
as before. Rendering still assumes that missing binding with implicit
default (`undefined`) is an error.
This will also restore complete backward compat in `emqx_prometheus`.
2023-11-02 17:11:11 +07:00
Andrew Mayorov
b812f9af5a
feat(tpl): use `emqx_connector_template` in `emqx_rule_engine` app
2023-11-02 17:11:10 +07:00
Thales Macedo Garitezi
8c4beec6f0
test(rule_engine): add test to exemplify `foreach` with json array payload
...
Relates to https://emqx.atlassian.net/browse/EMQX-11174
2023-10-19 18:19:42 -03:00
Ilya Averyanov
1eb75b43c4
chore(auth): split emqx_authn and emqx_authz apps
2023-10-05 13:41:50 +03:00
Thales Macedo Garitezi
e089fda260
Merge pull request #11568 from thalesmg/republish-props-m-20230905
...
feat(republish): allow templating mqtt properties
2023-09-07 16:43:00 -03:00
Thales Macedo Garitezi
68293231b8
test: add cases for more complex placeholders
2023-09-07 13:40:03 -03:00
Thales Macedo Garitezi
02b8bbf76a
chore: drop templating support for `Subscription-Identifier`
...
This is highly-dependent on the session state, as is `Topic-Alias`.
2023-09-07 13:40:03 -03:00
Thales Macedo Garitezi
78c5a779d7
feat(republish): allow templating mqtt properties
...
Fixes https://emqx.atlassian.net/browse/EMQX-10912
2023-09-06 09:54:02 -03:00
Thales Macedo Garitezi
66dec69d09
fix(rule_engine): capture function_clause errors
...
Fixes https://emqx.atlassian.net/browse/EMQX-10798
2023-08-18 13:51:19 -03:00
JianBo He
5e4855334e
Revert "Fix(topicidx): allow to return matches unique by record id"
2023-07-27 13:39:37 +08:00
zhongwencool
2c193f26e6
Merge pull request #11332 from HJianBo/fix-topic-index-unique-bugs
2023-07-25 19:07:07 +08:00
JianBo He
e630331de1
fix(rule): fix a quering problem when 'a/b' and 'a/b/#' exist at the same time.
...
When using `ets:next` to query the next level of topic words, we should prioritize the next level
of '#', '+'.
2023-07-24 23:04:53 +08:00
JianBo He
dcf4819c04
test(rule): add tests to ensure the rules ordering
2023-07-24 19:30:34 +08:00
firest
af6405fa25
fix(nested_put): fix a data loss bug introduced by #11172
2023-07-24 16:39:37 +08:00
Thales Macedo Garitezi
f9452241bd
test(rules): add a few more tests to assert our rule evaluation behavior
2023-07-14 10:23:20 -03:00
firest
902603780b
test(ruleengine): add test for the fix of duplicate payload
2023-07-03 18:22:35 +08:00
Stefan Strigler
321fd53132
fix: use ReplyTo in QUERY for async
2023-06-29 16:09:45 +02:00
Stefan Strigler
422c79583a
test(emqx_rule_engine): fix simple sync
2023-06-29 16:09:45 +02:00
Stefan Strigler
837acd4234
test(emqx_rule_engine): test rule metrics
2023-06-29 16:09:45 +02:00
Kjell Winblad
cf31b65076
fix: rule engine different behavior for div and mod
...
Previously, the div operation could only be used as an infix operation
while mod could only be used as a function call. After this commit, one
can use both div and mod using function call syntax and infix syntax.
Fixes: https://emqx.atlassian.net/browse/EMQX-10216
2023-06-12 17:20:52 +02:00
某文
367a0e312a
chore: remove config_path() function
2023-06-02 07:09:08 +08:00
Andrew Mayorov
29fe201676
fix(ruleeng): parse bridge id on create / update
...
Instead of parsing it every time in the `send_message/2` hot path.
2023-05-31 17:08:42 +03:00
Thales Macedo Garitezi
447b76464b
Merge branch 'release-50' into merge-r50-into-v50-a
2023-05-17 14:50:18 -03:00
firest
18043150be
fix: cannot access columns exported by FOREACH in DO clause
2023-05-17 10:55:47 +08:00
Zaiming (Stone) Shi
3c64735b87
feat(rule_engine): support external SQL function provider
2023-05-15 08:58:40 +02:00
Stefan Strigler
f8e9e54393
refactor: move emqx_json to emqx_utils_json
2023-04-14 13:31:27 +02:00
Kjell Winblad
0e66eb5f3f
feat(rule engine sql): enable both ' and " strings in FROM clause
...
This commit upgrades the rulesql dependency to version 1.5 instead of
1.4. The difference between these two versions is that strings surrounded
by ' and " are supported in FROM clauses in version 1.5, but in version
1.4, only strings surrounded by " are supported.
Fixes:
https://emqx.atlassian.net/browse/EMQX-9243
2023-04-04 10:36:48 +02:00
Thales Macedo Garitezi
1824e7efcc
fix(rule_engine): count referenced bridges in `from` clauses as dependencies (rv5.0)
...
Fixes https://emqx.atlassian.net/browse/EMQX-9325
Currently, ingress bridges referenced in the `FROM` clause of rules
are not being accounted as dependencies.
When we try to delete an ingress bridge that's referenced in a rule
like `select * from "$bridges/mqtt:ingress"`, that bridge does not
trigger an UI warning about dependent actions.
2023-03-28 10:31:10 -03:00
Zaiming (Stone) Shi
dbc10c2eed
chore: update copyright year 2023
2023-01-02 09:22:27 +01:00
Zaiming (Stone) Shi
7ee53e5319
Merge tag 'v5.0.11' into dev/ee5.0
2022-11-28 21:02:21 +01:00
Zaiming (Stone) Shi
f3df2c80d8
feat: add user_properties arg for republish action
2022-11-22 20:09:59 +01:00
kraftwerk28
00c57de4c3
feat: do not drop MQTTv5 properties in rule/bridge
2022-11-22 20:09:59 +01:00
Zaiming (Stone) Shi
09455edae8
Merge tag 'v5.0.10' into dev/ee5.0
2022-11-16 16:20:30 +01:00
JimMoen
4f00206693
test: different resons for disconnect event
2022-11-08 23:22:58 +08:00
Shawn
60a90858f8
feat: check dependent actions before removing the bridges
2022-09-06 15:34:23 +08:00
Shawn
6685a3c5a8
fix: remove the 'headers' field from the rule events
2022-06-17 15:57:10 +08:00
Shawn
55fce33477
fix: add telemetry testcases in all/0
2022-05-25 21:55:28 +08:00
Shawn
a157539710
refactor(rule): rename http_bridge -> webhook
2022-05-25 18:56:12 +08:00
Shawn
71de9616d3
refactor(rule): rename outputs -> actions
2022-05-25 17:02:37 +08:00