Commit Graph

16002 Commits

Author SHA1 Message Date
JianBo He
4e9eeb489d
Merge pull request #10969 from thalesmg/refactor-gcp-pubsub-on-stop-v50
refactor(gcp_pubsub): always cleanup resources when calling `on_stop`
2023-06-08 09:47:19 +08:00
JianBo He
0b95bc1c1b
Merge pull request #10907 from HJianBo/refactor-on-stop-simple
feat: refactored some bridges to avoid leaking resources part.2
2023-06-08 09:37:31 +08:00
Zaiming (Stone) Shi
641aca00d8
Merge pull request #10954 from zhongwencool/flapping-detect-conf
feat: don't hide enable in flapping detect conf
2023-06-07 23:04:56 +02:00
Zaiming (Stone) Shi
aecea50564
Merge pull request #10902 from zmstone/0529-donot-copy-cluster-conf-from-newer-version
0529 donot copy cluster conf from newer version
2023-06-07 20:32:11 +02:00
Thales Macedo Garitezi
d9aac63f82 refactor(gcp_pubsub): always cleanup resources when calling on_stop
Fixes https://emqx.atlassian.net/browse/EMQX-9934

The way that this connector was structured already depended only on the resource ID.  This
PR just makes it completely independent of the resource state term, and also treats an
already absent pool as a success when stopping it.
2023-06-07 14:34:22 -03:00
Thales Macedo Garitezi
105c26afb5
Merge pull request #10964 from thalesmg/fix-hocon-compact-errors-v50
fix(schema): avoid `function_clause` error when compacting errors
2023-06-07 14:00:24 -03:00
JimMoen
d27903c1e9
Merge pull request #10906 from JimMoen/fix-shared-sub-unsub
refacting and small bug fix of share-sub.
Part.1 of mqtt client shared sub-unsub.
2023-06-08 00:26:56 +08:00
Zaiming (Stone) Shi
622ac4d195
fix(emqx_schema): binary for string default value 2023-06-07 17:14:10 +02:00
JimMoen
7d073c0d3d
style: make static_checks happy 2023-06-07 23:06:47 +08:00
JimMoen
4ea3483083
perf(topic): use tail recursive to joining a topic 2023-06-07 22:59:53 +08:00
JimMoen
b0e18f5e75
fix(shared-sub): validate share topic error send DISCONNECT 2023-06-07 22:59:52 +08:00
JimMoen
070e410c69
refactor: variable and func rename 2023-06-07 22:59:52 +08:00
JimMoen
ea81a924f1
refactor: move topic() types def in emqx_types.erl 2023-06-07 22:59:52 +08:00
JimMoen
65483e972e
refactor: use unified table define 2023-06-07 22:51:44 +08:00
zhongwencool
70e800f8a4 chore: delete unuse default value and make flapping_detect middle improtance 2023-06-07 22:50:11 +08:00
Paulo Zulato
63d42091e2
Merge pull request #10933 from paulozulato/feat-configurable-tcp-keepalive
feat(connection): configurable TCP keepalive
2023-06-07 11:30:43 -03:00
zhongwencool
5659cc2b47 feat: add converter to flapping_detect 2023-06-07 21:54:32 +08:00
zhongwencool
1d33b7dbd8 chore: make static check happy 2023-06-07 21:54:32 +08:00
zhongwencool
535870386a fix: zones update api failed 2023-06-07 21:54:32 +08:00
zhongwencool
d58506a7c3 feat: always update default zones 2023-06-07 21:54:32 +08:00
zhongwencool
48381d4c86 feat: refactor flapping detect conf 2023-06-07 21:54:32 +08:00
Thales Macedo Garitezi
cc8631223e fix(schema): avoid function_clause error when compacting errors
Fixes https://emqx.atlassian.net/browse/EMQX-10168

The bridge probe API displayed the typecheck errors for the new
timeout duration types correctly, but when an user tried to create the
bridge anyway a `function_clause` error was raised when trying to
compact hocon errors:

```
09:47:19.045 [warning] [exception: :error, path: '/bridges', reason: {:case_clause, {:error, {:config_update_crashed, :function_clause}}}, stacktrace: [{:emqx_bridge_api, :create_or_update_bridge, 4, [file: '/home/thales/dev/emqx/emqx/apps/emqx_bridge/src/emqx_bridge_api.erl', line: 602]}, {:minirest_handler, :apply_callback, 3, [file: '/home/thales/dev/emqx/emqx/deps/minirest/src/minirest_handler.erl', line: 111]}, {:minirest_handler, :handle, 2, [file: '/home/thales/dev/emqx/emqx/deps/minirest/src/minirest_handler.erl', line: 44]}, {:minirest_handler, :init, 2, [file: '/home/thales/dev/emqx/emqx/deps/minirest/src/minirest_handler.erl', line: 27]}, {:cowboy_handler, :execute, 2, [file: '/home/thales/dev/emqx/emqx/deps/cowboy/src/cowboy_handler.erl', line: 41]}, {:cowboy_stream_h, :execute, 3, [file: '/home/thales/dev/emqx/emqx/deps/cowboy/src/cowboy_stream_h.erl', line: 318]}, {:cowboy_stream_h, :request_process, 3, [file: '/home/thales/dev/emqx/emqx/deps/cowboy/src/cowboy_stream_h.erl', line: 302]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]]
```

