Commit Graph

18445 Commits

Author SHA1 Message Date
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
Thales Macedo Garitezi
1b56216104
Merge pull request #11878 from kjellwinblad/kjell/shared_con/test/stop_connector_fix
test(emqx_bridge_v2_api_SUITE): fix broken test case
2023-11-03 15:46:56 -03:00
Zaiming (Stone) Shi
77723ada01
Merge pull request #11863 from id/1101-ci-cost-reduction
ci cost reduction
2023-11-03 19:09:39 +01: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
36837e5624
Merge pull request #11870 from zmstone/1102-add-description-field-to-bridge-and-connector
feat(bridge): add description field to bridge and connector
2023-11-03 12:50:42 +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
Ivan Dyachkov
7acf3cfef7 test: kafka bridge is enterprise only feature 2023-11-02 16:15:28 +01:00
Ivan Dyachkov
26380f48f8 ci: split emqx_bridge_kafka test in 3 groups 2023-11-02 16:13:31 +01:00
Ivan Dyachkov
4495054714 ci: optimize runners usage
- always use github runners for lightweight jobs
- prefer self-hosted runners in private forks
- prefer self-hosted runners for workflows with large matrix
2023-11-02 16:13:31 +01:00
Ivan Dyachkov
8e7edaf745 ci: limit retention on all artifacts 2023-11-02 16:13:31 +01:00
Ivan Dyachkov
a69cfdc8cd ci: do not use github's macos runner in PRs 2023-11-02 16:13:31 +01: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 @docs + 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