Commit Graph

9406 Commits

Author SHA1 Message Date
Shawn e0f4a2014d fix: emqx failed to start if plugin dir is removed by the user 2023-11-09 16:01:20 +08:00
Ilya Averyanov 75704513d8 fix(plugins): fix backward compatibility 2023-11-07 19:06:37 +03: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
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
Ivan Dyachkov b1ab213081 chore: merge 'upstream/release-53' into 1031-sync-r53 2023-10-31 11:06:25 +01:00
Stefan Strigler 39f49d425c test(emqx_bridge): fix test for bridge_v2_type_to_connector_type 2023-10-31 08:34:05 +01:00
Stefan Strigler 63606922f2 refactor(emqx_bridge): only one place to generate same error 2023-10-31 08:34:05 +01:00
Stefan Strigler b256241650 test(emqx_bridge_azure_event_hub): fix legacy v1 bridge API tests 2023-10-31 08:34:05 +01:00
Stefan Strigler 176bbe88bc fix: use `_producer` for AEH bridge type 2023-10-31 08:34:03 +01:00
Kjell Winblad aea449306a
Merge pull request #11842 from SergeTupchiy/EMQX-11272-fix-kafka-bridge-v1-import
EMQX-11272 fix kafka bridge v1 import
2023-10-31 07:58:54 +01:00
Kjell Winblad 9d7ed31c3a
Merge pull request #11845 from kjellwinblad/kjell/shared_con/EMQX-11271
fix: crash when listing non bridge_v1 compatible bridge_v2
2023-10-30 20:29:36 +01:00
Zaiming (Stone) Shi c07cf9051e
Merge pull request #11844 from zmstone/1030-downgrade-bridge-type-for-old-api
1030 downgrade bridge type for old api
2023-10-30 19:47:24 +01:00
Zaiming (Stone) Shi 124d79a1ca
Merge pull request #11843 from thalesmg/test-kafka-producer-nits-r53-20231030
test(kafka_producer): minor adjustments to test suite
2023-10-30 18:27:10 +01:00
Zaiming (Stone) Shi 350e8433ab fix(bridge_v2): downgrade bridge type for GET api results 2023-10-30 18:17:35 +01:00
Serge Tupchii 0562585c8f fix(emqx_mgmt_data_backup): implement importer modules ordering
`emqx_bridge_v2` depends on `emqx_connector`, so connectors must be imported first.
2023-10-30 19:14:58 +02:00
Serge Tupchii bc8c291820 fix(emqx_bridge): add import_config/1 cb to emqx_bridge_v2 2023-10-30 19:14:58 +02:00
Serge Tupchii d94193ac15 fix(emqx_connector_schema): add kafka alias for kafka_producer 2023-10-30 19:14:58 +02:00
Serge Tupchii 0935bb6225 fix(emqx_connector): fix badarity error 2023-10-30 17:52:39 +02:00
Serge Tupchii d1cd5dd817 fix(emqx_mgmt_data_backup): upgrade raw conf before validating and importing 2023-10-30 17:52:39 +02:00
Kjell Winblad 8fb426e57f fix: crash when listing non bridge_v1 compatible bridge_v2
Fixes:
https://emqx.atlassian.net/browse/EMQX-11271
2023-10-30 16:32:04 +01:00
Thales Macedo Garitezi a60b96c5fd test(kafka_producer): minor adjustments to test suite
- Use `emqx_cth_suite`.
- Use `query_mode` matrix value when setting up bridge in a couple test cases.
2023-10-30 12:13:40 -03:00
Ilya Averyanov 3f6c09b195
Merge pull request #11780 from savonarola/1017-fix-pbkdf2-validation
fix(authn): fix pbkdf2 option validation
2023-10-30 16:37:37 +02:00
Stefan Strigler 5a6e55e7af fix(emqx_bridge_kafka): schema fixes for kafka_producer in bridge_v2 2023-10-30 14:59:06 +01:00
Zaiming (Stone) Shi f463eff02d chore: e5.3.1-alpha.2 2023-10-30 14:49:08 +01:00
Zaiming (Stone) Shi 0656b6be3c refactor(emqx_config): use dynamic callback to upgrade raw config 2023-10-30 14:49:08 +01:00
Kjell Winblad 9dc3a169b3 feat: split bridges into a connector part and a bridge part
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
Co-authored-by: Stefan Strigler <stefan.strigler@emqx.io>
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>

Several bridges should be able to share a connector pool defined by a
single connector. The connectors should be possible to enable and
disable similar to how one can disable and enable bridges. There should
also be an API for checking the status of a connector and for
add/edit/delete connectors similar to the current bridge API.

Issues:
https://emqx.atlassian.net/browse/EMQX-10805
2023-10-30 14:48:47 +01:00
Zaiming (Stone) Shi 97601171a5
Merge pull request #11818 from zmstone/1025-fix-flaky-test
test: fix a flaky test case emqx_crl_cache_SUITE:t_revoked
2023-10-25 20:46:31 +02:00
Zaiming (Stone) Shi 76a8b0efd4 test: fix a flaky test case emqx_crl_cache_SUITE:t_revoked 2023-10-25 16:08:31 +02:00