Erik Timan
c3133fb6a2
fix(emqx_bridge): small fixes from review
2023-01-13 14:54:54 +01:00
Zaiming (Stone) Shi
a77d33b97d
Merge pull request #9751 from lafirest/fix/un_cleared_ca
...
fix that obsoleted cert file will not be deleted after the listener is updated/deleted
2023-01-13 14:38:55 +01:00
Kjell Winblad
1ac03ab208
Merge pull request #9730 from kjellwinblad/kjell/fix/resource_atom_leak/EMQX-8583
...
fix: remove atom leaks
2023-01-13 14:38:28 +01:00
Zaiming (Stone) Shi
bb3dceb456
Merge pull request #9749 from keynslug/fix/count-respect-matchspec
...
fix(paging): respect matchspec even if qs is empty when counting
2023-01-13 14:29:03 +01:00
Erik Timan
8dd52e5a6e
chore: add translations to schemas
2023-01-13 14:19:23 +01:00
Erik Timan
f1c58c34ed
test(emqx_bridge): fix fetching of metrics in emqx_bridge_mqtt_SUITE
2023-01-13 14:19:23 +01:00
Zaiming (Stone) Shi
2974269f2a
Merge pull request #9723 from emqx/release-50
...
chore: sync release-50 to master
2023-01-13 14:13:12 +01:00
firest
0a965879dd
fix: fix that obsoleted cert file will not be deleted after the listener is updated/deleted
2023-01-13 18:42:27 +08:00
Zhongwen Deng
f15b29b1ef
chore: upgrade app version
2023-01-13 18:22:29 +08:00
JimMoen
b7259d9a20
test(mqtt-bridge): use empty payload template for ingress/egress mqtt bridge
2023-01-13 18:12:53 +08:00
Kjell Winblad
734e6b9c96
chore: fix flaky test cases, log labels and review comments
...
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2023-01-13 11:05:02 +01:00
Andrew Mayorov
b3e62bd8f8
fix(paging): respect matchspec even if qs is empty when counting
2023-01-13 12:56:29 +03:00
zhongwencool
383a6812d1
Merge pull request #9748 from zhongwencool/listener-max-connections-default-value
...
fix: default max_connections in raw config should be binary not atom
2023-01-13 17:55:22 +08:00
JimMoen
59ac0b1424
fix(mqtt-bridge): transmit raw msg payload with empty template
2023-01-13 17:23:04 +08:00
zhongwencool
0049b4a294
Merge branch 'master' into release-50
2023-01-13 16:39:35 +08:00
Zaiming (Stone) Shi
e7883e0ee2
Merge pull request #9741 from id/fix-description-for-duration-fields
...
fix: remove time unit from duration fields description
2023-01-13 09:31:48 +01:00
Zhongwen Deng
eacdaffe3c
fix: default max_connections in raw config should be binary not atom
2023-01-13 16:01:57 +08:00
Andrew Mayorov
33d88c95de
Merge pull request #9745 from keynslug/fix/EMQX-8702/changelog
...
chore: add changelog for the fuzzy search API fix
2023-01-13 11:59:37 +04:00
Zaiming (Stone) Shi
2bc19c3a62
fix(emqx_packet): log empty string if password value is missing
...
to keep it a consistent behaviour comparing when logging username
2023-01-13 08:21:09 +01:00
Zaiming (Stone) Shi
153d64068a
refactor: rename root level cache type to authz_cache
2023-01-13 07:47:54 +01:00
Zaiming (Stone) Shi
c7ac55520d
docs: update pool_size doc
2023-01-13 07:46:23 +01:00
Zaiming (Stone) Shi
b40ce0fc2d
Merge pull request #9626 from id/fix-enable-authz-cache-by-default
...
fix: enable authorization cache by default
2023-01-13 07:39:38 +01:00
Xinyu Liu
6b75077c47
Merge pull request #9734 from terry-xiaoyu/influxdb-default-value-of-write-syntax
...
refactor: remove default value of timestamp field of influxdb
2023-01-13 10:14:14 +08:00
Erik Timan
42f42de4d9
feat(emqx_bridge): add separate endpoint for enable/disable of bridge
...
In order to improve the consistency with other API endpoints, we move
the enable/disable operations to a separate endpoint
/bridges/{id}/enable/[true,false].
2023-01-12 19:39:43 +01:00
Erik Timan
860e21d40f
feat(emqx_bridge): move metrics to own endpoint, rename reset_metrics
...
In order for the /bridges APIs to be consistent with other APIs, we move
out metrics from GET /bridges/{id} to its own endpoint,
/bridges/{id}/metrics. We also rename /bridges/reset_metrics to
/bridges/metrics/reset.
2023-01-12 19:39:41 +01:00
Erik Timan
c2fd1a4482
feat(emqx_bridge): shorten operation endpoint URLs
...
This shortens and simplifies URLs for performing bridge operations so
that the API looks more congruent.
2023-01-12 19:36:22 +01:00
Andrew Mayorov
90e837783f
fix(paging): rename `partial` to `overflow` for clarity
2023-01-12 19:25:40 +03:00
lafirest
a26c05f4f6
Merge pull request #9586 from lafirest/fix/disable_basic_auth_api
...
fix: disable basic auth for HTTP API
2023-01-12 23:02:29 +08:00
Zaiming (Stone) Shi
370b6b0d2f
Merge pull request #9735 from kjellwinblad/kjell/fix/password_log_leak/EMQX-8718
...
fix: remove password from info logs
2023-01-12 15:34:16 +01:00
Shawn
1711823487
refactor: remove default value of timestamp field of influxdb
2023-01-12 22:25:44 +08:00
firest
c5f557e315
fix: disable basic auth for HTTP API
2023-01-12 21:35:49 +08:00
Stefan Strigler
2a81fa1522
fix: remove redundant log message
2023-01-12 14:29:11 +01:00
Stefan Strigler
04f46f5227
feat: make http connector report errors
2023-01-12 14:26:36 +01:00
Stefan Strigler
77f043dedf
fix: don't require username and password
...
not enforced by schema so we shouldn't either
2023-01-12 14:26:36 +01:00
Ivan Dyachkov
b5d3e9d8b8
fix: remove time unit from duration fields description
2023-01-12 14:18:55 +01:00
Ivan Dyachkov
f90c41f769
fix: set default value in schema
2023-01-12 13:49:52 +01:00
Ivan Dyachkov
1f57e7b538
fix: enable authorization cache by default
2023-01-12 12:36:31 +01:00
Andrew Mayorov
9e9d97b4d8
Merge pull request #9726 from keynslug/fix/EMQX-8702/fuzzy-search-paging
...
fix(api): augment paged search responses with `hasnext` flag
2023-01-12 13:35:59 +04:00
Kjell Winblad
82e80e5610
fix: remove password from info logs
...
Information log messages for several connectors contained sensitive
password information. This commit fixes this by hiding the sensitive
information from the log messages.
Fixes: https://emqx.atlassian.net/browse/EMQX-8718
2023-01-12 09:28:01 +01:00
JianBo He
13fdbd695e
Merge pull request #9722 from HJianBo/more-confs-for-prometheus
...
feat: more confs for prometheus pushing
2023-01-12 16:06:21 +08:00
Andrew Mayorov
50c9321b9e
fix(api): anticipate empty set of nodes handling cluster query
2023-01-12 10:57:50 +03:00
Andrew Mayorov
c89b227687
fix(test): adapt affected testcases
2023-01-12 10:57:50 +03:00
Andrew Mayorov
abf6f143e5
fix(paging): return subset of rows if page start is in the middle
...
This change should cover this example scenario where select ended
returning 4 rows.
Row 3
Row 4
Row 5 <- page start
Row 6
Here, only rows 5 and 6 should end up in the response. Before this
change some rows could be duplicated across adjacent search pages.
2023-01-12 10:57:50 +03:00
Andrew Mayorov
e07aa2086b
fix(api): augment paged search responses with `hasnext` flag
...
This flag indicates whether there are more results available on the
next pages. It is needed in cases when the total number of search
results is not known in advance.
Also, in such cases there's no `count` field in responses anymore
because responding with `0` was confusing for clients: it's not possible
to differentiate between "there are no results" and "we don't know how
much".
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2023-01-12 10:57:30 +03:00
Zhongwen Deng
1194d07a07
refactor: update emqx_prometheus's headers from map() to list()
2023-01-12 12:48:26 +08:00
Xinyu Liu
bae811e8b4
Merge pull request #9725 from terry-xiaoyu/remove_the_auto_reconnect_field
...
refactor: remove the auto_reconnect field
2023-01-12 11:11:00 +08:00
Kjell Winblad
8c482e03d1
fix: remove atom leaks
...
Both emqx_resource_managers and emqx_resource_workers leaked atoms as they
created an unique atoms to use as registered names. This is fixed by
removing the need to register the names.
Fixes: https://emqx.atlassian.net/browse/EMQX-8583
2023-01-11 17:03:28 +01:00
Stefan Strigler
417d95d76f
Merge pull request #9708 from sstrigler/EMQX-8588-refactor-emqx-resource-manager
...
EMQX 8588 refactor emqx resource manager
2023-01-11 16:13:55 +01:00
Shawn
3e9c4f444f
refactor: remove the auto_reconnect field
2023-01-11 21:47:06 +08:00
Thales Macedo Garitezi
254b92a3c1
docs: add comma to please spellcheck
2023-01-11 10:31:23 -03:00
Stefan Strigler
8ad8288195
feat: report error in create_dry_run
2023-01-11 14:22:37 +01:00
Thales Macedo Garitezi
d5a462486e
feat: tag another emqx schema as `emqx`
2023-01-11 09:31:38 -03:00
Thales Macedo Garitezi
e6a8be1ff6
docs: fix closing tag
2023-01-11 09:10:04 -03:00
Thales Macedo Garitezi
48e1ba4832
feat(docs): add tags to schemas
...
This'll allow us to split the generated `schema.json` file into
subsections for better documentation navigation.
2023-01-11 09:10:03 -03:00
Kjell Winblad
fde8752452
Merge pull request #9710 from kjellwinblad/kjell/mongodb_upgrade_in_emqx_5_master_fix
...
chore: upgrade mongodb-erlang to v3.0.19
2023-01-11 12:41:11 +01:00
JianBo He
9f6df27759
chore: bump app.src vsn
2023-01-11 17:47:06 +08:00
JianBo He
b1292d6d4f
feat(prom): support configuring job_name for pushing mode
2023-01-11 17:31:58 +08:00
JianBo He
50b7ac6a22
feat(prom): support headers for pushing
2023-01-11 17:31:58 +08:00
Zhongwen Deng
fdc0682c3f
fix: elvis warning
2023-01-11 17:30:45 +08:00
zhongwencool
6f0e228a9b
Merge pull request #9717 from zmstone/0110-do-not-start-resource-after-recreate-if-disabled
...
fix(emqx_resource_manager): do not start when disabled
2023-01-11 16:12:53 +08:00
Zaiming (Stone) Shi
85a8eff90b
fix(emqx_resource_manager): do not start when disabled
2023-01-11 08:33:48 +01:00
Zhongwen Deng
d9429bba00
fix: bump hocon to 0.35.0(don't log overriding structs)
2023-01-11 14:44:34 +08:00
Zhongwen Deng
ba738d7707
chore: bump to 5.0.14
2023-01-11 14:39:32 +08:00
zhongwencool
ce2b4d48ad
Merge pull request #9714 from zhongwencool/auto-subscribe-api-schema
...
fix: bad auto_subscribe api schema
2023-01-11 14:32:40 +08:00
zhongwencool
e7d6d26186
Merge pull request #9713 from zhongwencool/api-keys-bootstrap-file
...
feat: introduce API keys bootstrap_file config
2023-01-11 11:30:45 +08:00
Zhongwen Deng
52ccd0762e
test: QOS ct failed
2023-01-11 10:34:09 +08:00
Zaiming (Stone) Shi
6bbb5edb53
Merge pull request #9667 from olcai/remove-clientid-in-publish-request-body
...
fix(mgmt_api): remove possibility to set clientid in /publish API
2023-01-10 22:31:35 +01:00
Zaiming (Stone) Shi
ee89de816c
fix: upgrade bridge config converter
2023-01-10 20:42:30 +01:00
Erik Timan
fb97096405
fix(mgmt_api): deprecate clientid field instead of removing it
2023-01-10 16:48:04 +01:00
Zhongwen Deng
a2be9947f5
chore: update auto_subscribe app version
2023-01-10 22:12:23 +08:00
Zhongwen Deng
5415e341fb
fix: bad auto_subscribe api schema
2023-01-10 21:53:54 +08:00
zhongwencool
918ba0dffd
chore: apply suggestions from code review
...
Co-authored-by: ieQu1 <99872536+ieQu1@users.noreply.github.com>
2023-01-10 20:39:31 +08:00
Zhongwen Deng
21dbc21dc8
chore: add changelog for api_key.bootstrap_file
2023-01-10 19:15:01 +08:00
Zhongwen Deng
5d4a1933a2
chore: add more test for api_key
2023-01-10 19:04:00 +08:00
Zhongwen Deng
f6a47e5cf6
chore: support api_key.bootstrap_file config
2023-01-10 19:03:49 +08:00
Zhongwen Deng
142826c4c3
chore: limit the maximum number of api keys to 100
2023-01-10 19:03:39 +08:00
Xinyu Liu
0f70786d13
Merge pull request #9705 from terry-xiaoyu/remove-default-value-of-webhook-body
...
fix: remove the default value of webhook body field
2023-01-10 18:23:50 +08:00
Xinyu Liu
12de104033
Merge pull request #9712 from emqx/fix-bulk-subscribe-failed-in-client.connected-hook
...
fix: bulk subscribe topics failed in the client.connected hook
2023-01-10 18:22:15 +08:00
ieQu1
13f1ab6344
Merge pull request #9671 from ieQu1/metrics
...
feat(emqx_metrics): Sliding window samples
2023-01-10 11:08:43 +01:00
Stefan Strigler
f27f573109
refactor: move to /authorization/sources/built_in_database/rules
2023-01-10 11:00:22 +01:00
Shawn
73643e932f
fix: bulk subscribe topics failed in the client.connected hook
2023-01-10 16:43:24 +08:00
Xinyu Liu
52343e58c7
Merge pull request #9703 from emqx/subscribe-api-function-clause
...
fix: missing default value for qos field of API /clients/:clientid/subscribe
2023-01-10 10:13:58 +08:00
Shawn
724015af47
fix: remove the default value of webhook body field
2023-01-10 09:45:25 +08:00
Zaiming (Stone) Shi
67f2159a27
Merge pull request #9653 from zmstone/0101-authz-schema-union-member-selection
...
0101 authz schema union member selection
2023-01-09 22:17:51 +01:00
Kjell Winblad
0bd5bec982
chore: upgrade mongodb-erlang to v3.0.19
...
This upgrades mongodb-erlang from v3.0.18 to v3.0.19. This fixes a bug
that occurred when one issued a command specified as a map*. This fix
should not affect present EMQX as this functionality is currently not
used by EMQX. However, I think it is good to do the upgrade anyway in
case we will use the fixed functionality in the future. There is no need
to update the changelog.
* https://github.com/emqx/mongodb-erlang/pull/36
2023-01-09 18:14:11 +01:00
lafirest
f1ebfe40a5
Merge pull request #9697 from lafirest/fix/ldap_i18n
...
chore: add i18n file for ldap connector
2023-01-09 22:54:09 +08:00
Thales Macedo Garitezi
7f5150b2e9
Merge pull request #9689 from thalesmg/fix-http-authz-failure-v50
...
fix(authz_http): handle `ignore` results (request failures)
2023-01-09 11:07:52 -03:00
Zaiming (Stone) Shi
c3635f537a
ci: wait for redis in emqx_ee_bridge_redis_SUITE
2023-01-09 14:39:56 +01:00
Zaiming (Stone) Shi
0697c692ed
refactor: mongo_type and redis_type are not mandatory
...
the connector schemas are shared between authn, auth and bridges,
the difference is that authn and authz configs are unions like:
[
{mongo_type = rs,
...
}
{another backend config}
]
however the brdige types are maps like, for example:
mongodb_rs.$name {
mongo_type = rs
...
}
in which case, the mongo_type is not required.
in order to keep the schema static as much as possible,
this field is chanegd to 'required => false' with a default value.
However, for authn and authz, the union selector will still raise
exception if the there is no type provided.
2023-01-09 14:26:16 +01:00
Zaiming (Stone) Shi
e52f9d5920
refactor: use union member type selector for authz sources
2023-01-09 14:26:16 +01:00
Kjell Winblad
ba8c304723
Merge pull request #9691 from kjellwinblad/kjell/mongodb_upgrade_in_emqx_5_master
...
feat: upgrade MongoDB library to support MongoDB 5.1+
2023-01-09 14:15:48 +01:00
Kjell Winblad
692c1f0d1b
Merge pull request #9678 from kjellwinblad/kjell/fix/jira/EMQX-8648
...
fix: no feedback when deleting non-existing configuration
2023-01-09 13:52:40 +01:00
Stefan Strigler
c85a988a43
fix: split 'server' param into host and port for mqtt bridge
2023-01-09 13:27:42 +01:00
Andrew Mayorov
0db31f30a1
Merge pull request #9675 from keynslug/chore/otp-25-compat-deps
...
chore: bump deps versions with full OTP-25 compat
2023-01-09 14:54:14 +04:00
Shawn
50717a5567
fix: set the topic field of API /clients/:clientid/subscribe as requried
2023-01-09 17:57:39 +08:00
Stefan Strigler
c42c99f94f
fix: set a timeout for tcp connect
2023-01-09 10:01:35 +01:00
Stefan Strigler
96ca0d9f49
feat(emqx_bridge): add /bridges_probe API endpoint
2023-01-09 10:01:33 +01:00
Stefan Strigler
903ae9a644
style: fix typo in fun name
2023-01-09 09:59:42 +01:00
Erik Timan
3319a8d28e
fix(mgmt_api): remove possibility to set clientid in /publish API
...
To avoid security confusion, we remove the possibility to specify the
client ID in the request body for /publish and /publish/bulk.
2023-01-09 09:30:34 +01:00
Zaiming (Stone) Shi
8d53d154d9
refactor: remove license from configs API
...
license has its own config APIs
2023-01-09 09:16:19 +01:00
Shawn
7ed1384623
fix: missing default value for qos field of API /clients/:clientid/subscribe
2023-01-09 16:02:10 +08:00
Zaiming (Stone) Shi
3859878985
Merge pull request #9684 from zmstone/0105-do-not-use-testcase-skip
...
test: do not use tc_user_skip for test cases
2023-01-09 09:02:06 +01:00
JianBo He
6f5057b9dd
Merge pull request #9637 from HJianBo/fix-clients-api
...
fix(clients): fix expiry_interval unit error
2023-01-09 09:49:16 +08:00
Xinyu Liu
336b310d56
Merge pull request #9687 from emqx/function_clause_when_send_msg_to_bridges
...
fix: function_clause when sending messages to bridges
2023-01-09 09:23:17 +08:00
Andrew Mayorov
1336a57b3b
chore: bump to emqx/eredis_cluster 0.7.5
...
* Full OTP-25 compat.
* Password censoring in status and crash reports.
* No more crashes on query timeout.
2023-01-08 13:13:31 +03:00
Zaiming (Stone) Shi
5653d113ac
Merge pull request #9663 from zmstone/0102-fix-stopped-nodes-detection
...
0102 fix stopped nodes detection
2023-01-08 10:03:48 +01:00
firest
d2456f9fbe
chore: add i18n file for ldap connector
2023-01-06 17:28:06 +08:00
firest
f7b50c56da
feat(bridges): integrate PostgreSQL into bridges
...
support both simple and batch query
2023-01-06 11:47:22 +08:00
JianBo He
5d55e3a7b3
chore: updage mgmt app vsn
2023-01-06 10:31:27 +08:00
JianBo He
65729cd640
fix(clients): fix expiry_interval unit error
...
It should be second not millisecond
2023-01-06 10:31:27 +08:00
Shawn
13b2f45405
fix: function_clause when sending messages to bridges
2023-01-06 09:24:38 +08:00
Zaiming (Stone) Shi
7a4e7a6de9
test: wait for redis
2023-01-05 22:47:08 +01:00
Zaiming (Stone) Shi
5f12cdff6c
ci: should not skip tests in github actions
2023-01-05 22:47:08 +01:00
Thales Macedo Garitezi
22707495ac
Merge pull request #9690 from thalesmg/fix-flaky-jwt-test
...
test(flaky): fix flaky jwt worker test
2023-01-05 14:00:39 -03:00
Kjell Winblad
5266722e51
feat: upgrade MongoDB library to support MongoDB 5.1+
2023-01-05 16:40:45 +01:00
Kjell Winblad
b59c4c34c5
fix(Bridge REST API): no feedback when deleting bridge
...
This fixes https://emqx.atlassian.net/browse/EMQX-8648 . The issue
described in `EMQX-8648` is that when deleting a non-existing bridge the
server gives a success response. See below:
```
curl --head -u admin:public2 -X 'DELETE' 'http://localhost:18083/api/v5/bridges/webhook:i_do_not_exist '
HTTP/1.1 204 No Content
date: Tue, 03 Jan 2023 16:59:01 GMT
server: Cowboy
```
After the fix, deleting a non existing bridge will give the following
response:
```
HTTP/1.1 404 Not Found
content-length: 49
content-type: application/json
date: Thu, 05 Jan 2023 12:40:35 GMT
server: Cowboy
```
Closes: EMQX-8648
2023-01-05 16:19:46 +01:00
Thales Macedo Garitezi
c6b8e614df
fix(authz_http): handle `ignore` results (request failures)
...
Related issue: https://github.com/emqx/emqx/issues/9683
When the HTTP request for authz fails (e.g.: resource is down or
server is down), then the HTTP authorizer returns `ignore`, which was
not handled correctly by the authorization callback.
2023-01-05 11:34:23 -03:00
Thales Macedo Garitezi
cf6996cbea
test(flaky): fix flaky jwt worker test
2023-01-05 11:19:43 -03:00
Thales Macedo Garitezi
70eb5ffb58
refactor: remove unused function
2023-01-05 10:16:01 -03:00
Thales Macedo Garitezi
56437228dc
docs: improve descriptions
...
Thanks to @qzhuyan for the corrections.
2023-01-05 10:16:01 -03:00
Thales Macedo Garitezi
fd360ac6c0
feat(buffer_worker): refactor buffer/resource workers to always use queue
...
This makes the buffer/resource workers always use `replayq` for
queuing, along with collecting multiple requests in a single call.
This is done to avoid long message queues for the buffer workers and
rely on `replayq`'s capabilities of offloading to disk and detecting
overflow.
Also, this deprecates the `enable_batch` and `enable_queue` resource
creation options, as: i) queuing is now always enables; ii) batch_size
> 1 <=> batch_enabled. The corresponding metric
`dropped.queue_not_enabled` is dropped, along with `batching`. The
batching is too ephemeral, especially considering a default batch time
of 20 ms, and is not shown in the dashboard, so it was removed.
2023-01-05 10:15:09 -03:00
Thales Macedo Garitezi
bf3983e7c4
feat(buffer_worker): use offload mode for `replayq`
...
To avoid confusion for the users as to what persistence guarantees we
offer when buffering bridges/resources, we will always enable offload
mode for `replayq`. With this, when the buffer size is above the max
segment size, it'll flush the queue to disk, but on recovery after a
restart it'll clean the existing segments rather than resuming from
them.
2023-01-05 10:11:59 -03:00
ieQu1
5d9f9671e9
feat(emqx_metrics): Sliding window samples
2023-01-05 13:55:52 +01:00
Thales Macedo Garitezi
fa4f90d43e
Merge pull request #9676 from thalesmg/fix-change-retainer-storage-type-v50
...
fix(retainer): change mnesia table storage types during update
2023-01-05 09:07:10 -03:00
ieQu1
93c205db7c
fix(router_helper): Reduce log verbosity of expected events
2023-01-05 12:17:27 +01:00
Thales Macedo Garitezi
51ad27cb4b
test(retainer): assert that retained messages are not lost when changing storage type
2023-01-04 13:52:52 -03:00
Thales Macedo Garitezi
2f13bfd452
fix(retainer): change mnesia table storage types during update
...
https://emqx.atlassian.net/browse/EMQX-8650
2023-01-04 13:52:52 -03:00
Thales Macedo Garitezi
86a4ac87a7
Merge pull request #9674 from thalesmg/reset-rule-metrics-on-disable-v50
...
chore(rule_engine): reset metrics when disabling a rule
2023-01-04 13:30:39 -03:00
Thales Macedo Garitezi
00b91d8a60
Merge pull request #9664 from thalesmg/fix-mongo-duration-field-descs-v50
...
docs(mongodb_connector): fix duration field descriptions
2023-01-04 10:03:38 -03:00
Thales Macedo Garitezi
eb7dca3691
chore(rule_engine): reset metrics when disabling a rule
...
https://emqx.atlassian.net/browse/EMQX-8502
When a bridge is disabled, its metrics are reset. With this change,
we make rule actions behave like that: disabling a rule will reset its
metrics.
2023-01-04 09:30:47 -03:00
Erik Timan
f767db4d8f
Merge pull request #9660 from olcai/refactor-ingress-bridge-counter
...
refactor(emqx_resource): ingress bridge counter
2023-01-04 10:43:07 +01:00
Thales Macedo Garitezi
c3cfbae3c2
docs: improve descriptions
...
Thanks to @qzhuyan for the corrections
2023-01-03 11:38:09 -03:00
firest
b43be50a98
test: add the `redacted` test case for bridges api
2023-01-03 22:16:34 +08:00
firest
b016695cb1
fix(bridges): obfuscate the password in bridges API responses
2023-01-03 22:09:29 +08:00
Thales Macedo Garitezi
7bbdc20993
docs(mongodb_connector): fix duration field descriptions
...
https://emqx.atlassian.net/browse/EMQX-8642
Adds different descriptions for the different fields of type duration
for MongoDB.
Based off: https://www.mongodb.com/docs/manual/reference/connection-string/
2023-01-03 10:01:56 -03:00
Zaiming (Stone) Shi
ced5a27053
test: fix emqx_conf test cases
2023-01-02 21:30:40 +01:00
ieQu1
2f208c3ab9
fix(cluster_rpc): Detect stopped replicant nodes
2023-01-02 21:30:40 +01:00
lafirest
7985cd3536
Merge pull request #9638 from lafirest/fix/mysql_dup
...
fix(mysql): fix the problem of data loss and bad match when mysql is disconnected
2023-01-02 23:15:44 +08:00
Erik Timan
b9d012e072
refactor(emqx_resource): ingress bridge counter
...
Unify code paths for resource metrics by removing
emqx_resource:inc_received/1 and adding
emqx_resource_metrics:received_inc/1 & friends.
2023-01-02 15:11:52 +01:00
Thales Macedo Garitezi
7e02eac3bc
Merge pull request #9619 from thalesmg/refactor-gauges-v50
...
refactor(metrics): use absolute gauge values rather than deltas (v5.0)
2023-01-02 10:56:47 -03:00
firest
bc37556963
fix(mysql): fix the problem of data loss and bad match when mysql is disconnected
2023-01-02 21:46:24 +08:00
Zaiming (Stone) Shi
dbc10c2eed
chore: update copyright year 2023
2023-01-02 09:22:27 +01:00
Zaiming (Stone) Shi
231d6da4dc
Merge pull request #9644 from id/fix-kafka-bridge-connectivity-detection
...
fix(kafka): detect connectivity in on_get_status
2022-12-30 21:54:56 +01:00
Thales Macedo Garitezi
305ed68916
chore: bump app vsns
2022-12-30 16:51:24 -03:00
Thales Macedo Garitezi
8b060a75f1
refactor(metrics): use absolute gauge values rather than deltas
...
https://emqx.atlassian.net/browse/EMQX-8548
Currently, we face several issues trying to keep resource metrics
reasonable. For example, when a resource is re-created and has its
metrics reset, but then its durable queue resumes its previous work
and leads to strange (often negative) metrics.
Instead using `counters` that are shared by more than one worker to
manage gauges, we introduce an ETS table whose key is not only scoped
by the Resource ID as before, but also by the worker ID. This way,
when a worker starts/terminates, they should set their own gauges to
their values (often 0 or `replayq:count` when resuming off a queue).
With this scoping and initialization procedure, we'll hopefully avoid
hitting those strange metrics scenarios and have better control over
the gauges.
2022-12-30 16:51:24 -03:00
Zaiming (Stone) Shi
b30f2ea58b
fix(statsd schema): a field is not 'required' when it has 'default'
2022-12-30 14:20:24 +01:00
Zaiming (Stone) Shi
981f75dc73
test(emqx_modules): do not expect badmatch in test cases!!!
2022-12-30 14:20:24 +01:00
Zaiming (Stone) Shi
0ce1ca89b7
refactor: use string type for server and servers
2022-12-30 14:20:23 +01:00
Zaiming (Stone) Shi
cac7e0c5f0
refactor: move version prefix string detection to a static fun
...
this is to make dialyzer happy
2022-12-30 14:19:03 +01:00
Thales Macedo Garitezi
a612eacf3a
Merge pull request #9641 from thalesmg/fix-gcp-pubsub-jwt-refresh-v50
...
fix(gcp_pubsub): fix potential jwt accumulation and lack of refresh (v5.0)
2022-12-30 09:33:41 -03:00
Ivan Dyachkov
f410201dc3
chore: fix flaky test case in emqx_connector_jwt_worker_SUITE
2022-12-30 11:45:13 +01:00
zhongwencool
f92b1fb8f4
Merge pull request #9633 from zhongwencool/fix-json-fmt
...
fix: bad best fmt json []
2022-12-30 09:08:13 +08:00
Thales Macedo Garitezi
446a4c74d0
fix(gcp_pubsub): fix potential jwt accumulation and lack of refresh (v5.0)
...
https://emqx.atlassian.net/browse/EMQX-8653
Related:
- https://emqx.atlassian.net/browse/EEC-737
- https://emqx.atlassian.net/browse/EMQX-8652
Since the rule resource testing mechanism creates a new resource to
test the configuration, a new JWT associated with an unique temporary
resource was being created and left in the JWT table, leaking it.
Also, a wrong case clause when setting the new refresh timer for the
JWT worker was preventing it from refreshing from the 2nd refresh
onward.
2022-12-29 16:30:36 -03:00
Zaiming (Stone) Shi
0b43ae621d
ci: dump docker-compose log if failed to run ct
2022-12-29 09:23:11 +01:00
Zhongwen Deng
4e62aff3ab
fix: bad best fmt json []
2022-12-29 14:53:00 +08:00
Zaiming (Stone) Shi
2790d5697d
test: add a 2 seconds sleep between listener sotp and restart
...
to lower the chance of eaddrinuse
2022-12-28 18:48:53 +01:00
Thales Macedo Garitezi
4819794401
test(refactor): decrease test teardown noise
2022-12-27 10:30:14 -03:00
Thales Macedo Garitezi
6fdcba641e
test(refactor): no need for monitor
...
the janitor is already linked to the parent
2022-12-27 10:30:14 -03:00
Zaiming (Stone) Shi
a777bac38c
build: prepare for v5.0.13 release
2022-12-27 11:54:09 +01:00
Zaiming (Stone) Shi
15bd797b36
ci: bump to v5.0.13-rc.3
2022-12-27 11:24:47 +01:00
Zaiming (Stone) Shi
580137de0d
Merge remote-tracking branch 'origin/master' into release-50
2022-12-27 11:06:17 +01:00
lafirest
2ff6ef01f1
Merge pull request #9599 from lafirest/fix/blacklist_default_exp
...
fix(banned): ensure the default expiration time of `banned` is large enough
2022-12-27 17:30:10 +08:00
Zaiming (Stone) Shi
0517541f34
ci: bump to v5.0.13-rc.2
2022-12-27 09:54:34 +01:00
Zaiming (Stone) Shi
18246442aa
chore: prepare v5.0.13-rc.1
...
bump dashboard version to v1.1.4
2022-12-26 21:45:48 +01:00
zhongwencool
81b226a801
Merge pull request #9608 from zmstone/1123-pin-hocon-0.33.0
...
1123 pin hocon 0.33.0
2022-12-26 19:22:21 +08:00
firest
af3f0c9bb0
fix(banned): ensure the default timeout of `banned` is large enough
2022-12-26 10:17:31 +08:00
Zaiming (Stone) Shi
f93c22045d
fix: non-empty field should not be undefined
2022-12-24 11:41:45 +01:00
Zaiming (Stone) Shi
269a40a9ea
fix: format psk user lookup fun back to string
2022-12-23 19:22:15 +01:00
Zaiming (Stone) Shi
d3efb0c0ba
chore: bump app versions
2022-12-23 15:10:16 +01:00
Zaiming (Stone) Shi
350023e757
fix(config): option only_fill_defaults renamed to make_serializable
2022-12-23 14:27:04 +01:00
Thales Macedo Garitezi
35dc75b7ed
feat(mqtt): add option to customize clientid prefix for egress bridges
...
https://emqx.atlassian.net/browse/EMQX-8445
Currently the bridge client’s client ID is prefixed with the resource
ID.
Sometimes it’s useful for users to have control of this prefix,
e.g. prefix based ACL rules in the target broker.
2022-12-23 09:50:26 -03:00
Ilya Averyanov
fa7433628c
fix(logs): set password field sensitive for connectors
2022-12-23 12:46:03 +01:00
Zaiming (Stone) Shi
59970272ff
chore: pin hocon 0.33.0
2022-12-23 12:07:36 +01:00
Zaiming (Stone) Shi
6292d7ec68
refactor: remove dead code
2022-12-23 12:07:36 +01:00
Erik Timan
13942f5c49
refactor: rename error return in mysql connector
2022-12-22 10:29:12 +01:00
Erik Timan
7df24000a0
test: add more EE mysql bridge test cases
2022-12-22 10:27:38 +01:00
Erik Timan
23ac426608
fix(emqx_connector): check for key among prepared statements on query
...
An infinite loop was triggered in the mysql connector when a query
used a prepared statement key that was not among the defined prepared
statements on start. We now check that the key is defined among the
prepared statements before recursing. It seems that this bug was never
triggered in any production code flow and simply found while writing
tests.
An error return spell fix is also included as well as a FIXME comment
regarding running mysql:prepare and not distinguishing between
transient failures and syntax errors. Syntax errors should not be
retried.
2022-12-22 10:27:38 +01:00
lafirest
f660724bf7
Merge pull request #9582 from lafirest/fix/fix_field_name
...
fix(limiter): change limiter `cache` to `buffer`
2022-12-21 18:12:40 +08:00
firest
a8e020af58
fix(limiter): change limiter `cache` to `buffer`
2022-12-20 22:30:52 +08:00
Zaiming (Stone) Shi
516147ad00
Merge pull request #9581 from zmstone/1219-fix-mqtt-bridge-config
...
1219 fix mqtt bridge config
2022-12-20 14:47:02 +01:00
Zaiming (Stone) Shi
479e191dcf
refactor: refine worker pool config and doc
...
worker pool is a buffer pool
the description hinted connection pool which is wrong.
2022-12-20 09:02:51 +01:00
Zaiming (Stone) Shi
da51433dc3
refactor: add default value for eggress remote 'qos' and 'retain'
...
otherwise when updating from dashboard, there is no way to set
'false' for 'retain' because it's a checkbox,
it's either 'true' or 'undefined'
2022-12-20 00:00:31 +01:00
Zaiming (Stone) Shi
c085ffa0fe
refactor: default mqtt bridgge buffer pool size down to 4
2022-12-19 23:59:46 +01:00
Zaiming (Stone) Shi
f611cbab45
chore: cap replayq seg size under total size
2022-12-19 23:16:05 +01:00
Zaiming (Stone) Shi
e932569f34
refactor: delete stale code
...
'hash' strategy has been removed from config schema
hence no need to keep the compatibility code
2022-12-19 20:20:58 +01:00
Zaiming (Stone) Shi
ad3a793910
fix(shared_sub): insert alive pid table at mnesia table event
2022-12-19 20:12:38 +01:00
Zaiming (Stone) Shi
4f1fb0b629
refactor(shared_sub): improve sticky strategy performance
...
* avoid calling ets:select twice for sticky strategy
* when the calling process is terminating, no loop-back dispatch
2022-12-19 20:04:33 +01:00
Zaiming (Stone) Shi
29f394aa70
fix(shared): handle unsubscribe for sticky strategy
...
prior to this change, the message is dispatched to a shared subscriber
even after unsubscribed
2022-12-19 19:12:38 +01:00
Zaiming (Stone) Shi
67718ef84f
docs: prepare to deprecate broker.shared_dispatch_ack_enabled
2022-12-19 17:07:52 +01:00
Stefan Strigler
7aee1a08aa
Merge pull request #9531 from sstrigler/EMQX-7982-put-authentication-id-should-return-204
...
refactor: return `204` instead of `200` for `PUT /authenticator/:id`
2022-12-19 14:46:31 +01:00
Andrew Mayorov
cbe54c001c
Merge pull request #9510 from keynslug/chore/otp-25-compat
...
chore: enable OTP-25 compatibility
2022-12-19 15:12:19 +04:00
Stefan Strigler
9d97775567
refactor: return `204` instead of `200` for `PUT /authenticator/:id`
2022-12-19 10:02:08 +01:00
JimMoen
4906da9796
test(rule-funcs): test compression funcs
2022-12-19 15:43:50 +08:00
JimMoen
5151242583
feat(rule-engine): `zip`, `gzip`, `zip_compress` funcs in rule-sql
2022-12-19 15:43:50 +08:00
Andrew Mayorov
ed2d5aa48a
fix: handle status in `format_status/1` callback
...
Which is expected argument type for this callback. Also try to
make sure that random maps won't pass through this callback unnoticed.
2022-12-16 13:45:06 +03:00
Andrew Mayorov
41a4e41d0c
fix(ct): prevent testcase flapping
...
Testcase `t_log_file` was flapping when run happened to pass through
boundary of a second. Archive files' `ctime`s could differ between
consecutive archive downloads.
2022-12-16 13:45:06 +03:00
Andrew Mayorov
4f00f0968d
ci: update to emqx-plugin-template 5.0.0
2022-12-16 13:45:06 +03:00
Andrew Mayorov
fed7c80a9a
fix(ci): spec function with explicit exception
2022-12-16 13:45:05 +03:00
Andrew Mayorov
8a0ca38a77
fix: drop no longer supported dialyzer option
2022-12-16 13:45:05 +03:00
Andrew Mayorov
c301c8e992
chore: drop few unused macros / includes
2022-12-16 13:45:04 +03:00