Zaiming (Stone) Shi
a32cd20758
refactor(emqx_authn_jwt_schema): add alias for verify_claims
...
verifiy_claims is a list after converted, but input is a map
2023-11-12 11:39:44 +01:00
Zaiming (Stone) Shi
021f7e6b49
refactor(schema): comma_separated_list is list(string()) not list(any())
2023-11-12 11:37:58 +01:00
Zaiming (Stone) Shi
06e440260f
refactor(schema): add args to map alias
2023-11-12 11:29:33 +01:00
Zaiming (Stone) Shi
8be718b22f
refactor(emqx_schema): delete unused type bar_separated_list
2023-11-12 11:29:33 +01:00
Zaiming (Stone) Shi
ff5916e33f
docs: fix bad html tag
2023-11-12 10:31:37 +01:00
Xinyu Liu
7bb3ca5519
Merge pull request #11909 from emqx/bugfix-plugins
...
fix: emqx failed to start if plugin dir is removed by the user
2023-11-11 10:51:26 +08:00
Thales Macedo Garitezi
088de9476c
fix(ds): use integer for tag values
...
Follow up to https://github.com/emqx/emqx/pull/11906#discussion_r1389115973
2023-11-10 11:26:32 -03:00
ieQu1
5170267fef
Merge pull request #11924 from ieQu1/dev/emqx-ds-behavior
...
feat(ds): Introduce emqx_ds behavior
2023-11-10 15:23:28 +01:00
Kjell Winblad
6ebf0d1bdd
fix: reflect bridge V1 upgrade in override configurations
...
Fixes:
https://emqx.atlassian.net/browse/EMQX-11353
2023-11-10 14:52:29 +01:00
Zaiming (Stone) Shi
101990b8fc
test: fix schema tests after types change
2023-11-10 14:23:43 +01:00
Zaiming (Stone) Shi
e653c6b4e0
chore: bump app versions
2023-11-10 13:41:51 +01:00
Zaiming (Stone) Shi
855b3c5b29
test: ensure atom exists
2023-11-10 13:41:51 +01:00
Zaiming (Stone) Shi
f1de0aa176
fix(schema): add namespace to authn schemas
2023-11-10 13:41:51 +01:00
Zaiming (Stone) Shi
86110824eb
feat: upgrade hocon to 0.40.0 which supports union type display name
2023-11-10 13:41:51 +01:00
Zaiming (Stone) Shi
8a4fba431e
refactor(emqx_limiter_schema): use typerefl alias
2023-11-10 13:41:51 +01:00
Zaiming (Stone) Shi
d603de10e6
refactor(schema): add namespace/0 to all schema modules
2023-11-10 13:41:51 +01:00
Zaiming (Stone) Shi
7b59d46854
fix(schema): add namesapce to sso schema
2023-11-10 13:41:51 +01:00
Zaiming (Stone) Shi
6b3aaf5b24
refactor(emqx_bridge_gcp_pubsub): use typerefl alias
2023-11-10 13:41:51 +01:00
Zaiming (Stone) Shi
b24b66081a
refactor(authn/authz_http_schema): use typerefl alias
2023-11-10 13:41:51 +01:00
ieQu1
2ade6da7a6
fix(ds): Remove redundand type
2023-11-10 12:53:30 +01:00
ieQu1
feef23fc08
feat(ds): Pass store_batch through RPC
2023-11-10 12:16:39 +01:00
ieQu1
8dc8237331
feat(ds): Introduce emqx_ds behavior
2023-11-10 12:16:39 +01:00
William Yang
0fc4bcaf0d
Merge pull request #11912 from qzhuyan/test/william/quic-multistream-flaky
...
test(quic): fix flaky
2023-11-10 11:13:35 +01:00
Zaiming (Stone) Shi
3e2ce57cb1
refactor(emqx_bridge_greptimedb): use typerefl alias
2023-11-10 08:45:20 +01:00
Zaiming (Stone) Shi
46fffa401e
refactor(emqx_prometheus_schema): use typerefl alias
2023-11-10 08:45:20 +01:00
Zaiming (Stone) Shi
ae24b45d1b
fix(schema): add type namespce to emqx_dashboard_sso_ldap
2023-11-10 08:45:20 +01:00
Zaiming (Stone) Shi
a2700771c9
refactor(emqx_s3_schema): make type readable
2023-11-10 08:45:20 +01:00
Zaiming (Stone) Shi
b3df8604fc
refactor(emqx_conf_schema): use hocon enum type for log levels
2023-11-10 08:45:20 +01:00
Zaiming (Stone) Shi
df96798c53
refactor(http_bridge): use more readable type for pool_type
2023-11-10 08:45:20 +01:00
Zaiming (Stone) Shi
40c2ca134d
refactor(schema): delete unused type cipher()
2023-11-10 08:45:20 +01:00
Zaiming (Stone) Shi
7a0a0bee98
refactor(schema): change file() type to string()
2023-11-10 08:45:20 +01:00
Zaiming (Stone) Shi
af3dfc91b1
refactor(schema): change log_lvel to enum type
2023-11-10 08:45:20 +01:00
Zaiming (Stone) Shi
3d20e566d8
docs: add namespace to authn and authz schema
2023-11-10 08:45:20 +01:00
Zaiming (Stone) Shi
9c1a1c7de8
Merge pull request #11919 from thalesmg/action-api-swagger-nits-r53-20231109
...
fix(actions_api): change bridge v2 occurrences to action
2023-11-10 07:35:35 +01:00
ieQu1
38d004e06e
Merge pull request #11913 from ieQu1/dev/fix-hooks-comment
...
chore(hooks): Fix comment
2023-11-10 03:15:54 +01:00
ieQu1
ced7be61f0
Merge pull request #11917 from ieQu1/dev/fix-packet-id-to-seqno-trans
...
fix(ds): Fix packet id -> sequence number translation
2023-11-09 22:57:16 +01:00
Thales Macedo Garitezi
371a49304d
Merge branch 'release-53' into sync-r53-to-m-20231109
2023-11-09 17:19:23 -03:00
ieQu1
5aa9d026df
fix(ds): Apply review remarks
...
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2023-11-09 21:16:59 +01:00
ieQu1
b812db1e3c
fix(ds): Fix packet id -> sequence number translation
2023-11-09 20:12:39 +01:00
Thales Macedo Garitezi
2d539463cd
test: fix flaky test
...
```
Testing lib.emqx.emqx_cm_SUITE: *** FAILED test case 24 of 31 ***
%%% emqx_cm_SUITE ==> t_stepdown_session_takeover_begin_timeout: FAILED
%%% emqx_cm_SUITE ==>
Failure/Error: ?assertEqual([<0.6635.8>,<0.6520.8>], lists : sort ( emqx_cm : lookup_channels ( ClientId ) ))
expected: [<0.6635.8>,<0.6520.8>]
got: [<0.6520.8>,<0.6635.8>]
line: 309
```
2023-11-09 15:32:52 -03:00
Thales Macedo Garitezi
ee87f90b0d
Merge pull request #11906 from thalesmg/ds-avoid-records-m-20231108
...
chore(ds): avoid using records in persistence / rpc
2023-11-09 14:25:27 -03:00
Thales Macedo Garitezi
7977ae95c0
fix(actions_api): change bridge v2 occurrences to action
...
Fixes https://emqx.atlassian.net/browse/EMQX-11338
2023-11-09 14:20:08 -03:00
Thales Macedo Garitezi
eabd09051a
feat(actions_api): add `/action_types` API
2023-11-09 13:54:57 -03:00
ieQu1
42a9f0eb6b
Merge pull request #11914 from ieQu1/dev/speed-up-poll
...
fix(ds): Speed up polling for the new messages
2023-11-09 16:40:06 +01:00
Thales Macedo Garitezi
42536bb5f7
chore(ds): avoid using records in persistence / rpc
...
Fixes https://emqx.atlassian.net/browse/EMQX-11279
2023-11-09 12:00:25 -03:00
ieQu1
cf4a46a78b
fix(ds): Speed up polling for the new messages
...
Poll immediately if the previous poll returned non-empty result
2023-11-09 14:22:32 +01:00
ieQu1
3350bda446
chore(hooks): Fix comment
2023-11-09 14:05:13 +01:00
firest
2b97800c8b
fix(limiter): simplify the descriptions for fields of the limiter
2023-11-09 18:00:09 +08:00
William Yang
f7a2359329
test(quic): fix flaky
2023-11-09 10:56:16 +01:00
Shawn
e0f4a2014d
fix: emqx failed to start if plugin dir is removed by the user
2023-11-09 16:01:20 +08:00
Zaiming (Stone) Shi
42fa1289a1
Merge pull request #11905 from thalesmg/tag-e531-alpha5-r53-20231108
...
chore: prepare to tag `e5.3.1-alpha.5`
2023-11-08 23:39:33 +01:00
Zaiming (Stone) Shi
f95058a3e7
Merge pull request #11897 from zmstone/1107-fix-cluster-conf-sync-wait-loop
...
1107 fix cluster conf sync wait loop
2023-11-08 23:37:09 +01:00
Zaiming (Stone) Shi
1e3500ffd2
fix(emqx_conf_app): ensure log data fields
...
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2023-11-08 21:19:22 +01:00
Thales Macedo Garitezi
8540566eba
chore: prepare to tag `e5.3.1-alpha.5`
2023-11-08 13:02:19 -03:00
Zaiming (Stone) Shi
f9e9748cec
fix(cluster-rpc): boot from local config if table loaded
...
When EMQX boots up, it tries to get latest config from peer (core type)
nodes, if none of the nodes are replying, the node will decide
to boot with local config (and replay the committed changes) if
the commit table is loaded from disk locally (an indication of the
data being latest), otherwise it will sleep for 1-2 seconds and
retry.
This lead to a race condition, e.g. in a two nodes cluster:
1. node1 boots up
2. node2 boots up and copy mnesia table from node1
3. node1 restart before node2 can sync cluster.hocon from it
4. node1 boots up and copy mnesia table from node2
Now that both node1 and node2 has the mnesia `load_node` pointing
to each other (i.e. not a local disk load).
Prior to this fix, the nodes would wait for each other in a dead loop.
This commit fixes the issue by allowing node to boot
with local config if it does not have a lagging.
2023-11-08 15:06:47 +01:00
ieQu1
788698f157
Merge pull request #11720 from ieQu1/dev/refactor-persistent-session
...
Refactor emqx_durable storage application and introduce learned topic structure storage
2023-11-08 14:27:40 +01:00
Thales Macedo Garitezi
f5456135aa
fix(bridge_v2_api): take status and error from bridge, not the connector
...
Fixes https://emqx.atlassian.net/browse/EMQX-11284
Fixes https://emqx.atlassian.net/browse/EMQX-11298
2023-11-08 09:53:42 -03:00
Ilya Averyanov
d061d64c70
fix(plugins): fix backward compatibility
2023-11-08 12:36:09 +03:00
Ivan Dyachkov
0c91bec98d
chore: merge 'upstream/release-53'
2023-11-08 09:24:38 +01:00
ieQu1
a1cdbaa76d
fix(ds): Address code review remarks
2023-11-08 04:31:27 +01:00
ieQu1
c030188eb7
chore(ds): Add rebar.config file to app/emqx_durable_storage
2023-11-08 03:04:19 +01:00
ieQu1
7cb0322856
fix(emqx): Move bpapi and emqx message record to emqx_utils app
2023-11-08 03:04:19 +01:00
ieQu1
74cb43f8b1
fix(ds): Add unique ID to the key
2023-11-08 03:04:19 +01:00
Andrew Mayorov
54951c273f
feat(ds): mix safe cutoff into keymapper filter during iteration
2023-11-08 03:04:19 +01:00
Andrew Mayorov
7a94db25c3
fix(ds): don't iterate over incomplete epoch in bitmask lts storage
2023-11-08 03:04:19 +01:00
Andrew Mayorov
46d8301bc0
feat(emqx): expose timestamp function in `emqx_message`
...
So that the code that relies on it would not need to guess clock source
and precision.
2023-11-08 03:04:19 +01:00
ieQu1
38b7f516bc
fix(ds): Change the directory where message database is stored
2023-11-08 03:04:19 +01:00
ieQu1
8e5dda40be
fix(ds): Fix static checks
2023-11-08 03:04:19 +01:00
ieQu1
99329e1243
refactor(ds): Address review remarks
2023-11-08 03:04:19 +01:00
ieQu1
2de79dd9ac
feat(ds): Replay QoS1 messages
2023-11-08 03:04:19 +01:00
ieQu1
e745e42093
test(ds): Explore full range of keys when testing ratchet function
2023-11-08 03:04:19 +01:00
ieQu1
87689890ff
chore(ds): Fix linter and compilation warnings
2023-11-08 03:04:19 +01:00
ieQu1
465e8a90dd
revert(ds): Remove change from the old protocol file
2023-11-08 03:04:19 +01:00
ieQu1
ef46c09caf
feat(ds): Implement ratchet function for bitmask keymapper
2023-11-08 03:04:19 +01:00
ieQu1
164ae9e94a
feat(ds): LTS bitfield storage passes all tests
2023-11-08 03:04:19 +01:00
ieQu1
56b6b176c2
fix(ds): LTS shall keeps the concrete topic indexes
2023-11-08 03:04:19 +01:00
ieQu1
7428e7037b
feat(ds): Bitfield + Learned Topic Structure
2023-11-08 03:04:19 +01:00
ieQu1
ac91dbc58f
feat(ds): Restore LTS trie from a dump
2023-11-08 03:04:19 +01:00
ieQu1
f1ab7c8a7c
feat(ds): Add persist callback to LTS trie
2023-11-08 03:04:19 +01:00
ieQu1
c149e0e2df
fix(ds): Pass topic filter to emqx_ds:make_iterator call
2023-11-08 03:04:19 +01:00
ieQu1
51a6f623fd
refactor(ds): Split out bitfield keymapper to a different module
2023-11-08 03:04:19 +01:00
Thales Macedo Garitezi
903b3863d1
chore(ps_ds): make persistent session module use new `emqx_ds` APIs
2023-11-08 03:04:19 +01:00
ieQu1
2972bf14ee
refactor(ds): Implement create_generation gen_rpc storage layer call
2023-11-08 03:04:19 +01:00
ieQu1
6d65707d41
refactor(ds): Implement drop_db function
2023-11-08 03:04:19 +01:00
ieQu1
c6a721a7eb
refactor(ds): Passthrough open_db and get_channels to storage layer
2023-11-08 03:04:19 +01:00
ieQu1
59d01dc823
refactor(ds): Implement emqx_ds:open_db
2023-11-08 03:04:19 +01:00
ieQu1
7095cb8583
refactor(ds): Refactor storage layer
2023-11-08 03:04:19 +01:00
ieQu1
c91df2f5cd
refactor(ds): Create a prototype of replication layer
2023-11-08 03:04:19 +01:00
ieQu1
f1454bb57e
feat(ds): learned topic structure
2023-11-08 03:04:19 +01:00
Thales Macedo Garitezi
7ab57824dc
chore(ds): change return type of `storage_layer:next/{1,2}`
...
Part of https://emqx.atlassian.net/browse/EMQX-10942
The goal is to help make it clear to the caller of `next` what to do next: if the iterator
should still be used or if no new messages will ever come out of it.
From:
```erlang
-spec next(iterator()) -> {value, binary(), iterator()} | none | {error, closed}.
```
To:
```erlang
-spec next(iterator()) -> {ok, iterator(), [binary()]} | end_of_stream.
-spec next(iterator(), pos_integer()) -> {ok, iterator(), [binary()]} | end_of_stream.
```
2023-11-08 03:04:19 +01:00
Ilya Averyanov
75704513d8
fix(plugins): fix backward compatibility
2023-11-07 19:06:37 +03:00
Thales Macedo Garitezi
c4c9d7ceb3
chore: prepara to tag `e5.3.1-alpha.4`
2023-11-07 13:04:46 -03:00
Thales Macedo Garitezi
b255836cbd
Merge pull request #11890 from thalesmg/fix-kafka-unhealthy-r53-20231106
...
fix(resource): take error from action/connector before attempting query
2023-11-07 12:38:57 -03:00
Thales Macedo Garitezi
7dcdbc9e51
fix(resource): take error from action/connector before attempting query
...
Fixes https://emqx.atlassian.net/browse/EMQX-11284
Fixes https://emqx.atlassian.net/browse/EMQX-11298
2023-11-07 10:04:04 -03:00
Stefan Strigler
fa740a1927
docs: fix inconsistencies for bridge and connector operations
...
It's only `start` allowed for now. Also fixed some wordings.
2023-11-07 13:58:23 +01:00
Zaiming (Stone) Shi
f19904d43c
Merge pull request #11877 from zmstone/1102-rename-kafka-to-config
...
Rename connector channel related configs in bridge_v2 to 'parameters'
2023-11-07 13:41:55 +01:00
Thales Macedo Garitezi
9742dae30d
Merge pull request #11889 from thalesmg/rename-bridgev2-to-action-apis-r53-20231106
...
chore: rename `bridges_v2` -> `actions` in the public facing APIs
2023-11-07 09:29:06 -03:00
Zaiming (Stone) Shi
bb8f80f256
test: add test case to pin bridge schema json version 0.1.0
2023-11-06 21:59:36 +01:00
Zaiming (Stone) Shi
9a26c03a5c
refactor: unify top level field names for bridge v2
2023-11-06 21:45:08 +01:00
Thales Macedo Garitezi
2b8cf50a1d
chore: rename `bridges_v2` -> `actions` in the public facing APIs
...
Fixes https://emqx.atlassian.net/browse/EMQX-11330
After feedback from Product team, we should rename `bridges_v2` to `actions` everywhere.
We'll start with the public facing APIs.
- HTTP API
- Hocon schema root key
2023-11-06 15:37:07 -03:00
Zaiming (Stone) Shi
6af6309301
chore: upgrade to hocon 0.39.19
2023-11-06 19:16:19 +01:00
Thales Macedo Garitezi
f17b762596
chore: don't disable rule that references non-existent bridge
...
After feedback from QA, we decided to rollback enforcing the rule to be disabled.
2023-11-06 10:09:14 -03:00
Zaiming (Stone) Shi
5881e34d4e
Merge pull request #11874 from zmstone/1103-validate-bridge-type-and-name-at-entry
...
fix(bridge): do not allow dot in bridge name
2023-11-03 23:04:10 +01:00
Thales Macedo Garitezi
0ff4465c78
Merge pull request #11875 from thalesmg/fix-kafka-connecting-r53-20231103
...
fix(kafka_producer): don't return `disconnected` when there are connections issues while starting the bridge
2023-11-03 17:56:00 -03:00
Thales Macedo Garitezi
a064eecb68
Merge pull request #11879 from thalesmg/fix-rule-api-downgrade-bridge-r53-20231103
...
fix(rules_api): downgrade bridge id
2023-11-03 17:26:09 -03:00
Zaiming (Stone) Shi
21a167e1a5
Merge pull request #11873 from zmstone/1103-unhide-nodelay-field
...
fix(kafka): do not hide nodelay field
2023-11-03 20:49:29 +01:00
Zaiming (Stone) Shi
600747b7e5
fix(bridge): do not allow dot in bridge name
...
also validate name at the API entry
2023-11-03 20:44:57 +01:00
Thales Macedo Garitezi
0ee74cd8ae
fix(rules_api): downgrade bridge id
...
Fixes https://emqx.atlassian.net/browse/EMQX-11312
2023-11-03 15:57:13 -03:00
Thales Macedo Garitezi
4265ef66cc
fix(kafka_producer): don't return `disconnected` when there are connection issues while starting the bridge
...
Fixes https://emqx.atlassian.net/browse/EMQX-11284
Fixex https://emqx.atlassian.net/browse/EMQX-11298
We don't enforce the connection to be up when starting/creating the bridge, otherwise the
status will be `disconnected` for a possibly transient reason such as network issues or
Kafka broker restart.
Same applies for Azure Event Hub Producer bridge, as they share the same module.
2023-11-03 15:49:36 -03:00
Kjell Winblad
dd8085d3a4
test(emqx_bridge_v2_api_SUITE): fix broken test case
2023-11-03 17:49:25 +01:00
Stefan Strigler
8a1b370a5e
Merge pull request #11876 from sstrigler/EMQX-11317-creating-a-bridge-for-a-non-existent-or-non-matching-connector-results-in-a-crash
...
handle errors from pre/post_config_update
2023-11-03 16:26:21 +01:00
Thales Macedo Garitezi
953d483c24
Merge pull request #11864 from thalesmg/test-enable-rule-check-deps-r53-20231101
...
fix(rule_engine): don't enable a rule that references non-existent bridge
2023-11-03 11:01:38 -03:00
Stefan Strigler
45bfcea6ae
Merge pull request #11866 from sstrigler/EMQX-11294-e-5-3-1-swaggers-several-misdescriptions-of-ap-is
...
EMQX 11294 swaggers several misdescriptions of APIs
2023-11-03 14:55:46 +01:00
Stefan Strigler
dc11008993
fix(emqx_bridge): handle errors from pre/post_config_update
2023-11-03 14:11:25 +01:00
Zaiming (Stone) Shi
fcecd3e9d4
fix(kafka): do not hide nodelay field
...
otherwise:
it's returned in the GET response,
but it's not allowed in the POST request
2023-11-03 13:35:52 +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
Kjell Winblad
65ba0b9de4
Merge pull request #11869 from kjellwinblad/kjell/shared_con/start_feedback/EMQX-11304
...
fix(bridge_v2): start operation should return an error when unsuccessful
2023-11-03 13:16:32 +01:00
Zaiming (Stone) Shi
4dd054b0a2
test(emqx_bridge_kafka_impl_consumer_SUITE): fix flaky
2023-11-03 11:48:50 +01:00
Stefan Strigler
dd11a30383
docs(emqx_bridge_azure_event_hub): remove timestamp from message template example
2023-11-03 11:18:54 +01:00
Stefan Strigler
a89b0c8cf4
fix(emqx_bridge_azure_event_hub): make ssl mandatory (and give an example)
2023-11-03 11:18:38 +01:00
Kjell Winblad
ebb5997a8c
test(emqx_bridge_v2_api_SUITE): fix cluster test
2023-11-03 11:11:27 +01:00
Ivan Dyachkov
fdbf439df8
Merge pull request #11859 from cisiqo/patch-1
...
fix content type returned by Stomp
2023-11-03 08:21:08 +01:00
Zaiming (Stone) Shi
afe6f79a66
feat(bridge): add description field to bridge and connector
2023-11-03 06:53:42 +01:00
Kjell Winblad
d14d0fbcb1
fix(bridge_v2 operations): better error message
2023-11-03 06:35:42 +01:00
Kjell Winblad
36640263ba
fix(bridge_v2): start operation should return an error when unsuccessful
...
The bridge V2 HTTP API start operation should return a 400 error if the
start is unsuccessful.
The bridge V1 HTTP API compatibility layer for Bridge V2 should return a
400 error if the start or restart operation is unsuccessful.
This commit fixes the above and adds tests that checks this for the V2
HTTP API.
Fixes:
https://emqx.atlassian.net/browse/EMQX-11304
2023-11-02 18:28:22 +01:00
Andrew Mayorov
910e81bc41
Merge pull request #10442 from keynslug/ft/EMQX-9257/placeholder
...
feat(tpl): split `emqx_placeholder` into a couple of modules
2023-11-02 22:50:05 +07:00
Andrew Mayorov
729c6edff6
chore(repub): simplify error handling in MQTT props templating
2023-11-02 20:13:32 +07:00
Andrew Mayorov
f1847fe494
chore(tpl): drop unnecessary binding
2023-11-02 20:13:32 +07:00
Andrew Mayorov
e521a9f5fc
fix(utils): denote `emqx_jsonish` follows access module behaviour
...
Defined in `emqx_template`.
2023-11-02 20:13:32 +07:00
Andrew Mayorov
b5b6c3f8cc
fix(tpl): ensure full backward compat in basic connectors
2023-11-02 20:13:32 +07:00
Andrew Mayorov
02c1bd70b6
feat(tpl): factor out loose json concept into a separate module
...
Which is called `emqx_jsonish`. Also introduce an _access module_
abstraction to extract information from such data during rendering.
2023-11-02 20:13:31 +07:00
chengshq
fbd27eda6a
fix(Stomp): content type returned
2023-11-02 11:21:27 +00:00
Andrew Mayorov
69cfa740ea
fix(ruleeng): ensure full backward compatibility
2023-11-02 17:11:12 +07:00
Andrew Mayorov
75cc663786
chore(ruleeng): streamline application dependencies
2023-11-02 17:11:12 +07:00
Andrew Mayorov
8e4585d64f
chore: move template modules to `emqx_utils`
...
Even though most of the time these modules will be used by
connectors, there are exceptions (namely, `emqx_rule_engine`).
Besides, they are general enough to land there, more so given
that `emqx_placeholder` is already there.
2023-11-02 17:11:12 +07:00
Andrew Mayorov
343b679741
feat(tpl): make escaping mechanism more foolproof
...
Treat "${$}" as literal "$". This allows to template express
strings, for example, of the form "${some_var_value}" where
`some_var_value` is interpolated from bindings.
2023-11-02 17:11:11 +07: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
1fcdfe991c
fix(tpl): add few missing `@doc`s + correct typespecs
2023-11-02 17:11:11 +07:00
Andrew Mayorov
a9693eada7
fix(tpl): rename `trivial` -> `is_const`
...
This is clearer. Former naming was a bit misleading.
2023-11-02 17:11:11 +07:00
Andrew Mayorov
7bb995f0c6
feat(tpl): support `:n` SQL parameters
2023-11-02 17:11:11 +07:00
Andrew Mayorov
dfb7faf6a8
fix(tpl): ensure rough backward compat in `emqx_prometheus`
...
But also emit warning when job name template renders with errors.
2023-11-02 17:11:10 +07:00
Andrew Mayorov
49fba40ee7
fix(tpl): ensure backward compat with authz / authn templates
...
This commit leans heavy into discouraging the former approach where
only part of placeholders were interpolated, depending on `placeholders`
option.
2023-11-02 17:11:10 +07:00
Andrew Mayorov
49f5325c67
feat(tpl): unify validations / errors var representations
2023-11-02 17:11:10 +07:00
Andrew Mayorov
b812f9af5a
feat(tpl): use `emqx_connector_template` in `emqx_rule_engine` app
2023-11-02 17:11:10 +07:00
Andrew Mayorov
e1bca5844f
feat(tpl): use `emqx_connector_template` in `emqx_prometheus` app
2023-11-02 17:11:10 +07:00
Andrew Mayorov
0538a77700
feat(tpl): use `emqx_connector_template` in `emqx_authn`, `emqx_authz`
...
This slightly changes semantics: now the attempt to create authenticator
with illegal bindings in templates will fail, instead of treating them
as literals. The runtime behaviour on the other hand should be the same.
2023-11-02 17:11:10 +07:00
Andrew Mayorov
35902dc72d
feat(tpl): switch basic connectors to `emqx_connector_template`
...
Also avoid `filename:join/2` in HTTP connector since it's both OS specific
and an overkill.
2023-11-02 17:11:09 +07:00
Andrew Mayorov
28d55d72ca
feat(tpl): split `emqx_placeholder` into a couple of modules
...
Located under `emqx_connector` for now. The APIs of the new modules
are slightly different from the old ones. The new ones are more
explicit in terms of error handling. Also copy the according testsuite
from `emqx_plugin_libs` and enrich it for better coverage.
2023-11-02 17:11:09 +07:00
Zaiming (Stone) Shi
73dd2f0ffd
chore: bump version to e5.3.1-alpha.3
2023-11-02 10:36:41 +01:00
Zaiming (Stone) Shi
f5818a86e3
Merge pull request #11860 from thalesmg/fix-delete-shared-bridgev2-r53-20231101
...
fix(bridge_v1): return 400 if trying to delete shared bridge via http api v1
2023-11-02 10:30:47 +01:00