Commit Graph

47 Commits

Author SHA1 Message Date
firest 6f4b22e376 test(iotdb): add template test case for IoTDB 2024-01-06 21:32:37 +08:00
firest d221f34ce8 chore: bump version && update changes 2024-01-06 13:34:07 +08:00
firest e20b024b6e fix(iotdb): fix iotdb testcases 2024-01-06 13:01:43 +08:00
firest d16458ccd0 feat(iotdb): improve the IoTDB bridge to v2 style 2024-01-05 16:54:31 +08:00
JimMoen 5e100f52b8
style: erlfmt all `rebar.config` files and `bin/nodetool` 2023-12-29 09:08:03 +08:00
Andrew Mayorov 7d6c9d2daa
feat(iotdb): accept wrapped secrets as passwords 2023-11-14 16:05:53 +07: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
Thales Macedo Garitezi 6cd503865b fix(machine_boot): ensure `emqx_bridge` starts after its companion apps
We need to reverse the dependency of `emqx_bridge` and `emqx_bridge_*`, because the former
loads and starts bridges during its application startup.  If the individual bridge
application being loaded has not started with its dependencies, the supervision tree will
not be ready for that.
2023-07-20 13:11:44 -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 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 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
Stefan Strigler 837acd4234 test(emqx_rule_engine): test rule metrics 2023-06-29 16:09:45 +02:00
zhongwencool 07172e42f0 test: integer CI check failed 2023-06-20 08:39:23 +08:00
Zaiming (Stone) Shi 97850de524 Merge remote-tracking branch 'origin/release-51' into 0610-merge-release-51-to-master 2023-06-10 12:23:55 +02:00
Thales Macedo Garitezi 40675843a1 fix(iotdb): remove root `request_timeout` option
Fixes https://emqx.atlassian.net/browse/EMQX-10175

Since IoTDB bridge is not used as an authn/authz source and reuses the
webhook connector, we should have only one request timeout field (the
`resource_opts.request_ttl` one) like the webhook bridge does, to
avoid confusion and potentially bad configuration combinations.
2023-06-09 10:39:01 -03:00
Andrew Mayorov d6c1ee183f
refactor(pluglib): move `emqx_placeholder` to utils app
Also make user that existing code calls it directly.
2023-06-09 14:44:36 +03:00
Thales Macedo Garitezi 75df622426
Merge pull request #10930 from thalesmg/max-int-timeout-v50
check maximum timeout values in schema (5.1)
2023-06-05 12:51:36 -03:00
Thales Macedo Garitezi 46393343e2 chore: use `timeout_duration` types for timer fields
Fixes https://emqx.atlassian.net/browse/EMQX-10020
2023-06-05 11:46:38 -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 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
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
firest cb31032e6d chore: make dialyzer && test happy 2023-06-01 11:15:51 +08:00
Stefan Strigler 1e4cee05df fix(emqx_bridge_iotdb): handle rule engine passed payload
also remove topic logic as it's duplicated functionality via rule engine
2023-05-31 15:57:22 +02:00
Stefan Strigler 6c0fb0e2ea test: run tests against iotdb013 container 2023-05-31 11:30:13 +02: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 860d7b169a test: check data at iotdb instance 2023-05-30 15:55:21 +02:00
Stefan Strigler a3021c58f1 fix(emqx_bridge_iotdb): allow integer timestamp 2023-05-30 15:55:21 +02:00
Stefan Strigler bd92116cee test: fix data in calls to look like real world 2023-05-30 15:55:21 +02:00
Stefan Strigler 1381b54a8d fix(emqx_bridge_iotdb): allow non-binary values 2023-05-30 15:55:21 +02:00
Stefan Strigler 64d582770d test: add tracepoints 2023-05-30 15:55:21 +02:00
Stefan Strigler 3d3f2a223c test: test more value conversions 2023-05-30 15:55:21 +02:00
Stefan Strigler 6f54220a51 feat(emqx_bridge_iotdb): handle bad message format gracefully 2023-05-30 15:55:20 +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
JianBo He fdec86e29c
Merge pull request #10802 from Kinplemelon/kinple/set-base-url-required
fix: set the base_url in IoTDB bridge as a required field
2023-05-25 18:12:05 +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
Kinplemelon 7cad1cb93a fix: set the base_url in IoTDB bridge
as a required field
2023-05-24 18:18:32 +08:00
Kjell Winblad 63180c87be
style: simplify code for better readability
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2023-05-23 18:53:14 +02:00
Kjell Winblad 89ea1646be fix: IoTDB name for version option
The previous name for the version option was v1.0.x which is clearly
wrong since this option was tested against IoTDB version v1.1.0. This
commit fixes this by renaming the option to v1.x.

Fixes:
https://emqx.atlassian.net/browse/EMQX-9926
2023-05-23 10:57:05 +02:00
Kjell Winblad d19ddb1832 fix: IoTDB bridge incoming payload needs to be parsed as JSON
There was an incorrect assumption that the data incoming to the IoTDB
bridge has already been parsed. This is fixed by parsing the payload as
JSON data if the payload is not already a map.

Fixes:
https://emqx.atlassian.net/browse/EMQX-9854
2023-05-23 10:14:45 +02:00
JianBo He 38fcb7a097 docs: hide the not-ready document links 2023-05-15 11:20:23 +08:00
JianBo He 383fec9dfc docs: fix invalid links 2023-05-15 11:18:09 +08:00
Kjell Winblad 08af90daa9 fix: the iotdb password field so it has the password format 2023-05-10 10:38:40 +02:00
Stefan Strigler d231e708cb feat: add IotDB bridge 2023-05-08 16:19:01 +02:00