Thales Macedo Garitezi
c90ca1ea53
fix(bridge_v1): always delete connector when deleting v1 bridge
...
Fixes https://emqx.atlassian.net/browse/EMQX-11287
2023-10-31 10:40:06 -03: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
350e8433ab
fix(bridge_v2): downgrade bridge type for GET api results
2023-10-30 18:17:35 +01:00
Serge Tupchii
bc8c291820
fix(emqx_bridge): add import_config/1 cb to emqx_bridge_v2
2023-10-30 19:14:58 +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
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
Ilya Averyanov
4f14e8df22
chore(source dir): split out postgresql connector
2023-10-13 16:58:57 +03:00
Ilya Averyanov
c2c56ba481
chore(auth): update tests
2023-10-05 13:41:50 +03:00
Ilya Averyanov
1eb75b43c4
chore(auth): split emqx_authn and emqx_authz apps
2023-10-05 13:41:50 +03:00
Ivan Dyachkov
dafd7c6085
chore: bump apps versions
2023-09-21 10:58:42 +02:00
zhongwencool
123d31fa7d
Merge pull request #11640 from zhongwencool/ensure-destory-resource
...
fix: always return ok when remove local resource
2023-09-21 09:21:45 +08:00
zhongwencool
dd687d9582
fix: dialyzer warning
2023-09-20 22:41:26 +08:00
zhongwencool
2f1fa2e961
chore: unified slog message formatting to improve logging consistency
2023-09-20 18:13:00 +08:00
Zaiming (Stone) Shi
e794143ae1
Merge remote-tracking branch 'origin/release-52' into 0906-sync-release-52-to-master
2023-09-06 09:08:22 +02:00
Paulo Zulato
7b607c3300
refactor: remove BridgeName from connector_config callback
...
As `bridge_name` is already in the Config parameter, this callback
doesn't need to have it on API anymore.
Fixes https://github.com/emqx/emqx/pull/11546/files#r1310778734
2023-08-31 11:01:49 -03:00
Paulo Zulato
ee77976424
fix(kafka): avoid producer name collision between Kafka and AEH bridges
...
Fixes https://emqx.atlassian.net/browse/EMQX-10860
2023-08-30 14:48:10 -03:00
Thales Macedo Garitezi
0f297ffef4
fix(bridge): validate bridge name before attempting to convert certificates
...
Fixes https://emqx.atlassian.net/browse/EMQX-10865
2023-08-29 16:32:01 -03:00
Andrew Mayorov
f57d16ba13
feat(cthsuite): add function to determine workdir of testrun
...
In a deterministic fashion, to lift the burden of undestanding where
the testrun's data should go from the test writer.
2023-08-29 21:34:01 +04:00
JimMoen
f45b5fac6f
chore: unhidden hstreamdb bridge for e5.2.0
2023-08-21 10:40:51 +08:00
Thales Macedo Garitezi
29e706c83d
refactor: move catch to dry run fn
2023-08-07 13:08:34 -03:00
Thales Macedo Garitezi
4b8cea4498
fix: make error handling more flexible
2023-08-07 13:08:34 -03:00
Thales Macedo Garitezi
963d63b899
refactor: rename temporary name
...
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2023-08-07 13:08:34 -03:00
Thales Macedo Garitezi
5c8dc092a1
fix(http_bridge): don't attempt to convert headers to atoms
...
Fixes https://emqx.atlassian.net/browse/EMQX-10653
2023-08-07 13:08:34 -03:00
Thales Macedo Garitezi
a3be1529c6
fix(schema): ensure enterprise module is correctly loaded
...
Fixes https://emqx.atlassian.net/browse/EMQX-10654
Despite loading the application in `nodetool`, we need to invoke `:module_info()` to force
the module to be actually loaded, especially when it's called in `call_hocon` to generate
the initial configurations. Otherwise, it'll fail to list all the bridge schemas.
2023-07-28 16:27:43 -03:00
Ivan Dyachkov
5ac01c9b85
Merge pull request #11360 from id/0727-sync-release-51-to-master
2023-07-27 16:58:09 +02:00
Ivan Dyachkov
cbfca8c043
chore: merge master into release-51
2023-07-27 15:19:57 +02:00
Thales Macedo Garitezi
5abe4bed88
feat: add Azure Event Hub Producer bridge
...
Fixes https://emqx.atlassian.net/browse/EMQX-10338
2023-07-27 09:22:39 -03:00
JianBo He
511d1b6ca1
chore: hide the hstreamdb http api
2023-07-24 20:11:44 +08:00
firest
8439ce0e84
chore: update app version && reboot_lists
2023-07-24 19:08:41 +08:00
Dennis Zhuang
c9550cc2e5
refactor: rename bridge greptimedb_grpc_v1 to greptimedb
2023-07-24 17:58:48 +08:00
Dennis Zhuang
6f7fbcf693
fix: compile error
2023-07-24 17:58:48 +08:00
Dennis Zhuang
975795a6e0
feat: add ci test
2023-07-24 17:58:48 +08:00
Dennis Zhuang
89bce99870
test: greptimedb data brige
2023-07-24 17:58:48 +08:00
Dennis Zhuang
c5078980f3
feat: adds the greptimedb bridge to emqx modules
2023-07-24 17:58:48 +08:00
JimMoen
613dc1646c
chore: hidden hstreamdb bridge schema
2023-07-24 17:22:29 +08:00
Thales Macedo Garitezi
41b780f7f2
Merge pull request #11280 from thalesmg/unhide-gcp-consumer-master-20230717
...
chore(gcp_pubsub_consumer): unhide GCP PubSub Consumer bridge for e5.2.0
2023-07-19 10:26:42 -03:00
Ivan Dyachkov
b7f0f7b32d
chore: merge master into release-51
2023-07-19 09:28:05 +02:00
Paulo Zulato
484519dcf9
feat(kinesis): implement Amazon Kinesis Producer bridge
...
Fixes https://emqx.atlassian.net/browse/EMQX-10474
Fixes https://emqx.atlassian.net/browse/EMQX-10475
2023-07-17 11:51:42 -03:00
Thales Macedo Garitezi
05c3e023a9
chore(gcp_pubsub_consumer): unhide GCP PubSub Consumer bridge for e5.2.0
...
Fixes https://emqx.atlassian.net/browse/EMQX-10506
2023-07-17 11:24:21 -03:00
Thales Macedo Garitezi
ab5fd1e5c3
Merge pull request #11260 from thalesmg/fix-rule-maps-nested-put-r51
...
fix(rule_maps): avoid losing data when using `emqx_rule_maps:nested_put`
2023-07-14 15:02:24 -03:00
Thales Macedo Garitezi
01b143c5ad
fix(resource): don't destruct error tuple
...
Otherwise, `emqx_resource:query` won't correctly deem the resource to
be unhealthy when there's an extra message.
2023-07-13 16:12:33 -03:00
Thales Macedo Garitezi
924ed06760
Merge pull request #11256 from thalesmg/bridge-api-ecpool-400-errors-20230712-r51
...
fix(bridge_api): return 400 for all ecpool start errors
2023-07-13 10:05:07 -03:00
Thales Macedo Garitezi
bbff1d6ae9
fix(bridge_api): return 400 for all ecpool start errors
...
Fixes https://emqx.atlassian.net/browse/EMQX-10460
(https://emqx.atlassian.net/browse/EMQX-10460?focusedCommentId=30126 )
2023-07-12 15:32:34 -03:00
Thales Macedo Garitezi
bffef386c1
fix(rule_maps): avoid losing data when using `emqx_rule_maps:nested_put`
...
Fixes https://emqx.atlassian.net/browse/EMQX-10541
2023-07-12 14:28:18 -03:00
Kjell Winblad
6ce47614d2
refactor: HTTP bridge into the emqx_bridge_http app
...
Fixes:
https://emqx.atlassian.net/browse/EMQX-9568
2023-07-12 14:47:02 +02:00
Kjell Winblad
f28510b3ad
refactor: HTTP connector into emqx_bridge_http app
2023-07-12 14:46:43 +02:00
JimMoen
b089fba100
refactor: rm ee_bridge and ee_connector application
2023-07-07 12:25:37 +08:00
firest
a1d2b2ca51
chore: bump app versions
2023-07-07 11:17:54 +08:00
Thales Macedo Garitezi
353cc065db
Merge pull request #11175 from thalesmg/fix-mysql-start-error
...
fix(mysql_bridge): make nxdomain a 400 API error
2023-07-06 08:26:12 -03:00
Andrew Mayorov
d568d43fe4
test(bridge): switch `emqx_bridge_api_SUITE` to use new tooling
2023-07-04 13:20:03 +02:00
Andrew Mayorov
f76f3b77d7
test: add tooling to make testruns more isolated and predictable
...
Also showcase their usage in some of the existing testsuites.
2023-07-04 12:53:39 +02:00
Thales Macedo Garitezi
c216dfd96b
fix(mysql_bridge): make nxdomain a 400 API error
...
Fixes https://emqx.atlassian.net/browse/EMQX-10460
2023-06-30 16:10:09 -03:00
Stefan Strigler
07cf250093
Merge pull request #11126 from sstrigler/EMQX-8842-fix-rule-metrics
...
fix(emqx_rule_engine): set inc_action_metrics as async_reply_fun
2023-06-30 20:07:23 +02:00
Thales Macedo Garitezi
6fe6aa7997
Merge pull request #11162 from thalesmg/treat-404-as-failure-master
...
fix(webhook): treat 404 and other error replies as errors in async requests
2023-06-30 13:13:18 -03:00
Thales Macedo Garitezi
ca435975de
fix(webhook): treat http status code 429 as recoverable
2023-06-30 09:46:03 -03:00
Thales Macedo Garitezi
59b109eb5c
fix(webhook): treat 404 and other error replies as errors in async requests
...
Fixes https://emqx.atlassian.net/browse/EMQX-10405
The problem here was that, for async requests, ehttpc responses of the form `{ok, 4__, _,
_}` and similar were being treated as successes.
2023-06-29 15:45:23 -03:00
Stefan Strigler
d71d70c889
fix: allow to pass in Opts rather than just a ReplyTo
2023-06-29 16:09:45 +02:00
Stefan Strigler
40dd34a704
fix: use reply_to instead of async_reply_fun
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
Stefan Strigler
ae636a52d7
fix(emqx_rule_engine): set inc_action_metrics as async_reply_fun
2023-06-29 16:09:45 +02:00
Thales Macedo Garitezi
30e0b4be54
test(gcp_pubsub_consumer): add more tests and improve bridge
...
Fixes https://emqx.atlassian.net/browse/EMQX-10309
2023-06-28 14:08:40 -03:00
Thales Macedo Garitezi
c4fc0e767e
feat: allow specifying more helpful messages for unhealthy targets
2023-06-27 17:13:43 -03:00
Thales Macedo Garitezi
f01de238b2
chore: bump app vsns
2023-06-22 10:01:12 -03:00
Thales Macedo Garitezi
7ef03d9e1f
Merge pull request #11090 from thalesmg/gcp-pubsub-consumer
...
feat(gcp_pubsub_consumer): implement GCP PubSub Consumer bridge
2023-06-22 09:17:45 -03:00
zhongwencool
093cdab838
chore: to_integer to make sure integer is converted
2023-06-20 08:39:23 +08:00
zhongwencool
07172e42f0
test: integer CI check failed
2023-06-20 08:39:23 +08:00
Thales Macedo Garitezi
b442910ff1
feat(gcp_pubsub_consumer): implement GCP PubSub Consumer bridge
...
Fixes https://emqx.atlassian.net/browse/EMQX-10281
2023-06-19 16:04:12 -03:00
Andrew Mayorov
13d9f5c3e7
Merge pull request #11053 from fix/EMQX-10231/cluster-view
...
fix(ft-fs): use `emqx:running_nodes()` as default cluster view
2023-06-17 00:54:24 +02:00
zhongwencool
e42cc58694
Merge pull request #11050 from emqx/release-51
...
chore: sync release-51 back to master
2023-06-15 09:45:31 +08:00
Andrew Mayorov
acd6e5635b
fix(ct): adapt cluster setup helper to replicant nodes
...
Before this change, trying to start cluster consisting of cores +
replicants resulted in error joining replicant node to the cluster.
2023-06-15 00:50:15 +03:00
zhongwencool
9209e0bed5
test: delete dashboard.listeners.xx.enable
2023-06-14 20:51:17 +08:00
Stefan Strigler
0d6d441f4c
test(emqx_connector): start/stop test for webhook bridge
2023-06-14 09:56:50 +02:00
Stefan Strigler
b2a5065641
fix(emqx_connector): report errors in on_start handler
2023-06-13 16:57:08 +02:00
SergeTupchiy
e61b2100a3
Merge pull request #10676 from SergeTupchiy/EMQX-9203-config-backup
...
feat: implement configuration and user data export/import
2023-06-09 14:18:39 +03:00
Serge Tupchii
e4d09d4ad4
feat: implement configuration and user data export/import CLI
...
Closes: EMQX-9203
2023-06-09 14:11:47 +03:00
firest
86a7b2d69a
fix(resource): improve log security when resource creation fails
2023-06-09 11:43:42 +08:00
Kjell Winblad
273dedf7a6
Merge pull request #10911 from kjellwinblad/kjell/bridge/atom_length_too_long/EMQX-9609
...
fix: friendly error message when creating bridges with too long names
2023-06-08 15:46:42 +02:00
Andrew Mayorov
99ea9b86c2
feat(tlslib): add separate managed certfiles GC process
...
Which periodically inpects managed certificates directory and tries
to collect "orphans" here, in other words files that aren't
referenced anywhere in the current emqx config.
2023-06-05 22:41:07 +03:00
Andrew Mayorov
95f706bb9e
fix(ssl): avoid explicit deletion of managed certs / keys
...
This logic was incorrect because it didn't take into account
certfiles / keyfiles "refcounts".
2023-06-05 22:41:07 +03:00
Kjell Winblad
375661c6a1
test: add test case for error when bridge name is too long
2023-06-05 17:02:08 +02:00
Andrew Mayorov
5b56a35c0a
Merge pull request #10932 from chore/drop-mqtt-mode-tests
...
chore(bridge): drop deprecated `mode` setting from examples / tests
2023-06-02 22:46:31 +03:00
Zaiming (Stone) Shi
aa46c0a484
Merge pull request #10928 from zmstone/0602-sync-release-51-to-master
...
0602 sync release 51 to master
2023-06-02 21:45:21 +02:00
Thales Macedo Garitezi
33aa879ad4
Merge pull request #10910 from thalesmg/unify-restart-interval-v50
...
feat(resource): deprecate `auto_restart_interval` in favor of `health_check_interval`
2023-06-02 16:20:36 -03:00
Andrew Mayorov
09290f8d61
chore(bridge): drop deprecated `mode` setting from examples / tests
2023-06-02 20:31:31 +03:00
Zaiming (Stone) Shi
28c564d15b
Merge remote-tracking branch 'origin/master' into release-51
2023-06-02 16:25:48 +02:00
Thales Macedo Garitezi
99796224d8
refactor(resource): rename `request_timeout` -> `request_ttl`
...
See
https://emqx.atlassian.net/wiki/spaces/P/pages/612368639/open+e5.1+remove+auto+restart+interval+from+buffer+worker+resource+options
2023-06-01 13:01:53 -03:00
某文
c27d844244
feat: improve authz/bridge/rule_engine/schema_registry config update
2023-06-01 23:20:56 +08:00
Thales Macedo Garitezi
10425eb925
feat(resource): deprecate `auto_restart_interval` in favor of `health_check_interval`
...
See:
https://emqx.atlassian.net/wiki/spaces/P/pages/612368639/open+e5.1+remove+auto+restart+interval+from+buffer+worker+resource+options
Current problem:
In 5.0.x, we have two timer options that control the state changing of buffer worker
resources: auto_restart_interval and health_check_interval.
- auto_restart_interval controls how often the resource attempts to transition from
disconnected to connected.
- health_check_interval controls how often the resource is checked and potentially moved
from connected to disconnected or connecting.
The existence of two independent timers for very similar purposes is confusing to users,
QA and even developers. Also, an intimately related configuration is request_timeout,
which can interact badly with auto_restart_interval if the latter is poorly configured:
requests may always expire if request_timeout < auto_restart_interval and if the resource
enters the disconnected state. For health_check_interval, we attempt to derive a sane
default that gives requests a chance to retry (if request timeout is finite, then the
resource retries requests with a period of min(health_check_interval, request_timeout /
3).
Another problem with the separate auto_restart_interval is that its default value (60 s)
is too high when compared to the default request timeout and health check, leading to the
problems described above if not tuned.
Proposed solution:
We propose to drop auto_restart_interval in favor of health_check_interval, which will be
used for both disconnected -> connected and connected -> {disconnected, connecting}
transition checks. With that, the resource will attempt to reconnect at the same interval
as the health check, which currently is 15 s.
Also, as two smaller changes to accompany this one:
- Increase the default request_timeout from 15 s to 45 s.
- Rename request_timeout to request_ttl.
2023-06-01 11:20:06 -03:00
Stefan Strigler
e011b5532f
Merge pull request #10881 from sstrigler/EMQX-9355-5-0-x-test-coverage-80
...
IoTDB test coverage
2023-06-01 15:48:56 +02:00
Kjell Winblad
75ff76a16b
fix: friendly error message when creating bridges with too long names
...
This commit makes the error message and log entry that appear when one
tries to create a bridge with a name the exceeds 255 bytes (the max
length for atoms) more friendly and easier to understand.
An even better fix would be to not store bridge names as atoms but this
probably requires a more substantial change.
Fixes:
https://emqx.atlassian.net/browse/EMQX-9609
2023-06-01 15:30:06 +02:00
Andrew Mayorov
b5f24c4f88
Merge pull request #10900 from keynslug/fix/EEC-856/parsed-bridge-id
...
fix(ruleeng): parse bridge id on create / update
2023-06-01 10:21:26 +03: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
0d539e91d1
test(pulsar_producer): attempt to stabilize flaky test
...
https://github.com/emqx/emqx/actions/runs/5125166433/jobs/9218613872?pr=10886#step:7:679
```
=CRITICAL REPORT==== 30-May-2023::19:38:58.003170 ===
Run stage failed: error:{badmatch,
{timeout,
[#{msg => pulsar_producer_bridge_started,
'~meta' =>
#{gl => <97891.472.0>,
location =>
#Fun<emqx_bridge_pulsar_impl_producer.11.109752493>,
node => 'autocluster_node1@127.0.0.1',
pid => <97891.787.0>,
time => -576460611692219}}]}}
Stacktrace: [{emqx_bridge_pulsar_impl_producer_SUITE,'-t_cluster/1-fun-10-',
6,
[{file,
"/emqx/apps/emqx_bridge_pulsar/test/emqx_bridge_pulsar_impl_producer_SUITE.erl"},
{line,1073}]},
{emqx_bridge_pulsar_impl_producer_SUITE,t_cluster,1,
[{file,
"/emqx/apps/emqx_bridge_pulsar/test/emqx_bridge_pulsar_impl_producer_SUITE.erl"},
{line,1064}]}]
```
2023-05-31 10:19:55 -03:00
Andrew Mayorov
7e7b50c5ba
refactor(mqttbridge): move into separate application
2023-05-30 17:56:34 +03:00
Andrew Mayorov
a5fc26736d
refactor(mqttconn): split ingress/egress into 2 separate pools
...
Each with a more refined set of responsibilities, at the cost of slight
code duplication. Also provide two different config fields for each pool
size.
2023-05-30 17:21:44 +03:00
Stefan Strigler
767f7c57e7
test: check device_id is used from topic or config
2023-05-30 15:55:21 +02:00
Stefan Strigler
938d62a666
test: handle bad payload
2023-05-30 15:55:21 +02:00
Stefan Strigler
64d582770d
test: add tracepoints
2023-05-30 15:55:21 +02:00
Andrew Mayorov
4e6269bedb
feat(mqttconn): subscribe each worker if shared subcription
...
Also rename `subscriptions` -> `ingress` and `forwards` -> `egress` for
consistency with the config schema.
2023-05-30 14:50:05 +03:00
Andrew Mayorov
81e78516aa
feat(mqttconn): employ ecpool instead of a single worker
2023-05-30 14:50:05 +03:00
Andrew Mayorov
bd956d00b6
feat(mqttconn): stop using gproc in hot path
...
Also drop fiddling with `mountpoint` since this option seems not to be
used anywhere.
2023-05-30 14:50:05 +03:00
Zaiming (Stone) Shi
91cdc69976
Merge pull request #10867 from zmstone/0530-merge-release-50-to-master
...
0530 merge release 50 to master
2023-05-30 09:54:57 +02:00
Zaiming (Stone) Shi
9529919046
chore: bump app versions
2023-05-30 08:08:29 +02:00
Thales Macedo Garitezi
67e182e0c9
Merge pull request #10813 from thalesmg/refactor-kafka-on-stop-v50
...
feat(kafka): ensure allocated resources are removed on failures
2023-05-29 16:49:29 -03:00
Zaiming (Stone) Shi
36e268c933
chore: bump app versions
2023-05-26 16:05:37 +02:00
Zaiming (Stone) Shi
cc5b4d3748
Merge remote-tracking branch 'origin/release-50' into 0526-ci-delete-otp-24-from-standalone-app-test
2023-05-26 15:58:16 +02:00
Zaiming (Stone) Shi
772a4575ca
Merge pull request #10821 from thalesmg/fix-webhook-bridge-req-timeout-r50
...
fix(webhook): keep `resource_opts.request_timeout` for webhook bridge (r5.0)
2023-05-26 08:39:00 +02:00
Zaiming (Stone) Shi
407cab220b
Merge pull request #10760 from paulozulato/fix-failure-joining
...
fix: avoid error 500 when node is re-joining cluster
2023-05-26 03:08:17 +02:00
Thales Macedo Garitezi
e43517188f
fix(bridge): remove bridge if exception happens during creation
2023-05-25 16:38:09 -03:00
Paulo Zulato
ea86f4442b
fix: avoid error 500 when node is re-joining cluster
...
Fixes https://emqx.atlassian.net/browse/EMQX-9899
2023-05-25 13:32:28 -03:00
Thales Macedo Garitezi
194faefc8a
fix(webhook): keep `resource_opts.request_timeout` for webhook bridge (r5.0)
...
Fixes https://emqx.atlassian.net/browse/EMQX-10001
Recently, we unified request_timeout in a single field located at the
webhook connector schema. However, the correct fix would be to use
the resource_opts.request_timeout one, as that’s the only one that
allows infinity timeout.
2023-05-25 13:19:27 -03:00
JianBo He
6b5ff24952
test: assert the block_until result
2023-05-25 18:12:38 +08:00
JianBo He
de7f1c8aec
test: add tests for auto_restart_interval
2023-05-25 17:15:19 +08:00
zhongwencool
14a6b36899
Merge pull request #10803 from JimMoen/merge-release-50
...
Merge release-50 into master
2023-05-24 23:08:46 +08:00
JimMoen
28015597ee
Merge remote-tracking branch 'emqx/release-50' into merge-release-50
2023-05-24 19:34:12 +08:00
Kjell Winblad
4f21bdb885
fix: REST API version 2 not available in IoTDB 0.13 and 1.0
...
This commit makes sure that REST API version 1 is used when the
user has selected to use IoTDB 0.13 or 1.0
Fixes:
https://emqx.atlassian.net/browse/EMQX-9920
2023-05-24 13:09:47 +02:00
某文
7da0860d6c
chore: upgrade minirest to 1.3.10 for more clear error msg
2023-05-24 10:44:52 +08:00
Thales Macedo Garitezi
44ed6a19ee
fix(bridge): pass resource option `request_timeout = infinity` along to buffer workers (r5.0)
2023-05-23 14:50:43 -03:00
Thales Macedo Garitezi
b5f63f4151
test: fix wrong test listeners option
2023-05-23 14:50:43 -03:00
某文
1deb3c50c8
test: bridge test init dashboard listener failed
2023-05-23 10:28:01 +08:00
某文
67a30ee976
test: bridge test init dashboard listener failed
2023-05-23 10:16:43 +08:00
Zaiming (Stone) Shi
732a7be187
Merge remote-tracking branch 'origin/release-50'
2023-05-22 17:46:54 +02:00
Thales Macedo Garitezi
7d798c10e9
perf(buffer_worker): flush metrics periodically inside buffer worker process
...
Fixes https://emqx.atlassian.net/browse/EMQX-9905
Since calling `telemetry` is costly in a hot path, we instead collect
metrics inside the buffer workers state and periodically flush them,
rather than immediately as events happen.
2023-05-22 09:11:23 -03:00
William Yang
e824e1db39
Merge pull request #10698 from qzhuyan/perf/william/force-atom-conf-path
...
perf(config): enforcing atom key path in hotcode path
2023-05-22 09:38:09 +02:00
Thales Macedo Garitezi
09ea2e2224
fix(bridge_api): don't crash when formatting empty/unknown bridge metrics
...
Fixes https://emqx.atlassian.net/browse/EMQX-9872
2023-05-18 14:25:13 -03:00
Thales Macedo Garitezi
5d5c16a56d
feat(bridges): use union member selector function for better error messages
2023-05-17 17:57:29 -03:00
Thales Macedo Garitezi
447b76464b
Merge branch 'release-50' into merge-r50-into-v50-a
2023-05-17 14:50:18 -03:00
Thales Macedo Garitezi
b2afe4e90c
Merge pull request #10690 from thalesmg/perf-webhook-retry-async-reply-v50
...
perf(webhook): add async retries and evaluate reply callback in fresh process
2023-05-17 11:06:48 -03:00
Thales Macedo Garitezi
a7b41e1cdf
perf(webhook): add retry attempts for async
...
This is a performance improvement for webhook bridge.
Since this bridge is called using `async` callback mode, and `ehttpc`
frequently returns errors of the form `normal` and `{shutdown,
normal}` that are retried "for free" by `ehttpc`, we add this behavior
to async requests as well. Other errors are retried too, but they are
not "free": 3 attempts are made at a maximum.
This is important because, when using buffer workers, we should avoid
making them enter the `blocked` state, since that halts all progress
and makes throughput plummet.
2023-05-17 09:20:50 -03:00
William Yang
cdf42760fa
chore: little change avoid atom leak
2023-05-17 11:01:03 +02:00
某文
2b99a9b988
feat: hide resource_opts's request_timeout
2023-05-17 13:41:11 +08:00
Zaiming (Stone) Shi
9b9731b943
Merge pull request #10473 from zmstone/0421-refactor-delete-unused-schema-field
...
0421 refactor delete unused schema field
2023-05-16 22:22:03 +02:00
某文
a2aa6b4666
chore: make ci happy again
2023-05-16 21:29:52 +08:00
William Yang
1c746ed289
perf(config): enforcing atom key path in hotcode path
2023-05-16 09:57:04 +02:00
某文
7d7c069257
feat: update wehbook's request_timeout into resource_opts
2023-05-16 15:32:43 +08:00
zhongwencool
a953b951fe
Merge branch 'master' into sync-release-50-to-master
2023-05-12 18:01:58 +08:00
某文
6056b0e7a8
fix: ensure atom key for emqx_config:get
2023-05-11 17:40:03 +08:00
Zaiming (Stone) Shi
7566c25199
refactor: delete unused connector field 'base_url'
2023-05-11 09:04:55 +02:00
Zhongwen Deng
14952658d5
chore: convert rotation struct to roation_count
2023-05-09 11:24:51 +08:00
Stefan Strigler
d231e708cb
feat: add IotDB bridge
2023-05-08 16:19:01 +02:00
Zaiming (Stone) Shi
856129984b
refactor: remove raw_with_default config load option
...
This option was previously only in tests to avoid
emqx_conf app overwriting previously set configs with default values.
After a03f2dd64b
, the issue for
test cases had been resolved.
This commit is to get rid of the option all together
2023-05-04 09:48:28 +02:00
Zaiming (Stone) Shi
d5f5f35787
Merge remote-tracking branch 'origin/release-50' into 0502-merge-release-50-back-to-master
2023-05-02 18:08:04 +02:00
Zaiming (Stone) Shi
57cc854a4a
test(bridge): fix bridge map type filed converters
...
now the converters on map type fields only work at the wrapping map
level but not the values
2023-04-30 10:45:11 +02:00
Paulo Zulato
dd90b2f498
feat(oracle): Oracle Database integration
2023-04-27 13:07:20 -03:00
Thales Macedo Garitezi
ad4be08bb2
feat: implement Pulsar Producer bridge (e5.0)
...
Fixes https://emqx.atlassian.net/browse/EMQX-8398
2023-04-24 10:28:26 -03:00
Serge Tupchii
45254d7d85
fix(emqx_bridge): validate Webhook bad URL and return 'BAD_REQUEST' if it's invalid
...
Fixes: EMQX-9310
2023-04-20 17:21:43 +03:00
Zaiming (Stone) Shi
30fd9b10f7
refactor: change bridges config importance level from hidden to low
2023-04-18 19:17:03 +02:00
Ivan Dyachkov
dc78ecb41c
chore: merge upstream/master
2023-04-18 17:33:32 +02:00
某文
fbadfc06e4
feat: change exhook, rule_engine, bridge to low importance level instead of hidden
2023-04-18 20:15:19 +08:00
Ivan Dyachkov
9fc8a498f8
chore: bump apps versions
2023-04-17 09:09:08 +02:00
Stefan Strigler
7df0493312
Merge pull request #10390 from sstrigler/EMQX-9549-new-emqx-utils-app-to-collect-utility-modules
...
New emqx_utils app to collect utility modules
2023-04-14 20:33:11 +02:00
Thales Macedo Garitezi
e073bc90bc
refactor(buffer_worker): rename `s/queue/buffer/g`
2023-04-14 11:37:19 -03:00
Stefan Strigler
4f80690162
fix: byebye jsx
2023-04-14 13:41:34 +02:00
Stefan Strigler
062ce5f819
refactor: rename emqx_map_lib to emqx_utils_maps
2023-04-14 13:41:34 +02:00
Stefan Strigler
d0df086c80
refactor: rename emqx_api_lib to emqx_utils_api
2023-04-14 13:41:33 +02:00
Stefan Strigler
9c11bfce80
refactor: rename emqx_misc to emqx_utils
2023-04-14 13:41:27 +02:00
Stefan Strigler
f8e9e54393
refactor: move emqx_json to emqx_utils_json
2023-04-14 13:31:27 +02:00
JimMoen
790d841697
Merge pull request #10363 from JimMoen/feat-mssqlserver-birdge
...
feat: implement Microsoft SQL Server bridge (e5.0)
2023-04-14 17:55:48 +08:00
Andrew Mayorov
5e92ba6fa9
Merge pull request #10359 from ft/EMQX-9136/no-ask-metrics
...
feat(resource): ask for metrics only when needed
2023-04-14 12:28:52 +03:00
JimMoen
5841969877
feat: implement Microsoft SQL Server bridge (e5.0)
2023-04-14 10:02:45 +08:00
Zhongwen Deng
cc2beda37a
feat: hiden rule_engine/bridge/authz/authn from doc/example
2023-04-13 14:42:21 +08:00
Ivan Dyachkov
bdffa925db
chore: merge upstream/master release-50
2023-04-12 15:30:20 +02:00
Andrew Mayorov
e70deae1c3
feat(resource): ask for metrics only when needed
2023-04-11 12:00:19 +03:00
Stefan Strigler
04626ce9cc
fix: create consistent interface 'with_node' for API access
2023-04-04 16:54:14 +02:00
firest
11b3264251
fix: redact the password to `******` in API examples
...
fix #10222
2023-04-04 16:02:45 +08:00
Zaiming (Stone) Shi
36000abf51
refactor: relocate i18n files for apps/emqx
2023-04-03 13:12:24 +02:00
Zaiming (Stone) Shi
80eb9d7542
Merge pull request #10252 from emqx/release-50
...
0327 merge release-50 to master
2023-03-29 12:33:17 +02:00
Kjell Winblad
8e0d315b7b
Merge pull request #10197 from kjellwinblad/0321-fix-inflight-window-hand-over-to-kjell
...
fix: add inflight window setting to the clickhouse bridge
2023-03-29 09:38:24 +02:00
Thales Macedo Garitezi
64faccf50b
test: fix flaky kafka consumer test
2023-03-28 14:50:55 -03: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
Stefan Strigler
193905c7b9
Merge pull request #10237 from sstrigler/EMQX-9138-e-5-0-2-ensure-that-the-error-messages-returned-are-consistent
...
fix: create consistent interface 'with_node' for API access
2023-03-28 10:41:10 +02:00
Andrew Mayorov
d942a531e6
fix(test): avoid unnecessary cleanups
...
This might make some noise in the logs, depending on the testsuite
configuration, because some test setup might be missing required
applications.
2023-03-27 23:41:19 +03:00
Andrew Mayorov
11b5b7b638
test(bridge-api): also run testcases in cluster environment
...
Excluding a couple of testcases which does not make much sense running
in the cluster. Also try to reduce amount of "noise" in the testcases,
making them easier to comprehend.
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2023-03-27 23:41:08 +03:00
Stefan Strigler
64a1d84a44
fix: create consistent interface 'with_node' for API access
2023-03-27 12:14:48 +02:00
JianBo He
bfa5922209
Merge pull request #10140 from HJianBo/cassa
...
feat: support cassandra data bridge
2023-03-27 10:23:02 +08:00
Zaiming (Stone) Shi
dd996ad1dc
chore: bump app vsns
2023-03-24 21:47:15 +01:00
Stefan Strigler
8d084ed13b
Merge pull request #10226 from sstrigler/EMQX-9273-e-5-0-2-creating-a-data-bridge-the-name-verification-returned-an-incorrect-error-code-of-500
...
fix(emqx_bridge): don't crash on validation error
2023-03-24 14:48:03 +01:00
Stefan Strigler
fbfdaf44e0
fix(emqx_bridge): don't crash on validation error
2023-03-24 11:46:41 +01:00
Stefan Strigler
a8cfc1c7a1
fix(emqx_bridge): filter status_reason in config update
2023-03-24 11:46:41 +01:00
Stefan Strigler
ba49316ec5
fix: use lower-case
2023-03-23 16:08:27 +01:00
Kjell Winblad
35474578ca
refactor: rename async_inflight_window to inflight_window everywhere
2023-03-23 14:21:57 +01:00
JianBo He
8cbbc9f271
Merge remote-tracking branch 'upstream/master' into cassa
2023-03-23 11:53:17 +08:00
lafirest
84def357a9
Merge pull request #10143 from lafirest/feat/rocketmq
...
feat(bridges): integrate RocketMQ into data bridges
2023-03-22 20:43:22 +08:00
Zaiming (Stone) Shi
e43aa5d841
Merge pull request #10199 from zmstone/0321-merge-release-50-to-master
...
0321 merge release 50 to master
2023-03-22 10:20:48 +01:00
Andrew Mayorov
af7b2215ca
fix(bridge-api): unflatten nodes' bridge lists back
...
Bridge lists were erroneously flattened in cad6492c
. This causes
bridge listing fail in emqx clusters consisting of more than 1 node.
2023-03-22 11:35:09 +03:00
firest
9853d00cad
feat(bridges): integrate RocketMQ into data bridges
2023-03-22 10:36:52 +08:00
JianBo He
65c2da7ef5
Merge remote-tracking branch 'ce/master' into cassa
2023-03-22 09:30:50 +08:00
Andrew Mayorov
bf35419b52
Merge pull request #10190 from keynslug/fix/EMQX-9269/bridge-list
...
fix(bridge-api): unflatten nodes' bridge lists back
2023-03-22 00:53:03 +03:00
Zaiming (Stone) Shi
e6091db351
Merge remote-tracking branch 'origin/release-50' into 0321-merge-release-50-to-master
2023-03-21 22:03:31 +01:00
Stefan Strigler
6c24b3a77d
Merge pull request #10196 from sstrigler/EMQX-9201-the-case-is-not-correct-for-some-of-menu
...
Emqx 9201 the case is not correct for some of menu
2023-03-21 19:42:10 +01:00
Andrew Mayorov
d9b1b1c802
fix(bridge-api): unflatten nodes' bridge lists back
...
Bridge lists were erroneously flattened in cad6492c
. This causes
bridge listing fail in emqx clusters consisting of more than 1 node.
2023-03-21 18:59:27 +03:00
Stefan Strigler
981268911a
style: make summary lower-case
2023-03-21 16:56:37 +01:00
Stefan Strigler
3880862c81
fix(emqx_bridge): return 503 for inconsistency in bridge setup
2023-03-21 15:07:43 +01:00
Stefan Strigler
4b0ea562a2
refactor(emqx_bridge): consistently use macros for http response
2023-03-21 15:07:41 +01:00
Stefan Strigler
84fc64822e
style: fix wording for nxdomain and malformed_username_or_password
...
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2023-03-21 15:02:29 +01:00
Stefan Strigler
8af3fb4ee7
feat: move human readable error translations to emqx_misc
2023-03-21 15:02:29 +01:00
Stefan Strigler
53825b9aba
fix(emqx_bridge): propagate connection error to resource status
2023-03-21 15:02:29 +01:00
Erik Timan
2d75c7d6d9
fix(emqx_bridge): remove metrics from non-dedicated bridge API endpoints
...
Metrics should only be exposed via the /bridges/:id/metrics endpoint,
and not in other operations such as getting the list of all bridges, or
in the response when a bridge has been created. This commit removes all
traces of metrics for the non-dedicated API endpoints.
2023-03-20 09:43:11 +01:00
JianBo He
12942b676d
Merge remote-tracking branch 'upstream/master' into cassa
2023-03-20 09:50:27 +08:00
JianBo He
c0a216a740
feat(bridge): support cassandra bridge
2023-03-17 11:34:48 +08:00
Thales Macedo Garitezi
3954b7bde2
fix(bridges): function clause when a non-ingress bridge coexists with an egress bridge
...
This was not caught by our tests because we always test bridge types
in isolation. So, if the config only contains ingress-only bridges,
the `on_message_publish` hook is never installed.
In a real system, if there are bridges of mixed types in the config,
the hook might be installed, and `emqx_bridge:get_matched_bridge_id`
would crash when iterating over the ingress bridges.
2023-03-16 13:43:01 -03:00
Thales Macedo Garitezi
66eb4ef069
test: fix inter-suite flakiness
2023-03-16 13:43:01 -03:00
Thales Macedo Garitezi
f31f15e44e
chore(kafka_producer): make schema changes more backwards compatible
...
This will still require fixes to the frontend.
2023-03-16 13:43:01 -03:00
Thales Macedo Garitezi
03342923b9
fix(bridge): use the same dry run prefix
...
Kafka Producer and Consumer bridges rely on this prefix for detecting
a dry run and avoid leaking atoms. At some point, this prefix was
changed, effectively disabling the check in Kafka Producer.
2023-03-16 13:43:01 -03:00
Thales Macedo Garitezi
1f31a87974
fix(bridge): improve macro var usage
...
Co-authored-by: ieQu1 <99872536+ieQu1@users.noreply.github.com>
2023-03-16 13:43:01 -03:00
Thales Macedo Garitezi
969fa03ecc
feat: implement kafka consumer
2023-03-16 13:43:01 -03:00
Thales Macedo Garitezi
91a57faa95
Merge pull request #10128 from thalesmg/ocsp-v50-mkII
...
feat: add ocsp stapling support to mqtt ssl listener (5.0)
2023-03-16 13:10:48 -03:00
Andrew Mayorov
816667d85c
Merge pull request #10123 from fix/EMQX-9136/lookup-busy-resources
...
perf(bridge-api): ask nodes' bridge listings in parallel
2023-03-16 00:07:12 +03:00
Thales Macedo Garitezi
03b95073fc
test: fix inter-suite flakiness
2023-03-15 14:25:41 -03:00
Andrew Mayorov
b3e7e51094
test(bridge): drop unnecessary cleanup routines
...
Since `end_per_testcase` cleans out all the resources anyway.
2023-03-15 19:17:29 +03:00
Andrew Mayorov
cad6492c99
perf(bridge-api): ask bridge listings in parallel
...
Also rename response formatting functions to better clarify their
purpose.
2023-03-15 19:17:29 +03:00
Andrew Mayorov
53bc27e0f4
refactor(bridge): avoid unnecessary `maps:to_list/1` when listing
2023-03-13 14:49:38 +03:00
Stefan Strigler
c1adf0de1f
test(emqx_bridge): increase coverage by adding common edge cases
2023-03-13 10:40:47 +01:00
Stefan Strigler
478601ee41
fix(emqx_bridge): remove unreachable code paths
2023-03-13 10:40:47 +01:00
Stefan Strigler
dba95ec0fa
style(emqx_bridge): fix wording
2023-03-13 10:40:47 +01:00
Stefan Strigler
71ec77a2f2
fix(emqx_bridge): for node operation check if node is part of cluster
...
This fixes the case where we returned `501 NOT IMPLEMENTED` in the past.
2023-03-13 10:40:47 +01:00
Stefan Strigler
7124600a71
docs(emqx_bridge): add `start` as operation to bridge
2023-03-13 10:38:51 +01:00
Stefan Strigler
1bcc5623ed
fix(emqx_bridge): check if bridge enabled before calling op
2023-03-13 10:38:49 +01:00
Stefan Strigler
a325133391
fix(emqx_bridge): don't crash checking if bridge enabled
2023-03-13 10:37:28 +01:00
Stefan Strigler
80b81748df
fix(emqx_bridge): handle bridge not found in call_operation
2023-03-13 10:37:28 +01:00
Stefan Strigler
fb3d101b3a
refactor(emqx_bridge): fix var names
2023-03-13 10:37:28 +01:00
Stefan Strigler
e31f4d6091
refactor(emqx_bridge): add BAD_REQUEST macro and minor cleanups
2023-03-13 10:37:28 +01:00
ieQu1
e3595f2e79
chore(mria): Bump version to 0.4.0
2023-03-11 00:37:25 +01:00
Andrew Mayorov
a86d06f043
chore: bump app versions following last merge-back
2023-03-10 16:44:15 +03:00
Zaiming (Stone) Shi
fe27604010
Merge remote-tracking branch 'origin/release-50' into 0308-merge-release-50-back-to-master
2023-03-08 16:46:45 +01:00
firest
b8b1a78025
feat(bridges): integrate the DynamoDB into data bridges
2023-03-08 11:13:38 +08:00
Zaiming (Stone) Shi
26b29185b2
test(emqx_bridge_webhook_SUITE): fix flakyness in test web server
2023-03-07 20:57:38 +01:00
Kjell Winblad
163b33ab28
test: remove unnecessary dependencies of ee apps
2023-03-07 20:57:38 +01:00
Kjell Winblad
ca947e3e70
fix: lost messages when HTTP connection times out
...
When using async mode with the webhook bridge, queued messages that are
not fully processed when the connection times out could be lost. This
commit fixes this by letting the bridge return a recoverable_error when
this happen. The message send will then be retried in sync mode by the
emqx_resource_buffer_worker.
Fixes: https://emqx.atlassian.net/browse/EMQX-8974
2023-03-07 20:57:19 +01:00
Thales Macedo Garitezi
e17ad320ee
fix(bridge): do not log in converter
2023-03-06 15:31:28 -03:00
Thales Macedo Garitezi
2fa4e8e21a
Merge pull request #10068 from thalesmg/fix-flaky-mqtt-bridge-test
...
test: fix flaky mqtt bridge test
2023-03-06 13:06:37 -03:00
Stefan Strigler
a81d1a4618
Merge pull request #10066 from sstrigler/EMQX-8932-bridge-api-reports-500-for-most-errors-when-starting-a-resource
...
fix: return human readable error message for most common cases
2023-03-06 14:13:34 +01:00
Thales Macedo Garitezi
f95a30ae89
fix(webhook): convert `request_timeout`s in root and resource_opts
2023-03-06 10:12:38 -03:00
Thales Macedo Garitezi
8fbb948b6f
test: fix flaky mqtt bridge test
...
Sometimes, this test fails because the metrics are still in the
inflight phase.
2023-03-06 09:09:33 -03:00
Kjell Winblad
a638cc6566
Merge pull request #9985 from kjellwinblad/kjell/feat/clickhouse_bridge_2/EMQX-8391
...
feat: add clickhouse database bridge
2023-03-04 07:05:05 +01:00
Stefan Strigler
570bf165af
fix: return human readable error message for most common cases
2023-03-03 16:49:09 +01:00
Ivan Dyachkov
c01f62a1c1
chore: bump apps versions
2023-03-03 13:58:32 +01:00
Kjell Winblad
67acdf0888
feat: add clickhouse database bridge
...
This commit adds a Clickhouse bridge to EMQX 5. The bridge is similar to
the Clickhouse bridge in the 4.4, but adds the possibility to use
different formats (such as JSON) for values to be inserted.
2023-03-02 12:22:11 +01:00
Stefan Strigler
39e1cf9502
fix(emqx_bridge): let it crash instead of 400 on failed reset
2023-03-02 11:23:07 +01:00
Stefan Strigler
4c23ab097d
fix(emqx_bridge): return 400 if operation not possible
2023-03-02 11:23:07 +01:00
Stefan Strigler
680a4362d1
fix: match macro variables
2023-03-02 10:12:56 +01:00
Stefan Strigler
76f97010bb
style: change wording
2023-03-02 09:14:52 +01:00
Serge Tupchii
77dea0c77a
fix: Handle obfuscated fields in bridges_probe API
2023-03-01 22:05:23 +02:00
Stefan Strigler
3f324f85bc
fix: consistently return 404 in case bridge is not found or invalid
...
Also: fix some typos and be more verbose
2023-03-01 18:03:49 +01:00