This fixes the issue so that both APIs return more friendly error messages.
2023-06-07 10:34:58 -03:00
Paulo Zulato
a4407764f3 feat(connection): configurable TCP keepalive
Fixes https://emqx.atlassian.net/browse/EMQX-9852
2023-06-07 10:23:38 -03:00
JimMoen
d8190caa49
Merge pull request #10960 from zmstone/0607-fix-spellcheck 2023-06-07 21:10:45 +08:00
Thales Macedo Garitezi
f9ff1007a0
Merge pull request #10944 from thalesmg/pubsub-jwt-on-demand-v50
feat(gcp_pubsub): generate jwt tokens on demand without workers (5.1)
2023-06-07 09:22:09 -03:00
Zaiming (Stone) Shi
085ffb617f chore: add 'mcast' to spellcheck dict 2023-06-07 12:05:24 +02:00
zhongwencool
9a7dc98234
Merge pull request #10939 from JimMoen/bump-dashboard-tags
build: bump dashboard tag `v1.2.6-beta.1` and `e1.1.0-beta.2`
2023-06-07 16:21:45 +08:00
SergeTupchiy
3c482e9aa6
Merge pull request #10953 from SergeTupchiy/fix-listener-authn-update
fix(emqx_listeners): fix listener authentication create/update
2023-06-07 11:12:41 +03:00
Zaiming (Stone) Shi
cb3e787cb1 Merge remote-tracking branch 'origin/master' into 0529-donot-copy-cluster-conf-from-newer-version 2023-06-07 09:14:04 +02:00
Zaiming (Stone) Shi
ce4e49cd9e
Merge pull request #10943 from zmstone/0605-hide-mcast-cluster-discovery
chore: start deprecating mcast cluster discovery
2023-06-07 08:32:33 +02:00
JimMoen
bed1efd99f
build: bump dashboard tag v1.2.6-beta.1 and e1.1.0-beta.2
The dashboard asset zip file will contain version after these two tags.
2023-06-07 10:26:36 +08:00
JianBo He
21b451a4c2
Merge pull request #10951 from HJianBo/mqttsn-mountpoint-pub
fix(mqttsn): make mountpoint works for publish
2023-06-07 09:39:46 +08:00
Thales Macedo Garitezi
260fae296b feat(gcp_pubsub): generate jwt tokens on demand without workers (5.1)
Fixes https://emqx.atlassian.net/browse/EMQX-9603

Rather than relying on a JWT worker to produce and refresh tokens, we
could just produce then on demand when pushing the messages to GCP
PubSub.  That can generate a bit of extra work (as multiple processes
might realize it’s time to refresh the JWT and do so), but that
shouldn’t be much.  In return, we avoid any possibility of not having
a fresh JWT when pushing messages.
2023-06-06 13:19:24 -03:00
Serge Tupchii
bf2b5a9f24 fix(emqx_listeners): fix listener authentication create/update
Listener authentication is a list of authenticators, so each of them must be created
or updated individually.
2023-06-06 19:00:35 +03:00
SergeTupchiy
e749ae6863
Merge pull request #10952 from SergeTupchiy/EMQX-9586-validate-fail_if_no_peer_cert
fix(emqx_schema): don't allow enabling `fail_if_no_peer_cert` if `verify_none` is set
2023-06-06 17:28:52 +03:00
Serge Tupchii
1968589f81 fix(emqx_schema): don't allow enabling fail_if_no_peer_cert if verify_none is set
Setting `fail_if_no_peer_cert = true` and `verify = verify_none` causes connection errors.

Closes: EMQX-9586
2023-06-06 17:20:22 +03:00
Thales Macedo Garitezi
770dd188b1
Merge pull request #10947 from emqx/release-51
Release 51 to master
2023-06-06 09:32:16 -03:00
JianBo He
f26b372e51 chore: update changes 2023-06-06 18:47:41 +08:00
JianBo He
bcc47442eb fix(mqttsn): make mountpoint works for publish 2023-06-06 18:44:27 +08:00
Andrew Mayorov
68cd0c47f5
Merge pull request #10945 from fix/EMQX-9967/tmpfn-enametoolong
fix(ft): ensure temp filenames are under 255 bytes long
2023-06-06 13:34:47 +03:00
Andrew Mayorov
783f6933a3
Merge pull request #10946 from fix/mqtt-bridge-no-warn-pool-size-1
fix(mqttconn): no warn if ingress poolsize is same as config
2023-06-06 11:12:14 +03:00
Andrew Mayorov
dcd59e4f1b
fix(ft): set more conservative filename length limit
Otherwise, local fs exporter will have a hard time preserving the
filemeta, because its filename is even 13 bytes longer.
2023-06-06 10:40:20 +03:00
Andrew Mayorov
69b98c1830
fix(ft): ensure temp filenames are under 255 bytes long 2023-06-06 10:38:31 +03:00
zhongwencool
0a017dd549
Merge pull request #10942 from zhongwencool/gateway-conf-update
feat: update gateway from cli
2023-06-06 10:46:40 +08:00
某文
47d7e6ce01 feat: update gateway from cli 2023-06-06 08:12:47 +08:00
zhongwencool
ddb4a09a3d
Merge pull request #10935 from zhongwencool/listeners-conf-update
feat: update listeners from cli
2023-06-06 08:10:45 +08:00
Zaiming (Stone) Shi
da8f3da4cc ci: fix CFLAGS for macos otp build 2023-06-06 01:45:51 +02:00
Zaiming (Stone) Shi
b3c079dc21 ci: try --with-odbc 2023-06-06 01:21:09 +02:00
Zaiming (Stone) Shi
541dc1b9cf ci: inspec erl in PATH for macos builds 2023-06-05 23:19:34 +02:00
Zaiming (Stone) Shi
3caf114f68 test: fix test case is_list(Config) function guard 2023-06-05 23:00:41 +02:00