Compare commits

...

3474 Commits

Author SHA1 Message Date
Thales Macedo Garitezi e2976c7007
Merge pull request #11348 from thalesmg/fix-ocsp-path-encoding-v44-20230725
fix(ocsp): ensure request path is URL encoded (v4.4)
2023-07-26 15:29:37 -03:00
Thales Macedo Garitezi a92a68c1e0 fix(ocsp): ensure request path is URL encoded (v4.4)
Fixes https://emqx.atlassian.net/browse/EMQX-10624
2023-07-26 09:19:36 -03:00
Xinyu Liu 12c5595381
Merge pull request #11167 from terry-xiaoyu/bump_app_vsn
fix: bump app vsns
2023-06-30 15:54:21 +08:00
Shawn 504b20d4bc fix: download maven-3.6.3 404 2023-06-30 15:38:27 +08:00
Shawn ab26831e7e fix: download jmeter failed with 404 2023-06-30 14:58:52 +08:00
Shawn 25b4737890 fix: bump app vsns 2023-06-30 14:41:54 +08:00
Shawn e92eb22c13 Merge branch 'release-v44' into main-v4.4 2023-06-30 13:32:24 +08:00
Kjell Winblad 4ee6244c93
Merge pull request #11073 from kjellwinblad/kjell/fix/4.4/div_mod_diff_behavior/EMQX-10216
fix: rule engine different behavior for div and mod
2023-06-27 17:32:27 +02:00
Kjell Winblad fba8a787f4 fix: rule engine different behavior for div and mod
Previously, the div operation could only be used as an infix operation
while mod could only be used as a function call. After this commit, one
can use both div and mod using function call syntax and infix syntax.

Fixes: https://emqx.atlassian.net/browse/EMQX-10216
2023-06-27 14:51:22 +02:00
Shawn bfc336bc5e chore: release v4.4.19 2023-06-25 19:14:59 +08:00
Shawn 23786e949e chore: update change logs 2023-06-25 16:48:40 +08:00
Shawn 705f2df456 chore: release v4.4.19-alpha.4 2023-06-21 17:31:35 +08:00
Xinyu Liu c9b029a6f0
Merge pull request #11113 from terry-xiaoyu/random_uuid_sql_funcs
feat: add new sql-funcs random/0 and uuid_v4/0
2023-06-21 17:02:48 +08:00
Shawn 20cf06c917 chore: add changelogs for random sql functions 2023-06-21 16:44:25 +08:00
Shawn 2929e986ef feat: add new sql-funcs random/0 and uuid_v4/0 2023-06-21 16:16:54 +08:00
Shawn 74006440a8 chore: release v4.4.19-alpha.3 2023-06-20 20:49:06 +08:00
Shawn e6ae98dd40 chore: sync code from ee 2023-06-20 20:47:51 +08:00
Xinyu Liu 21797d841e
Merge pull request #11096 from emqx/range_validator_max_clientid_len
fix: add range validation for max_clientid_len
2023-06-20 11:33:00 +08:00
Shawn 38d92c9401 fix: add range validation for max_clientid_len 2023-06-20 10:30:06 +08:00
Xinyu Liu 70344aae25
Merge pull request #11072 from terry-xiaoyu/more-reliable-rule-cache-update
fix: make rule cache update more reliable
2023-06-17 17:48:19 +08:00
Shawn c1e47914a6 fix: make rule cache update more reliable 2023-06-16 17:46:45 +08:00
Xinyu Liu a2dae3425f
Merge pull request #11060 from emqx/password-leak-in-logs-rule-engine
Password leak in logs rule engine
2023-06-15 16:59:37 +08:00
Shawn 57cc1d2235 chore: update appup.src
This reverts commit 4836bc62f6.
2023-06-15 15:47:15 +08:00
Shawn 391c088060 fix: dialyzer problems 2023-06-15 15:36:56 +08:00
Shawn 4836bc62f6 chore: update emqx_rule_engine.appup.src 2023-06-15 15:07:17 +08:00
Shawn e64587f3da fix: password leaks from rule engine logs 2023-06-15 14:58:03 +08:00
Shawn fd551e92d1 chore: sync code from ee 2023-06-11 19:25:38 +08:00
Shawn 6426bf29eb chore: release v4.4.19-alpha.2 2023-06-11 18:57:30 +08:00
Shawn 2487aa906f fix: improve the change logs 2023-06-11 18:56:46 +08:00
William Yang b85f5f0b23
Merge pull request #10981 from qzhuyan/docs/william/tls-partial-chain-add-defaults
chore: add missing TLS defaults in emqx.conf
2023-06-09 09:28:14 +02:00
William Yang 007144a3cc chore: add missing TLS defaults in emqx.conf
- partial chain
- verify_peer_ext_key_usage
2023-06-08 13:24:46 +02:00
Shawn 414f6af663 chore: sync some code from ee 2023-06-01 00:26:40 +08:00
Shawn 3ae37d6d81 chore: release v4.4.19-alpha.1 2023-05-31 23:50:46 +08:00
Xinyu Liu 0f1406743a
Merge pull request #10898 from terry-xiaoyu/add-live-connections-in-nodes-api
chore: update change logs
2023-05-31 18:39:51 +08:00
Shawn 3dd51247eb chore: update change logs 2023-05-31 18:39:08 +08:00
Xinyu Liu 52b269a680
Merge pull request #10859 from terry-xiaoyu/add-live-connections-in-nodes-api
feat: add 'live_connections' field in the /nodes API
2023-05-30 10:25:14 +08:00
Shawn ab376fa141 feat: add 'live_connections' field in the /nodes API 2023-05-29 23:40:49 +08:00
Xinyu Liu abbea11a44
Merge pull request #10854 from terry-xiaoyu/sync-code-from-ee
feat: configurable TCP keepalive
2023-05-29 19:49:48 +08:00
Shawn 797c422221 chore: update emqx.appup.src 2023-05-29 19:49:33 +08:00
Shawn 836edad6cf chore: update change logs 2023-05-29 18:08:39 +08:00
Shawn d6282e9156 feat: configurable TCP keepalive 2023-05-29 17:48:03 +08:00
William Yang 3e7ec9d008
Merge pull request #10705 from qzhuyan/dev/william/tls-root-fun-verify-partial-chain-2
feat(tls-partial-chains): update schema
2023-05-24 10:03:00 +02:00
William Yang 7cd059b5c9 docs(partial-chain): changelogs 2023-05-23 09:11:17 +02:00
William Yang 9c76bd2c4b feat(tls-partial-chains): update schema 2023-05-23 09:10:04 +02:00
Shawn 9986a2b8df chore: update emqx.appup.src 2023-05-18 17:47:10 +08:00
Xinyu Liu be0038ec25
Merge pull request #10729 from terry-xiaoyu/improve-emqx-cm
Improve emqx cm
2023-05-18 17:18:28 +08:00
Xinyu Liu 1aceb7aa6a
Merge pull request #10710 from terry-xiaoyu/webhook-crash
fix: webhook crash at on_client_connack
2023-05-17 21:19:04 +08:00
Shawn fd0083d836 chore: update ehttpc to 0.4.9 2023-05-17 21:17:58 +08:00
William Yang 4a476be5b7
Merge pull request #10669 from qzhuyan/dev/william/tls-verify-keyusages
feat(TLS): veriy client cert keyusage
2023-05-17 10:59:36 +02:00
Shawn b19136a12f chore: update change logs 2023-05-17 14:36:59 +08:00
Shawn 6933839858 chore: improve the open_session procedure 2023-05-17 14:17:01 +08:00
Shawn c3164aa917 chore: update ehttpc to 0.4.8 2023-05-16 13:54:22 +08:00
Shawn eafa36c3ae fix: webhook crash at on_client_connack 2023-05-16 13:51:23 +08:00
Shawn 49bf7a7db1 chore: improve some logs in emqx_connection 2023-05-16 13:49:34 +08:00
William Yang dfabc7ca72 chore: improve coverage 2023-05-12 18:13:21 +02:00
William Yang 64955e9083 test(tls-keyusage): add some comments 2023-05-12 11:36:56 +02:00
William Yang 4ac2f6d205 fix: default value 2023-05-12 11:36:56 +02:00
William Yang 535d040554 docs: changelog for tls client cert keyusage validation 2023-05-12 11:36:56 +02:00
William Yang 7346dfe510 refactor: verify_fun_peer_extKeyUsage/3 2023-05-12 11:36:56 +02:00
William Yang 5fa060a43c feat: enhanced tls handshake 2023-05-12 11:36:56 +02:00
William Yang 049a18416e
Merge pull request #10673 from qzhuyan/docs/william/fix-changelog-partial-chain
docs: fix misplaced TLS partial chain changlog
2023-05-12 11:34:19 +02:00
Thales Macedo Garitezi 6ae2811c05
Merge pull request #10652 from thalesmg/bump-gproc-0901-v44
chore: update gproc -> 0.9.0.1 [v4.4]
2023-05-11 16:55:38 -03:00
William Yang 35d6c55633 docs: fix misplaced TLS partial chain changlog 2023-05-11 10:35:00 +02:00
William Yang 6fa4b9759a
Merge pull request #10553 from qzhuyan/dev/william/tls-root-fun-verify-partial-chain
v4.4: feat(listener): TLS partial_chain validation
2023-05-10 17:20:27 +02:00
JimMoen 5e12e51230
Merge pull request #10661 from JimMoen/compatibility-make4.4+
build: compatibility to make 4.4+
2023-05-10 16:18:09 +08:00
JimMoen 9424d4bfb7
build: compatibility to make 4.4+ 2023-05-10 15:32:28 +08:00
William Yang 7894bb040e chore: update app up src 2023-05-09 17:00:32 +02:00
William Yang 285d3dabc7 feat(tls-partial-chain): support CAcert renewal
The listener could support two versions of CAcerts if partial_chain is set to `two_cacerts_from_cacertfile`
2023-05-09 17:00:32 +02:00
William Yang 151176a6be test(tls-partial-chain): add more tests 2023-05-09 17:00:32 +02:00
William Yang f8bb1b7b55 fix(tls-partial-chain): stack trace 2023-05-09 17:00:32 +02:00
William Yang 90efea4765 fix(test): sign CSR2 2023-05-09 17:00:32 +02:00
William Yang 1520bd7b3f feat(tls-partial-chains): update appup src 2023-05-09 17:00:32 +02:00
William Yang 6d0a76805a feat(tls-partial-chains): error handling for invalid cacertfile 2023-05-09 17:00:32 +02:00
William Yang 30cccab387 chore: review comments 2023-05-09 17:00:32 +02:00
William Yang c3430b8883 feat(tls-partial-chain): just return trusted CA. 2023-05-09 17:00:32 +02:00
William Yang 8503d3c6dd test(tls-partial-chains): renewed intermediate_cacert 2023-05-09 17:00:32 +02:00
William Yang 11c8e937b4 docs: changelog for TLS listener partial certificate chain validation 2023-05-09 17:00:32 +02:00
William Yang ea35b20035 test(tls): test refactoring 2023-05-09 17:00:32 +02:00
William Yang a18018bee0 feat(tls-partial-chain): add partial_chain support for TLS listeners 2023-05-09 16:05:49 +02:00
Thales Macedo Garitezi 601f750569 chore: update gproc -> 0.9.0.1
See: https://github.com/uwiger/gproc/pull/193

Also (appup and tag): https://github.com/emqx/gproc/pull/1
2023-05-09 09:57:19 -03:00
Shawn ee50359357 chore: sync code from enterprise 2023-05-06 16:08:53 +08:00
Xinyu Liu d9f8c096ed
Merge pull request #10620 from terry-xiaoyu/rule-engine-export-columns-from-foreach
fix: cannot access columns exported by FOREACH in DO clause
2023-05-06 15:43:17 +08:00
Shawn 6f959e5784 chore: update the change logs for v4.4.19 2023-05-06 15:42:31 +08:00
Shawn 58cbc7411b fix: try to fix the ci for ldap 2023-05-06 14:12:12 +08:00
Shawn 154fe441de fix: cannot access columns exported by FOREACH in DO clause 2023-05-06 11:28:47 +08:00
zhongwencool 39b00ab602
Merge pull request #10543 from zhongwencool/release-v4.4.18
chore: release v4.4.18
2023-04-27 16:11:49 +08:00
zhongwencool 253fb5d704 chore: release v4.4.18 2023-04-27 15:59:37 +08:00
Shawn 3ba391d39f chore: release v4.4.18-alpha.1 2023-04-21 22:07:20 +08:00
zhongwencool e373affebc
Merge pull request #10467 from zhongwencool/default-plugins-tmpl
fix: ensure default_plugins/0 is the same as loaded_plugins.tmpl.
2023-04-21 21:51:44 +08:00
zhongwencool 5b898d2f7a test: check plugins's enabled/disabled 2023-04-21 18:22:18 +08:00
zhongwencool ad7a13f4f3 chore: update emqx.appup version 2023-04-21 18:21:58 +08:00
zhongwencool a3e263676a fix: ensure default_plugins/0 is the same as loaded_plugins.tmpl. 2023-04-21 18:20:32 +08:00
Xinyu Liu 2ad297ae19
Merge pull request #10470 from terry-xiaoyu/improve_template_syntax
Improve template syntax
2023-04-21 18:19:52 +08:00
Shawn 7836eb44d4 chore: add change logs for v4.4.18 2023-04-21 18:18:55 +08:00
Shawn e5ca44d0b6 chore: update appups and app vsns 2023-04-21 17:03:33 +08:00
Shawn 8db1aae642 feat: improve the syntax of ${} in payload templates 2023-04-21 16:49:39 +08:00
Shawn daa2088b94 chore: release v4.4.17 2023-04-13 18:28:20 +08:00
Shawn 35aaa7746d chore: improve the change logs 2023-04-13 14:49:21 +08:00
Shawn 9768b8112d chore: improve the change logs 2023-04-13 14:41:48 +08:00
Shawn aa683e95a1 chore: release v4.4.17-rc.1 2023-04-13 11:00:35 +08:00
Shawn 9bafc1c997 chore: improve the change logs 2023-04-11 17:26:57 +08:00
Shawn f17d2fe9c4 chore: update change logs 2023-04-11 00:10:22 +08:00
Shawn 0801c130b0 chore: release e4.4.17-alpha.3 2023-04-10 23:35:28 +08:00
Shawn c0a55344c5 revert: Revert "refactor: use mneisa:subscribe/1 for rule operations"
This reverts commit 64309a193b.

For relup from old versions, the emqx_rule_registry has not subscribes
the mnesia events, so we cannot update caches only when mnesia events
received.

For rolling upgrade the nodes one by one, some of the nodes has not
subscribes the mnesia events, so we cannot move the `load_hooks_for_rule`
into the mnesia events handling.

In a word, it is too complicated to use mnesia events, we use RPC instead.
2023-04-10 23:30:15 +08:00
lafirest 891ed4bfad
Merge pull request #10339 from lafirest/fix/emqx_script
fix(script): add default value for "$PROTO_DIST"
2023-04-06 13:52:09 +08:00
firest d026434286 fix(script): add default value for "$PROTO_DIST" 2023-04-06 11:53:04 +08:00
Xinyu Liu 7015da42ee
Merge pull request #10322 from terry-xiaoyu/fix-ci-rerun-failed
fix(CI): remote .jtl files before every jemeter run
2023-04-04 16:02:44 +08:00
Shawn 0ad01e8c90 fix(CI): remote .jtl files before every jemeter run 2023-04-04 15:21:52 +08:00
Shawn ca11afbc64 chore: release v4.4.17-alpha.2 2023-04-04 00:17:05 +08:00
Shawn f2f9970ba1 chore: release 4.4.17-alpha.1 2023-04-03 17:36:31 +08:00
Shawn df23edb102 fix: logger header for rule-registry 2023-04-03 17:30:23 +08:00
Xinyu Liu 074f36cc6a
Merge pull request #10303 from terry-xiaoyu/perf-rules
Improve the rule_cache
2023-04-03 14:12:37 +08:00
Shawn 64309a193b refactor: use mneisa:subscribe/1 for rule operations 2023-04-03 13:38:16 +08:00
Shawn e33a5bfc89 fix: update rule_cache when get_rules/0 2023-03-31 14:17:06 +08:00
Shawn 7dbbef30c9 fix: remove emqx_rule_registry from the qlc_mod list 2023-03-31 13:51:30 +08:00
Xinyu Liu 1141fcf87b
Merge pull request #10283 from terry-xiaoyu/perf-rules
pref: cache the result of emqx_rule_registry:get_rules/0
2023-03-31 13:18:55 +08:00
Shawn c899a6020d fix: update the appups 2023-03-31 13:14:44 +08:00
Shawn 0c07edb8ff chore: update change logs 2023-03-31 13:14:44 +08:00
Shawn 8511dbfde3 perf: cache the result of emqx_rule_registry:get_rules/0 2023-03-31 13:14:39 +08:00
lafirest 1a46add3e6
Merge pull request #10204 from lafirest/fix/dis_with_ssl
fix: add back the support for the `WITH_EPMD` macro
2023-03-30 17:13:13 +08:00
Xinyu Liu 4c197548ee
Merge pull request #10221 from terry-xiaoyu/remove-peercert-from-conninfo
chore: remove peercert from the state of connection processes
2023-03-27 09:23:17 +08:00
Shawn 4142a47e66 chore: remove peercert from the state of connection processes 2023-03-27 09:22:46 +08:00
Xinyu Liu e62d5ce3c3
Merge pull request #10229 from Rory-Z/fix/fix-helm
fix(helm): fix wrong file path
2023-03-24 14:30:25 +08:00
Xinyu Liu a7016b7ecb
Merge pull request #10219 from terry-xiaoyu/testcase-non-utf8-topic
chore: add a testcase for subscribe non-utf8 topics
2023-03-24 14:10:26 +08:00
Shawn 2e50985f35 fix: update testcase t_discard_session_race 2023-03-24 11:40:36 +08:00
Rory Z 286fbb69dc fix(helm): fix wrong file path 2023-03-24 11:09:48 +08:00
Shawn 071162ed4c chore: add a testcase for subscribe non-utf8 topics 2023-03-23 18:25:58 +08:00
Xinyu Liu d1bc1e92d6
Merge pull request #10189 from emqx/dedicated-pool-for-retainer
Dedicated pool for retainer
2023-03-22 19:12:44 +08:00
firest 100477130b fix: add back the support for the `WITH_EPMD` macro 2023-03-22 17:31:06 +08:00
Shawn cb61e5deca chore: update the change logs 2023-03-22 10:51:10 +08:00
Shawn 0b2660f64d chore: start emqx_retainer_worker_pool when relup 2023-03-21 18:47:28 +08:00
Shawn 0eee57e4f7 chore: update appup files 2023-03-21 17:15:26 +08:00
Shawn 3e24d287a3 fix: hide ws_cookie from logs 2023-03-21 17:08:39 +08:00
Shawn 4bfd7dd14a fix: create dedicated pool for retainer 2023-03-21 17:05:13 +08:00
Xinyu Liu 4f3f9d533c
Merge pull request #10183 from terry-xiaoyu/update-esockd-vsn
chore: update esockd to 5.8.9
2023-03-21 13:46:22 +08:00
Shawn 21a203a375 chore: update esockd to 5.8.9 2023-03-21 11:35:08 +08:00
Xinyu Liu a25ca609ab
Merge pull request #10178 from zmstone/chore-upgrade-base16
chore: use zmstone/base16 fork
2023-03-21 09:04:50 +08:00
Ivan Dyachkov 3d8107b48e
Merge pull request #10162 from id/ci-export-docker-image-in-slim-packages
Ci export docker image in slim packages
2023-03-20 18:37:35 +00:00
Zaiming (Stone) Shi 5e62f590a9 chore: bump app versions 2023-03-20 16:47:17 +01:00
Zaiming (Stone) Shi 67bb2ae4ba chore: use base16 fork 2023-03-20 16:36:42 +01:00
Ivan Dyachkov 9e5c3ab5f8 ci: export docker image in build_slim_packages 2023-03-20 11:24:21 +01:00
Ivan Dyachkov bce40dde6d ci: fix deprecated set-output commands 2023-03-20 11:24:21 +01:00
Xinyu Liu c93a53d641
Merge pull request #10108 from zmstone/0309-fix-emqx_cm-log-stale-session-pid-correctly
fix(emqx_cm): avoid using 'pid' as log keyword
2023-03-20 16:30:12 +08:00
Xinyu Liu 2a3dc6918e
Merge branch 'main-v4.4' into 0309-fix-emqx_cm-log-stale-session-pid-correctly 2023-03-20 16:29:37 +08:00
Xinyu Liu 3d99bd2ef5
Merge pull request #10170 from terry-xiaoyu/copyof44
Copyof44
2023-03-20 13:32:50 +08:00
Shawn cbc85bac42 fix: conflicts in change logs 2023-03-20 11:01:47 +08:00
Shawn 69f8d4e969 fix: conflicts in change logs 2023-03-20 10:23:13 +08:00
Shawn 00847170c1 chore: release v4.4.16 2023-03-15 19:25:28 +08:00
Shawn 67e5844ccd chore: release 4.4.16-alpha.3 2023-03-14 23:23:46 +08:00
Xinyu Liu c8955b2444
Merge pull request #10137 from terry-xiaoyu/debug-logs-when-auth-acl-ignored
chore: add debug logs when auth/acl ignored
2023-03-14 23:11:30 +08:00
Shawn a6cf261e66 chore: add debug logs when auth/acl ignored 2023-03-14 22:24:54 +08:00
Xinyu Liu 7baad16f23
Merge pull request #10131 from emqx/topic-rewrite-failed
fix: topic rewrite failed if clientid is an atom()
2023-03-14 20:20:16 +08:00
Shawn 0c670262e7 chore: update emqx_modules.appup.src 2023-03-14 16:22:35 +08:00
Shawn 7407b1b6ed fix: topic rewrite failed if clientid is an atom() 2023-03-14 14:42:08 +08:00
JimMoen 4adb7dafcf
Merge pull request #10120 from JimMoen/fix-typos
chore: fix typos
2023-03-13 18:15:23 +08:00
JimMoen 1b53274fbc
chore: make xref happy 2023-03-13 17:39:33 +08:00
JimMoen 5e67508033
chore: fix typos 2023-03-13 17:03:01 +08:00
Shawn 2ea29feeb7 chore: release v4.4.16-alpha.2 2023-03-10 00:53:02 +08:00
Shawn 993a18d508 fix: nowarn unexported do_when_vsn_lte/4 2023-03-09 20:26:08 +08:00
Shawn 5402ff7fd8 chore: port changes from e4.4 back to v4.4 2023-03-09 20:16:55 +08:00
Zaiming (Stone) Shi b464af311d docs: fix change log heading for 4.4.16 2023-03-09 09:58:48 +01:00
Zaiming (Stone) Shi c72589b52c fix(emqx_cm): avoid using 'pid' as log keyword
'pid' is a logging metadata for the log issuer process,
if 'pid' is used as a structured log field, it will be overwritten
by the logging handler module
2023-03-09 09:55:02 +01:00
William Yang a965649421
Merge pull request #10094 from qzhuyan/fix/william/mqtt-bridge-TLS-wildcard-cert
fix: mqtt bridge tls wildcard cert
2023-03-09 09:21:49 +01:00
Shawn 822ca2e26c chore: release v4.4.16-alpha.1 2023-03-09 15:19:00 +08:00
Shawn c8a65472fd chore: update change logs for v4.4.16 2023-03-09 15:10:20 +08:00
Xinyu Liu ae2dd6a8e1
Merge pull request #10099 from terry-xiaoyu/emq_x_to_emqx
chore: final EMQ X -> EMQX
2023-03-09 11:19:08 +08:00
Shawn 5d3946fe23 fix: add catch-all clauses in appups 2023-03-09 10:53:53 +08:00
Shawn 2e8d207558 chore: bump versions for apps 2023-03-09 09:06:41 +08:00
Shawn 12748ce0cf fix: update test cases for relup 2023-03-09 08:51:26 +08:00
Shawn 753f70bab8 chore: final EMQ X -> EMQX 2023-03-09 01:58:40 +08:00
William Yang 0983c2dd55 ci: docker-compose to docker compose 2023-03-08 18:05:23 +01:00
William Yang ddd08b782f docs: update changelogs. 2023-03-08 11:59:18 +01:00
William Yang 2cfec75652 fix: MQTT bridge verify wildcard certs 2023-03-08 11:56:13 +01:00
Xinyu Liu 27a1128e22
Merge pull request #10091 from terry-xiaoyu/some-small-fixes
Avoid replacing newlines with commas in log msg
2023-03-08 17:26:56 +08:00
Shawn 2c22b7d8e9 chore: update the change logs 2023-03-08 16:00:05 +08:00
Shawn 42288f6998 chore: bump version for emqx_dashboard 2023-03-08 14:56:01 +08:00
Shawn 53e04fc950 chore: update the emqx.appup.src 2023-03-08 14:40:38 +08:00
Shawn c06984d847 fix: avoid replacing newlines with commas in log msg 2023-03-08 14:31:54 +08:00
Xinyu Liu 9eb908f572
Merge pull request #10062 from terry-xiaoyu/emqx-telementry-timeout
fix: change timeout of gen_server:calls for emqx_telemetry to infinity
2023-03-03 14:37:00 +08:00
Shawn 8ecdc72920 fix: change timeout of gen_server:calls for emqx_telemetry to infinity 2023-03-03 13:57:59 +08:00
Shawn 230f2ee542 chore: release v4.4.15 2023-03-03 10:06:42 +08:00
Shawn 87994fc23f fix: update change logs 2023-03-02 16:06:08 +08:00
Shawn cee6786c3d chore: release v4.4.15-alpha.3 2023-02-28 22:24:26 +08:00
Shawn c2414fcf0c chore: update dashboard to v4.4.10 2023-02-28 22:23:38 +08:00
Xinyu Liu 576954adf0
Merge pull request #10039 from JimMoen/fix-file-leaking
Fix file leaking
2023-02-28 22:02:56 +08:00
Ivan Dyachkov b03557082f ci: use latest version of docker compose 2023-02-28 13:36:31 +01:00
JimMoen 3a735d8f5d
chore: bump app.src and appup.src. update changes.md 2023-02-28 19:25:52 +08:00
JimMoen 2d0d578b4f
fix: delete ssl dirs on resource destory 2023-02-28 18:41:47 +08:00
Zaiming (Stone) Shi a2ccc1307b
Merge pull request #10000 from lafirest/dist-ssl-changes
chore: update changes
2023-02-20 14:54:45 +01:00
firest c2d895da24 chore: update changes 2023-02-20 16:54:13 +08:00
lafirest c04a9d6951
Merge pull request #9981 from lafirest/fix/enable_tls_dist
chore: fix Erlang distribution over TLS
2023-02-17 17:40:25 +08:00
Shawn b0732cb0bb fix(test): flaky test cases emqx_mod_delayed_SUITE 2023-02-17 13:54:54 +08:00
firest 0decb6d328 chore: fix Erlang distribution over TLS 2023-02-16 17:46:37 +08:00
Shawn 26fecce3b3 chore: release e4.4.15-alpha.2 2023-02-15 22:29:52 +08:00
Xinyu Liu 2f95b8451b
Merge pull request #9970 from emqx/fix-raise-macro-in-rule-engine
fix: the _EXP_ON_FAIL_ was not called on throw
2023-02-15 16:18:51 +08:00
Shawn c84096c9c8 fix: the _EXP_ON_FAIL_ was not called on throw 2023-02-15 15:55:31 +08:00
Shawn bfa00a04dc fix: flacky testcases emqx_rule_monitor_SUITE 2023-02-15 11:51:12 +08:00
Shawn a353cbc87a chore: update dashboard to v4.4.9 2023-02-14 10:17:37 +08:00
Xinyu Liu 6ab784a1ee
Merge pull request #9964 from emqx/release-v44-alpha.1
chore: release v4.4.15-alpha.1
2023-02-13 22:45:31 +08:00
Shawn 764e68ce9b chore: release v4.4.15-alpha.1 2023-02-13 21:42:40 +08:00
Xinyu Liu 01cef41fa1
Merge pull request #9963 from terry-xiaoyu/keep-sync-with-e44
chore: update change logs
2023-02-13 21:10:01 +08:00
Shawn 4f302fc22e chore: update change logs 2023-02-13 21:08:59 +08:00
Xinyu Liu a2c350ccea
Merge pull request #9959 from terry-xiaoyu/keep-sync-with-e44
fix: keep v4.4 files sync with e4.4
2023-02-13 15:34:15 +08:00
Shawn db60ce01d8 chore: update emqx_modules.appup.src 2023-02-13 13:40:53 +08:00
Shawn 05d14119fa fix: keep v4.4 files sync with e4.4 2023-02-13 13:08:22 +08:00
Xinyu Liu f0b288ed3a
Merge pull request #9707 from kjellwinblad/kjell/mongodb_upgrade_in_4.4
feat: upgrade mongodb-erlang library to support 5.1+
2023-02-13 11:46:23 +08:00
Xinyu Liu 99d46bd1ce
Merge branch 'main-v4.4' into kjell/mongodb_upgrade_in_4.4 2023-02-13 11:45:56 +08:00
Erik Timan dc97ac7fe2
Merge pull request #9929 from olcai/add-live-connections-to-prometheus
feat(emqx_prometheus): expose live_connections stats to prometheus
2023-02-10 10:45:20 +01:00
Erik Timan 3d41e58d80 chore: update changes 2023-02-09 17:21:12 +01:00
Erik Timan 8f4e390840 chore: bump VSN and appup 2023-02-09 17:20:31 +01:00
Erik Timan c4c2f570ff feat(emqx_prometheus): expose live_connections stats to prometheus 2023-02-09 17:20:31 +01:00
Xinyu Liu df3c114938
Merge pull request #9943 from lafirest/fix/more_logs
fix(auth): add more detailed logs for auth/acl
2023-02-09 18:41:50 +08:00
firest 6129d1dd4f chore: update changes 2023-02-09 15:16:11 +08:00
firest a6c6ae6206 chore: bump versions && update appup 2023-02-09 15:16:06 +08:00
firest 3314d9616d fix(auth): add more detailed logs for auth/acl 2023-02-09 14:08:42 +08:00
Xinyu Liu a4bada457b
Merge pull request #9942 from emqx/http-api-publish-crash
Http api publish crash
2023-02-09 13:55:12 +08:00
Shawn 56156aa097 fix: update change logs 2023-02-09 13:54:32 +08:00
zhongwencool 6f5e6e7f9b
Merge pull request #9933 from zhongwencool/keepalive-undefined
fix: don't crash when connecting via keepalive=0
2023-02-08 20:06:38 +08:00
Shawn 8c478fd7f3 chore: update emqx_rule_engine.appup.src 2023-02-08 18:46:49 +08:00
Shawn 04cae4ef60 fix: republish MQTT msgs with properties crash 2023-02-08 18:44:46 +08:00
zhongwencool 0ed4a2fa49 chore: add keepalive changelog 2023-02-08 17:28:26 +08:00
zhongwencool c8d4ebfc45 fix: don't crash when connecting via keepalive=0 2023-02-08 17:09:11 +08:00
Xinyu Liu efc409bdd6
Merge pull request #9931 from terry-xiaoyu/fix-typos-in-action-descriptions
Fix typos in action descriptions
2023-02-08 16:35:01 +08:00
Shawn 1ea3fdf0e6 chore: update change logs 2023-02-08 15:42:53 +08:00
Shawn 1140026c15 chore: update emqx_modules.appup.src 2023-02-08 15:35:29 +08:00
Shawn 82c2ea980d fix: change EMQ X -> EMQX 2023-02-08 15:04:57 +08:00
Shawn 231f591dd8 fix: print warning logs when request JWKS server failed 2023-02-08 15:00:53 +08:00
Shawn 2528eb07b5 chore: bump emqx_bridge_mqtt to 4.3.8 2023-02-08 13:50:19 +08:00
Shawn f7e6783402 fix: typos in some rule-action's descriptions 2023-02-08 13:49:35 +08:00
Zaiming (Stone) Shi a04cfbab9b
Merge pull request #9928 from emqx/0207-fix-version-get-crash
fix(emqx_vm): OTP vsn from system_info when not able to locate BUILT_ON
2023-02-07 16:44:09 +01:00
lafirest 8e6ccd14a7
Merge pull request #9904 from lafirest/feat/kick_when_banned
feat(banned): session will be kicked when client is banned by `clientid`
2023-02-07 18:52:24 +08:00
Zaiming (Stone) Shi 2cbc7a6b8f fix(emqx_vm): OTP vsn from system_info when not able to locate BUILT_ON 2023-02-07 10:53:25 +01:00
Xinyu Liu de19d6f4e4
Merge pull request #9926 from terry-xiaoyu/http-api-cluter-query-in-fixed-order
fix(http-api): using a fixed order when cluster query nodes
2023-02-07 17:39:54 +08:00
Shawn b9a80903e3 fix: update change logs 2023-02-07 17:18:41 +08:00
Shawn 5b518eedb8 fix(http-api): using a fixed order when cluster query nodes 2023-02-07 17:16:04 +08:00
Xinyu Liu 90d6e16707
Merge pull request #9919 from terry-xiaoyu/fix-application-stop-order
fix: the application stop order is wrong after ekka:join/1
2023-02-07 17:14:49 +08:00
Shawn a75e8b93c0 chore: update src/emqx.appup.src 2023-02-07 10:26:53 +08:00
Shawn 79c8b69e36 chore: add change logs 2023-02-07 10:26:53 +08:00
Shawn 1f4869fba3 fix: the application stop order is wrong after ekka:join/1 2023-02-07 10:26:45 +08:00
Shawn 0c66f2fec3 fix: update replayq to 0.3.5 2023-02-06 14:50:06 +08:00
Xinyu Liu a1911f3ee0
Merge pull request #9911 from terry-xiaoyu/add_retriers_for_rules-v4.4
Add retriers for rules v4.4
2023-02-06 12:11:46 +08:00
Shawn e1418cd038 fix: typos in change logs 2023-02-06 10:51:42 +08:00
Shawn 73c6275788 chore: update emqx_rule_engine.appup.src 2023-02-04 12:53:29 +08:00
Shawn 5f0d570ab9 chore: udpate change logs 2023-02-04 12:49:09 +08:00
Shawn c22e2a0d18 fix: add retry for rules 2023-02-04 12:48:12 +08:00
Shawn 6a7b0bd1f8 fix: update cowboy to 2.9.1 2023-02-04 11:36:19 +08:00
firest 9140f50456 chore: update changes 2023-02-03 15:36:25 +08:00
firest d4df2ddf25 feat(banned): session will be kicked when client is banned by `clientid` 2023-02-03 15:32:42 +08:00
lafirest b73756e4cf
Merge pull request #9868 from lafirest/fix/exclusive-unsub-v4.4
fix: the exclusive topics aren't removed when the session has already been cleaned
2023-02-01 18:50:09 +08:00
firest e051df440a chore: bump version && update changes 2023-02-01 17:24:00 +08:00
firest 3973fff23f fix: the exclusive topics aren't removed when the session has already been cleaned 2023-02-01 17:23:53 +08:00
JianBo He 26cec4be69
Merge pull request #9869 from HJianBo/upgrade-gen-coap-44
Upgrade gen coap to v0.4.3
2023-01-31 18:29:21 +08:00
Stefan Strigler 6e66d52d31
Merge pull request #9803 from sstrigler/main-v4.4
feat: support HAProxy protocol for mgmt API
2023-01-31 10:31:56 +01:00
JianBo He cbdd648df1 chore: update changes 2023-01-31 15:22:59 +08:00
JianBo He c3e1c8a054 chore(coap): update gen_coap to v0.4.3 2023-01-31 15:16:35 +08:00
Xinyu Liu e127814785
Merge pull request #9863 from terry-xiaoyu/fix-log-format-raw-binary
chore: improve the log format when printing raw binary
2023-01-31 08:55:23 +08:00
Shawn 5e111e44d7 chore: improve the log format when printing raw binary 2023-01-31 08:54:50 +08:00
Zaiming (Stone) Shi 7c476fd80b
Merge pull request #9790 from lafirest/feat/banned_with_delayed
feat: improve the integration of the banned and the delayed/retain feature
2023-01-30 16:40:03 +01:00
Xinyu Liu c6b92e3708
Merge pull request #9862 from terry-xiaoyu/restart-oracle-reosurce-when-relup
fix: restart oracle resources at relup
2023-01-30 15:13:01 +08:00
Shawn e459180015 fix: restart oracle resources at relup 2023-01-30 14:53:20 +08:00
firest 2b647e112b chore: update changes 2023-01-30 10:25:00 +08:00
firest 482952e951 chore: bump app version 2023-01-30 10:24:52 +08:00
firest 7fd7cfc665 feat: filter out messages which the source client is banned when delivering the retained message 2023-01-29 20:26:11 +08:00
firest 9d6efeaea8 feat: improve the integration of the `banned` and the `delayed` feature 2023-01-29 20:26:11 +08:00
Xinyu Liu ae4b4f9e60
Merge pull request #9858 from terry-xiaoyu/fix-log-msg-format
fix: log format of printing MQTT packets
2023-01-29 14:21:02 +08:00
Shawn 7eea1252cb chore: update the change logs 2023-01-29 14:13:32 +08:00
Shawn 763dac0490 fix: log format of printing MQTT packets 2023-01-29 13:45:59 +08:00
Ivan Dyachkov c86d921a77
Merge pull request #9831 from id/ci-build-ubuntu22.04-packages-v4.4
ci: build ubuntu 22.04 packages
2023-01-26 14:28:30 +01:00
Ivan Dyachkov d111a64672 chore: update changelog 2023-01-25 15:31:44 +01:00
Ivan Dyachkov 87cd40acca chore: skip relup on ubuntu22.04 for earlier versions 2023-01-25 15:26:25 +01:00
Rory 9001a6e106
Merge pull request #9812 from Rory-Z/main-v4.4
feat(helm): user can define service account by userself
2023-01-24 11:02:27 +08:00
Ivan Dyachkov 91903ef869 ci: build ubuntu 22.04 packages 2023-01-23 13:34:21 +01:00
Stefan Strigler 1d83f640fc chore: add changelog 2023-01-19 14:45:57 +01:00
Stefan Strigler 2b407cf0fa feat: support HAProxy protocol for mgmt API 2023-01-19 13:24:33 +01:00
Xinyu Liu 5078cadb7d
Merge pull request #9810 from terry-xiaoyu/update-esockd-v4.4
chore: update esockd to 5.8.8
2023-01-19 17:19:20 +08:00
Rory Z ae4745ffd7 feat(helm): user can define service account by userself 2023-01-19 15:54:06 +08:00
Shawn c072edc3aa chore: update the change logs for #9810 2023-01-19 10:12:10 +08:00
Shawn c3e494c735 chore: update esockd to 5.8.8 2023-01-19 10:02:46 +08:00
Ivan Dyachkov aeaf6ada2c
Merge pull request #9775 from id/chore-update-codeowners
chore: update codeowners
2023-01-18 09:37:44 +01:00
Xinyu Liu 6477f9f7eb
Merge pull request #9772 from terry-xiaoyu/update-mysql-v4.4
chore: update mysql-otp to 1.7.2
2023-01-17 13:38:29 +08:00
Xinyu Liu e36bc8c2db
Merge pull request #9766 from terry-xiaoyu/update_ehttpc
chore: update ehttpc to 0.4.4
2023-01-16 17:54:17 +08:00
Ivan Dyachkov fc6052fe8d chore: update codeowners
- set @emqx/emqx-review-board as default reviewer
- move default to the top according to specification
- remove @zmstone as reviewer for lib-extra
2023-01-16 10:44:12 +01:00
Shawn e8abaf6a24 chore: update mysql-otp to 1.7.2 2023-01-16 16:35:08 +08:00
Shawn e8ceb37911 chore: update ehttpc to 0.4.4 2023-01-16 12:24:04 +08:00
Thales Macedo Garitezi cac3f44cdc
Merge pull request #9744 from thalesmg/test-crl-revoke-then-refresh-v44
test(crl): add test case for revoke-then-refresh (v4.4)
2023-01-13 18:14:55 -03:00
JimMoen eb13c316cd
Merge pull request #9731 from JimMoen/0112-fix-test-env
test: fix a disturbed test environment `$mqtt_sub_caps`
2023-01-13 03:41:41 +08:00
Thales Macedo Garitezi f08aa9f5f5 test(crl): add test case for revoke-then-refresh (v4.4)
Investigation for https://github.com/emqx/emqx/issues/9732.

Apparently, there is no problem if a CRL is cached without
revocations, a client cert is revoked, and later the CRL is refreshed.
The test case indicates that the same client can at first connect to
the server and later is denied connection because the CRL was
refreshed.

Also, we take the opportunity in this PR to refresh the test
certificate and CRL files which would expire in June 2023.
2023-01-12 11:12:22 -03:00
JimMoen 7b76982be9
test: fix a disturbed test environment `$mqtt_sub_caps` 2023-01-12 11:12:49 +08:00
Kjell Winblad 6d63931353 feat: upgrade mongodb-erlang library to support 5.1+ 2023-01-09 18:02:44 +01:00
Zaiming (Stone) Shi 002a3a4e75
Merge pull request #9694 from thalesmg/test-fix-hanging-conf-suite-v44
test: fix hang when calling `ct_slave:stop` on a `slave` started node
2023-01-09 16:46:23 +01:00
zhongwencool 7c2cd562b9
Merge pull request #9701 from zmstone/0108-bump-app-vsn-emqx_rule_engine
chore: bump app vsn to 4.4.15 for emqx_rule_engine
2023-01-09 10:07:04 +08:00
Zaiming (Stone) Shi ab8521c92c chore: bump app vsn to 4.4.15 for emqx_rule_engine 2023-01-08 10:43:37 +01:00
Zaiming (Stone) Shi 80a1c43a19
Merge pull request #9698 from thalesmg/sync-v4414-into-v44
Sync `v4.4.14` into `v44`
2023-01-08 10:28:18 +01:00
Thales Macedo Garitezi d6e0ecddbc chore: update appups 2023-01-06 13:59:25 -03:00
Thales Macedo Garitezi 53ab67285a Merge tag 'v4.4.14' into sync-v4414-into-v44 2023-01-06 13:34:34 -03:00
zhongwencool 5e6d058a7e
Merge pull request #9696 from zhongwencool/dashboard-password-validate-v44
fix: update dashboard password validator
2023-01-06 18:44:13 +08:00
zhongwencool 5e717bb316 fix: update dashboard password validator 2023-01-06 17:31:02 +08:00
zhongwencool 1f49bc9c59
Merge pull request #9692 from thalesmg/sync-e4413-ce-changes-rv44
chore: sync ee changes back into ce repo (re44)
2023-01-06 16:17:07 +08:00
Thales Macedo Garitezi 4b8d4b3583 test: fix hang when calling `ct_slave:stop` on a `slave` started node
Some tests use the `slave` module for better readability.  But, when
shutting those nodes down, if one uses `ct_slave` on them, they will
hang.  This'll make CT wait until the timetrap (default 30 min) before
failing `end_per_testcase`.
2023-01-05 15:51:54 -03:00
Thales Macedo Garitezi f6bdd1ffec chore: prepare for v4.4.14 release 2023-01-05 14:09:07 -03:00
Thales Macedo Garitezi 822a510873 chore: sync ee changes back into ce repo 2023-01-05 13:41:13 -03:00
Zaiming (Stone) Shi 1d745d2bc3
Merge pull request #9659 from zmstone/0102-update-copyright-year
0102 update copyright year
2023-01-02 20:14:29 +01:00
Zaiming (Stone) Shi 19103a4dfb chore: re-generate emqx.appup.src 2023-01-02 18:56:30 +01:00
Zaiming (Stone) Shi 7ae159af8f chore: bump emqx_exproto app vsn 2023-01-02 14:56:29 +01:00
Zaiming (Stone) Shi 14ba75502f chore: update copyright year 2023-01-02 14:54:38 +01:00
Zaiming (Stone) Shi ceb696fe15 chore: ignore comments in git diff 2023-01-02 14:54:37 +01:00
Zaiming (Stone) Shi 69af8cdf54
Merge pull request #9652 from zmstone/1230-sync-release-v44-to-main-v4.4
1230 sync release v44 to main v4.4
2023-01-02 14:54:05 +01:00
Zaiming (Stone) Shi 1ed6dd517d Merge remote-tracking branch 'origin/main-v4.4' into 1230-sync-release-v44-to-main-v4.4 2022-12-30 22:50:33 +01:00
Zaiming (Stone) Shi bb02fe1e24
Merge pull request #9648 from zmstone/1129-always-add-qlc-modules-to-appup
build: skip qlc modules if there were no git diff
2022-12-30 22:49:27 +01:00
Zaiming (Stone) Shi f91a0384f7 build: skip qlc modules if there were no git diff 2022-12-30 22:20:29 +01:00
Zaiming (Stone) Shi ad91eca0e5 chore: generate appup 2022-12-30 20:45:55 +01:00
Zaiming (Stone) Shi e88feb5096 chore: bump app vsn for emqx_rule_engine 2022-12-30 20:21:48 +01:00
Zaiming (Stone) Shi ccd68eeb5b chore: prepare for 4.4.14 2022-12-30 20:07:51 +01:00
Zaiming (Stone) Shi 371e7c1aae docs: update change logs 2022-12-30 19:55:55 +01:00
Zaiming (Stone) Shi 875df2b7ea Merge remote-tracking branch 'origin/release-v44' into main-v4.4 2022-12-30 19:55:26 +01:00
Zaiming (Stone) Shi dbbc41c112 chore: rename v4.4.13 to v4.4.14 2022-12-30 19:52:50 +01:00
Zaiming (Stone) Shi eec9833828
Merge pull request #9649 from zmstone/1230-fix-merge-conflict-resolution
ci: fix bad merge conflict resolution
2022-12-30 19:39:17 +01:00
Zaiming (Stone) Shi 00412149f3
Merge pull request #9650 from thalesmg/fix-gcp-pubsub-leak-rv44
fix(gcp_pubsub): ensure jwt token is deleted after worker stops and always ensure refresh timer (rv4.4)
2022-12-30 17:06:35 +01:00
Thales Macedo Garitezi bc654ddf3a chore: bump release -> v4.4.13 2022-12-30 11:51:32 -03:00
Thales Macedo Garitezi 05070f416d docs: update changelog 2022-12-30 10:24:49 -03:00
Thales Macedo Garitezi ea209585b5 fix(jwt_sup): delete the worker spec from the supervision tree 2022-12-30 10:24:41 -03:00
Thales Macedo Garitezi 823efbaed3 fix(gcp_pubsub): ensure jwt token is deleted after worker stops and always ensure refresh timer (v4.4)
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-30 10:24:26 -03:00
Zaiming (Stone) Shi 18b18ade45 ci: fix bad merge conflict resolution 2022-12-30 14:01:05 +01:00
Thales Macedo Garitezi c092ac2ced
Merge pull request #9640 from thalesmg/fix-gcp-pubsub-refresh-leak-v44
fix(gcp_pubsub): ensure jwt token is deleted after worker stops and always ensure refresh timer (v4.4)
2022-12-30 09:44:21 -03:00
Thales Macedo Garitezi 93fc8ff1e5
docs: improve changelog
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-12-29 16:45:59 -03:00
Thales Macedo Garitezi abcc6263bb docs: update changelog 2022-12-29 13:08:10 -03:00
Thales Macedo Garitezi d345ccf4b8 chore: update appups 2022-12-29 11:45:45 -03:00
Thales Macedo Garitezi 7f8c5dcf01 fix(jwt_sup): delete the worker spec from the supervision tree 2022-12-29 11:33:07 -03:00
Thales Macedo Garitezi 56b1df1c7f fix(gcp_pubsub): ensure jwt token is deleted after worker stops and always ensure refresh timer (v4.4)
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 11:33:06 -03:00
Zaiming (Stone) Shi 23c786b18a
Merge pull request #9639 from zmstone/1229-sync-release-v44-to-main-v4.4
1229 sync release v44 to main v4.4
2022-12-29 15:31:38 +01:00
Zaiming (Stone) Shi facc810941 chore: add emqx_cm to appup 2022-12-29 14:32:25 +01:00
Zaiming (Stone) Shi d8f900dd07 chore: add relup path 2022-12-29 13:51:50 +01:00
Zaiming (Stone) Shi 0419c9b17e chore: update appups 2022-12-29 12:09:06 +01:00
Zaiming (Stone) Shi ece2b7f6bc chore: bump emqx_dashboard app vsn to 4.4.12 2022-12-29 11:24:53 +01:00
Zaiming (Stone) Shi 4251948435 chore: bump emqx.app.src vsn to 4.4.13 2022-12-29 11:24:11 +01:00
Zaiming (Stone) Shi cf6bf2a2fe chore: prepare for v4.4.13-alpha.1 release 2022-12-29 11:22:38 +01:00
Zaiming (Stone) Shi 1f9b2a7e69 Merge remote-tracking branch 'origin/release-v44' into main-v4.4 2022-12-29 11:21:26 +01:00
Zaiming (Stone) Shi ba46be717b build: drop relup for edge edition
* the edge edition is completely dropped in v5
* typically reboot is acceptable for edge brokers
* we do not know how many users are using it
* we never really seriously tested relup for edge edition
* now there is an issue in relup which will fail edge edition
  not worth the investment to fix
2022-12-28 21:39:35 +01:00
Zaiming (Stone) Shi 275a3b47fd chore: bump version to v4.4.12 2022-12-28 18:31:08 +01:00
Zaiming (Stone) Shi 953a230abb
Merge pull request #9627 from emqx/1228-sync-changes-from-ee-to-ce
1228 sync changes from ee to ce
2022-12-28 18:29:05 +01:00
Zaiming (Stone) Shi ebc38b3b0e chore: sync emqx_channel from ee to ce 2022-12-28 16:11:15 +01:00
Zaiming (Stone) Shi 364fd8d4f3 docs: sync some changes from ee to ce 2022-12-28 14:41:06 +01:00
Zaiming (Stone) Shi 2662c52a88 chore: sync test/emqx_client_SUITE.erl from ee to ce 2022-12-28 14:37:23 +01:00
Zaiming (Stone) Shi 79f51e46a4 chore: sync emqx_cm from ee to ce 2022-12-28 14:30:42 +01:00
Zaiming (Stone) Shi 614d740f71 chore: sync changes in emqx_relup from ee to ce 2022-12-28 14:28:50 +01:00
Zaiming (Stone) Shi f033b1389e chore: pin snabbkaffe 1.0.3 2022-12-28 14:18:28 +01:00
Zaiming (Stone) Shi d1f2fb16ab chore: pin mongodb v3.0.17 2022-12-28 14:17:32 +01:00
JimMoen 1cd5f7c5bf
Merge pull request #9517 from JimMoen/1209-bump-mongo-vsn-v44
chroe: bump mongodb-erlang vsn
2022-12-28 13:52:21 +08:00
JimMoen b3708f49e4
chore: bump mongodb-erlang vsn 2022-12-27 19:05:48 +08:00
Thales Macedo Garitezi ea93033aff
Merge pull request #9611 from thalesmg/fix-upgrade-unpacked-v44
fix(upgrade): fix start script existence check (v4.4)
2022-12-26 09:13:24 -03:00
Xinyu Liu f557347871
Merge pull request #9613 from emqx/sometimes-alarm-resource-down-not-cleared-v44
chore: sometimes the alarm resource down cannot be cleared
2022-12-26 15:00:28 +08:00
Shawn f2bb0a364b chore: sometimes the alarm resource down cannot be cleared 2022-12-26 12:13:19 +08:00
Thales Macedo Garitezi 1d59e18cca fix(upgrade): fix start script existence check (v4.4) 2022-12-23 17:49:02 -03:00
Ivan Dyachkov af57b2c139
Merge pull request #9602 from emqx/ci-fix-self-hosted-macos-runners
ci fix self hosted macos runners
2022-12-22 17:09:31 +01:00
Ivan Dyachkov 6a10e84ecb chore: use unique name for temp macos keychain 2022-12-22 14:48:56 +01:00
Ivan Dyachkov d8590197bd ci: issue with linking unixodbc when building OTP on macos arm64 2022-12-22 14:46:56 +01:00
Zaiming (Stone) Shi 43e77391db
Merge pull request #9591 from zmstone/1221-sync-release-v44-to-main-v4.4
1221 sync release v44 to main v4.4
2022-12-22 13:49:00 +01:00
Zaiming (Stone) Shi 351b1ce1a1 test: restore boot_modules to all in all SUITEs which change it 2022-12-22 12:03:03 +01:00
Zaiming (Stone) Shi 2f23f2708e test: ensure all listeners started 2022-12-22 11:57:31 +01:00
Zaiming (Stone) Shi 44b9ad24fd Merge remote-tracking branch 'origin/release-v44' into 1221-sync-release-v44-to-main-v4.4 2022-12-22 11:53:03 +01:00
Zaiming (Stone) Shi 1af768f75a
Merge pull request #9598 from emqx/ci-stability-fixes-test-ci
ci stability fixes test ci
2022-12-22 11:51:14 +01:00
Ivan Dyachkov a2063a1445 ci: move mandatory inputs up 2022-12-22 11:06:55 +01:00
Ivan Dyachkov 9e0a130a89 ci: use our own fork of setup-beam 2022-12-22 10:48:48 +01:00
Ivan Dyachkov 1b27828e3e ci: make homebrew more conservative 2022-12-22 10:44:51 +01:00
Zaiming (Stone) Shi f7e4f45b6c Merge remote-tracking branch 'origin/release-v44' into 1221-sync-release-v44-to-main-v4.4 2022-12-22 10:23:19 +01:00
Zaiming (Stone) Shi 552cabe792
Merge pull request #9594 from id/ci-consistent-syntax-for-variables-in-if-statements
ci: use consistent syntax for variables in if statements
2022-12-22 10:20:13 +01:00
Ivan Dyachkov 8a393030cf docs: fix typo 2022-12-22 09:47:26 +01:00
Ivan Dyachkov 836892211e ci: use consistent syntax for variables in if statements 2022-12-22 09:44:45 +01:00
Zaiming (Stone) Shi 1421040ecf Merge remote-tracking branch 'origin/main-v4.4' into 1221-sync-release-v44-to-main-v4.4 2022-12-22 09:33:08 +01:00
Zaiming (Stone) Shi d855fb3734
Merge pull request #9592 from zmstone/1221-fix-io-format-error-when-rpc-from-remsh
1221 fix io format error when rpc from remsh
2022-12-22 09:28:56 +01:00
Zaiming (Stone) Shi d891197256 feat: add emqx_misc:safe_io_device/0 2022-12-21 19:59:34 +01:00
Zaiming (Stone) Shi 475e4457f8 test: support starting enterprise in docker 2022-12-21 19:59:34 +01:00
Zaiming (Stone) Shi 50c5c5d8ff Merge remote-tracking branch 'origin/release-v44' into main-v4.4 2022-12-21 19:56:59 +01:00
Ivan Dyachkov 4ae7a1631c
Merge pull request #9529 from emqx/av/4.4-update-git-actions-versions
chore(actions): v4.4 update git actions versions
2022-12-20 16:58:38 +01:00
Ivan Dyachkov f3469ab77c
Merge pull request #9574 from id/chore-fail-build-if-apple-notarization-failed
chore: fail build if apple notarytool failed
2022-12-19 13:45:33 +01:00
Ivan Dyachkov c776afd86a ci: backport patch for otp setup on self hosted macos from master 2022-12-19 12:46:01 +01:00
Zaiming (Stone) Shi 8a9f6a5494
Merge pull request #9565 from zmstone/1215-add-covertool
feat(cover): add covertool
2022-12-19 12:01:28 +01:00
Ivan Dyachkov 30b1c5f26d chore: fail build if apple notarytool failed 2022-12-19 09:49:28 +01:00
Zaiming (Stone) Shi 13b14aafa5 fix(emqx_cover): wait for DOWN message before new spawn 2022-12-19 09:23:05 +01:00
Ivan Dyachkov afbb4580ae
Merge pull request #9558 from id/ci-build-macos-arm64-packages
ci: build macos arm64 packages
2022-12-19 09:19:34 +01:00
Zaiming (Stone) Shi 22c27cb45f feat(cover): add covertool 2022-12-18 12:23:47 +01:00
Zaiming (Stone) Shi 4bc333812f chore: bump version to v4.4.12-alpha.2 2022-12-16 11:06:14 +01:00
Zaiming (Stone) Shi e8c2a3c8f5
Merge pull request #9566 from zmstone/1216-fix-ci
1216 fix ci
2022-12-16 11:04:45 +01:00
Zaiming (Stone) Shi 3698150fc5 ci: use alternatives for python2 python3 switch 2022-12-16 11:01:00 +01:00
Zaiming (Stone) Shi be20082ce5 ci: revert of docker/setup-qemu-action@v3 back to v2 2022-12-16 10:50:38 +01:00
Ivan Dyachkov 40f4d326a0 ci: build macos arm64 packages 2022-12-16 08:55:49 +01:00
Zaiming (Stone) Shi 4dc4e0039e docs: fix change logs 2022-12-15 18:01:42 +01:00
Zaiming (Stone) Shi 682f917d6d docs: add change log for adding amazon linux 2 2022-12-15 17:57:53 +01:00
Ivan Dyachkov 4c5d66ba6b
Merge pull request #9544 from id/build-fix-amzn2-relup
build: fix relup on amzn2
2022-12-14 16:40:49 +01:00
Ivan Dyachkov f1a55bc052 build: fix relup on amzn2 2022-12-14 14:58:52 +01:00
Xinyu Liu 81560381c8
Merge pull request #9539 from terry-xiaoyu/protect_rule_and_resource_crud_apis-v44
Protect rule and resource crud apis v44
2022-12-14 16:00:15 +08:00
Zaiming (Stone) Shi 7221909726
Merge pull request #9498 from id/ci-4.4-build-amzn2-packages
ci: build amzn2 packages
2022-12-14 08:44:27 +01:00
Ivan Dyachkov 97e4929abb ci: build amzn2 packages
also upgrade emqx-builder to 4.4-23
2022-12-14 08:35:15 +01:00
Shawn 920a9fd455 chore: update the change logs 2022-12-14 13:57:11 +08:00
Shawn 7c420b39de chore: update emqx_rule_engine.appup.src 2022-12-14 13:52:41 +08:00
Shawn 781c8949b3 fix: tmp probing resources are not removed after testing resources 2022-12-14 13:52:24 +08:00
Rory 4760d8715e
Merge pull request #9527 from Rory-Z/chore/helm-support-externalTrafficPolicy
chore: helm chart support externalTrafficPolicy
2022-12-12 19:17:41 +08:00
Traphalet 2d4ef5bfa3 chore(actions): v4.4 update git actions versions 2022-12-12 11:11:48 +02:00
Rory Z af789b26d3 chore: helm chart support externalTrafficPolicy
Fix https://github.com/emqx/emqx/issues/9515
2022-12-12 16:51:27 +08:00
Rory fa8dceef02
Merge pull request #9504 from Rory-Z/chore/fix-helm-value
fix(helm): fix helm value explain error
2022-12-12 16:25:06 +08:00
Rory Z fe26c6fa40 fix(helm): fix helm value explain error
Fixed EMQX Helm Chart can not set JSON type value for EMQX configuration items
2022-12-12 15:41:54 +08:00
Rory e0d4792a53
Merge pull request #9508 from Rory-Z/chore/fix-helm-secret
fix(helm): chart using incorrect secret values with custom credentials
2022-12-12 15:34:59 +08:00
Rory Z 193f2ab7bd fix(helm): chart using incorrect secret values with custom credentials 2022-12-12 14:13:31 +08:00
Zaiming (Stone) Shi 6cb23c7cbc
Merge pull request #9521 from zmstone/1209-sync-changes-from-ee-back-to-c
chore: sync changes from ee to ce
2022-12-09 15:34:58 +01:00
Zaiming (Stone) Shi c5bbac0a23 chore: restore apps/emqx_retainer/src/emqx_retainer_sup.erl
this file, ce should be copied to ee, not the other way around
2022-12-09 14:44:53 +01:00
Zaiming (Stone) Shi f818a78d29 chore: update appup 2022-12-09 14:41:30 +01:00
Zaiming (Stone) Shi 0c3de088cb chore: sync changes from ee to ce 2022-12-09 13:58:07 +01:00
lafirest e3ed682e8d
Merge pull request #9493 from lafirest/fix/psk_v4.4
fix(psk): add more PSK ciphers support
2022-12-09 16:10:51 +08:00
firest a01301a985 test(psk): add new ciphers into test case 2022-12-09 15:21:40 +08:00
firest 04e544a01d chore: update changes 2022-12-09 15:21:34 +08:00
firest 6d8dd430fd fix(psk): add more PSK ciphers support 2022-12-09 15:20:50 +08:00
zhongwencool 925787bc59
Merge pull request #9475 from zhongwencool/dashboard-password-validate
fix: add dashboard password validation
2022-12-09 11:17:35 +08:00
zhongwencool 7806a1d7d3 fix: missing emqx_misc in emqx appup 4.4.11 2022-12-09 10:24:34 +08:00
zhongwencool be9870787c fix: add dashboard password validation 2022-12-09 10:15:09 +08:00
Thales Macedo Garitezi 623283c077
Merge pull request #9499 from thalesmg/fix-flaky-test-v44
test(flaky): fix flaky test
2022-12-07 13:12:55 -03:00
Thales Macedo Garitezi 8d20c5a00c test(flaky): fix flaky test
```
%%% emqx_crl_cache_SUITE ==> t_empty_cache: FAILED
%%% emqx_crl_cache_SUITE ==> {{badmatch,{error,econnrefused}},
 [{emqx_crl_cache_SUITE,t_empty_cache,1,
                        [{file,"/home/thales/dev/emqx/emqx2/test/emqx_crl_cache_SUITE.erl"},
                         {line,450}]},
  {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
  {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1292}]},
  {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1224}]}]}
```
2022-12-07 11:32:54 -03:00
Xinyu Liu a54f88a1ad
Merge pull request #9486 from JimMoen/fix-message-dropped-event-v44
Fix message dropped event v44
2022-12-07 18:00:29 +08:00
JimMoen 97bfe359d1
chore: fix typo 2022-12-07 16:01:33 +08:00
JimMoen fe0f2bc4e7
test(session): ensure 'message.dropped' hook ran with named reason 2022-12-07 16:01:33 +08:00
JimMoen 458101958b
fix: run `message.dropped` hook, inc `messages.dropped` metrics
- when awaiting_rel full
- packet identifier in use (QoS2 packet resend)
2022-12-07 12:46:32 +08:00
Zaiming (Stone) Shi c021443f6e
Merge pull request #9483 from JimMoen/fix-pic-link-v44
chore: fix README.md(s) picture link
2022-12-06 18:51:25 +01:00
JimMoen eb3726f307
chore: fix README.md(s) picture link 2022-12-07 01:48:46 +08:00
Thales Macedo Garitezi 8ad9e7a008
Merge pull request #9471 from thalesmg/check-unpack-target-v44
fix(install_upgrade): check target version when unpacking (v4.4)
2022-12-06 13:09:34 -03:00
zhongwencool 78ce1ff1b9
Merge pull request #9474 from zhongwencool/bootstrap-apps
fix: load bootstrap file when no bootstrap user
2022-12-06 09:45:10 +08:00
zhongwencool c20b597e12 chore: replace match_object with select/4 2022-12-05 17:00:38 +08:00
zhongwencool a7079b8c0e test: fix rule_engine SUITE failed 2022-12-05 09:40:36 +08:00
zhongwencool 9f129a300a fix: load bootstrap file when no bootstrap user 2022-12-04 16:55:48 +08:00
Thales Macedo Garitezi bf40ee577b fix(install_upgrade): check target version when unpacking (v4.4)
We already have a check to avoid upgrading between minor versions,
such as 4.3 <-> 4.4 (and 4.4 <-> 4.5):

```
  Cannot upgrade/downgrade to 4.4.11-rc.3 from 4.3.17
  We only support relup between patch versions
  escript: exception error: {relup_not_allowed,unsupported_target_version}
    in function  install_upgrade_escript__escript__1670__7364__537878__24:validate_target_version/2 (/usr/lib/emqx/bin/install_upgrade.escript, line 444)
    in call from install_upgrade_escript__escript__1670__7364__537878__24:install/2 (/usr/lib/emqx/bin/install_upgrade.escript, line 58)
    in call from escript:run/2 (escript.erl, line 758)
    in call from escript:start/1 (escript.erl, line 277)
    in call from init:start_em/1
    in call from init:do_boot/3
```

But such check is missing for `unpack`, which may result in an
unusable node after just unpacking:

```
emqx@d70cfe0e8e62:~$ emqx ctl status
ERROR: node_is_not_running!
```

The issue apparently arises from `nodetool` trying to use the
`compiler` lib from the newer version rather than the old one:

```
  + ERL_FLAGS=' -start_epmd false -epmd_module ekka_epmd -proto_dist ekka'
  + /usr/lib/emqx/erts-11.2.2.8/bin/escript /usr/lib/emqx/bin/nodetool -name emqx@127.0.0.1 -setcookie emqxsecretcookie ping
  + die 'node_is_not_running!' 1
  + set +x
  ERROR: node_is_not_running!

  emqx@d70cfe0e8e62:~$ /usr/lib/emqx/erts-11.2.2.8/bin/escript /usr/lib/emqx/bin/nodetool -name emqx@127.0.0.1 -setcookie emqxsecretcookie ping
  escript: Internal error: undef
  =ERROR REPORT==== 2-Dec-2022::19:02:39.150274 ===
  Loading of /usr/lib/emqx/lib/compiler-8.1.1/ebin/compile.beam failed: badfile

  =ERROR REPORT==== 2-Dec-2022::19:02:39.150271 ===
  beam/beam_load.c(1879): Error loading module compile:
    This BEAM file was compiled for a later version of the run-time system than 23.
    To fix this, please recompile this module with an 23 compiler.
    (Use of opcode 176; this emulator supports only up to 170.)
```
2022-12-02 16:36:06 -03:00
Zaiming (Stone) Shi aecf5d12ed
Merge pull request #9456 from zmstone/1130-EMQX-8367-upgrade-ehttpc
EMQX-8367 [4.4] upgrade ehttpc from 0.2.1 to 0.4.2
2022-12-02 13:43:21 +01:00
Zaiming (Stone) Shi f54cf5466f fix(ehttpc): Upgrade ehttpc to 0.4.2 2022-12-02 09:51:15 +01:00
Zaiming (Stone) Shi 5b3bcf54ed
Merge pull request #9446 from zmstone/1129-emqx-7958-add-cover
1129 emqx 7958 add cover
2022-11-29 15:48:14 +01:00
Zaiming (Stone) Shi 55485f25b2 feat: add emqx_cover 2022-11-29 14:53:37 +01:00
Zaiming (Stone) Shi 01f594f4de
Merge pull request #9245 from ieQu1/main-v4.4
chore(gen_rpc): Bump version to 3.0.0
2022-11-29 13:54:08 +01:00
Zaiming (Stone) Shi 93a93aee05 chore: add tools app to release package 2022-11-29 13:50:00 +01:00
Zaiming (Stone) Shi 76b2e698ec Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2022-11-28 21:50:04 +01:00
Zaiming (Stone) Shi b1f72f4c36
Merge pull request #9438 from zmstone/1123-stop-releasing-v43
build: detach 4.3 branches from 4.4 branches
2022-11-28 19:19:47 +01:00
ieQu1 e8542b7cd7 chore(gen_rpc): Bump version to 3.0.0 2022-11-28 15:23:53 +01:00
Zaiming (Stone) Shi a44ecc421e
Merge pull request #9435 from zmstone/1128-sync-main-v4.3-to-4.4
1128 sync main v4.3 to 4.4
2022-11-28 15:19:27 +01:00
Zaiming (Stone) Shi eda6df7a19 build: detach 4.3 branches from 4.4 branches
Starting from this commit, there will be no more merges from 4.3 to 4.4.
That is: fixes affecting both 4.3 and 4.4 will have to be sent
in separate pull requests.

This change is due to two reasons:
1. The ever increasing divergence from 4.4 is making the merges
   to cause more and more conflicts which are also harder to resolve
2. Opensource edition 4.3 has come to the 18-month EOL by November 2022
2022-11-28 14:36:42 +01:00
Zaiming (Stone) Shi 2331c9bd5e chore: add emqx_cm to appup 2022-11-28 14:32:05 +01:00
Zaiming (Stone) Shi 1b717ee349 ci: delete otp version suffix from intermediate artifact name 2022-11-28 13:13:22 +01:00
Zaiming (Stone) Shi d244c298dc chore: update app vsn and appup 2022-11-28 12:49:35 +01:00
Zaiming (Stone) Shi 8998fcc166 chore: update relup paths db 2022-11-28 11:04:18 +01:00
Zaiming (Stone) Shi 89ad7ed7ef chore: bump app versions 2022-11-28 11:03:28 +01:00
Zaiming (Stone) Shi 5f10b04971 chore: bump chart versions 2022-11-28 11:02:10 +01:00
Zaiming (Stone) Shi cc342e7a09 chore: bump version to v4.4.12-alpha.1 2022-11-28 11:01:39 +01:00
Zaiming (Stone) Shi 71299a2bcf Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2022-11-28 10:02:29 +01:00
Zaiming (Stone) Shi 772ea4988b Merge remote-tracking branch 'origin/release-v44' into main-v4.4 2022-11-28 09:48:01 +01:00
Zaiming (Stone) Shi d166d217ca
Merge pull request #9425 from zmstone/1126-chore-merge-release-v43-back-to-main
1126 chore merge release v43 back to main
2022-11-28 09:43:04 +01:00
Xinyu Liu ed4a975a80
Merge pull request #9388 from Gala-R/fix-helm-chart-bug
fix: helm chart headless service name error
2022-11-28 14:44:53 +08:00
Ivan Dyachkov 2e58152c32 ci: bump otp version to 23.3.4.18-1 2022-11-27 17:47:22 +01:00
Zaiming (Stone) Shi 1c1e158874 ci: build slim package on centos 8
centos 7 has some git compatibility issues
2022-11-27 17:42:42 +01:00
Zaiming (Stone) Shi 8b37baad3a ci: upgrade build-env image to erl23.3.4.18-1 2022-11-27 17:34:25 +01:00
Zaiming (Stone) Shi ad024871e1 ci: fix artifact path for macos 2022-11-27 13:27:29 +01:00
Zaiming (Stone) Shi 027c05af99 test(emqx_channel): fix two flaky tests 2022-11-27 13:15:06 +01:00
Zaiming (Stone) Shi f3fd906043 chore: bump emqx app vsn 2022-11-27 09:18:56 +01:00
Zaiming (Stone) Shi 478b006e68 chore: update versions 2022-11-26 21:04:53 +01:00
Zaiming (Stone) Shi 3c84f4b254 chore: re-generate appup 2022-11-26 18:14:15 +01:00
Zaiming (Stone) Shi fdfb735327 Merge remote-tracking branch 'origin/release-v43' into main-v4.3 2022-11-26 15:59:29 +01:00
Zaiming (Stone) Shi 85e2b279d4 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-25 23:39:59 +01:00
Zaiming (Stone) Shi f2dd44982b docs: update v4.3.22 change logs 2022-11-25 23:39:16 +01:00
Zaiming (Stone) Shi 0d7d9e4022 chore: bump to version v4.3.22 2022-11-25 23:35:33 +01:00
Zaiming (Stone) Shi faf0f7ec89
Merge pull request #9417 from zmstone/chore/firest_update_changes
chore: update changes
2022-11-24 16:05:32 +01:00
firest f55e7612ea chore: update changes 2022-11-24 11:52:21 +01:00
Zaiming (Stone) Shi f61c803d55 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-23 22:50:34 +01:00
Zaiming (Stone) Shi 854836a4c1 chore: bump version to v4.3.22-rc.1 2022-11-23 22:46:37 +01:00
lafirest c3e80329ae
Merge pull request #9405 from lafirest/fix/pass_leak
fix: hide sensitive data in some logs
2022-11-22 19:21:26 +08:00
firest 0d2f1eb49e chore: update appup 2022-11-22 17:31:59 +08:00
firest cc03bc7881 fix: hide sensitive data in some logs 2022-11-22 16:55:47 +08:00
lafirest 06bbb17320
Merge pull request #9391 from lafirest/fix/ctl_atom_leak_v4.3
chore: make remsh node name away from the atom table overflow
2022-11-21 21:51:02 +08:00
firest 2cdc953435 chore: update changes 2022-11-18 14:29:29 +08:00
firest 61517f8280 chore: make remsh node name away from the atom table overflow 2022-11-18 14:23:49 +08:00
raoxiaoli d53eed9e2e fix: helm chart headless service name error 2022-11-18 11:27:42 +08:00
Xinyu Liu 0da764e67e
Merge pull request #9385 from terry-xiaoyu/sync_v43_to_v44
Sync v43 to v44
2022-11-17 16:41:45 +08:00
Shawn 17b6b71ea5 Merge remote-tracking branch 'origin/release-v43' into sync_v43_to_v44 2022-11-17 13:47:10 +08:00
Xinyu Liu f1572ea84e
Merge pull request #9384 from terry-xiaoyu/utf8_resource_id_in_alarm_name
fix: generating alarm name for utf8 resource id failed
2022-11-17 10:37:58 +08:00
Shawn 252b03abd8 fix: generating alarm name for utf8 resource id failed 2022-11-17 10:23:33 +08:00
Thales Macedo Garitezi 1e2677a1d1
Merge pull request #9376 from thalesmg/refactor-clientid-enrichment-name-rv44
refactor(alias_enrichment): rename `enrich_clientid_alias` -> `enrich_with_aliases` and `clientid_enrichment_module` ->`alias_enrichment_module`
2022-11-16 13:55:52 -03:00
Thales Macedo Garitezi 5280626dc0
Merge pull request #9377 from thalesmg/fix-broken-mod-delayed-test-rv44
test: fix broken mod delayed test
2022-11-16 13:55:21 -03:00
Thales Macedo Garitezi 61ac8f6bae test: fix broken mod delayed test
https://github.com/emqx/emqx/actions/runs/3479575153/jobs/5818370291#step:8:309

```
%%% emqx_mod_delayed_SUITE ==> init_per_suite: FAILED
%%% emqx_mod_delayed_SUITE ==> {{failed_to_start_app,emqx_modules,
     {emqx_modules,
         {bad_return,
             {{emqx_modules_app,start,[normal,[]]},
              {'EXIT',
                  {function_clause,
                      [{proplists,get_value,
                           [acl_file,undefined,undefined],
                           [{file,"proplists.erl"},{line,216}]},
                       {emqx_mod_acl_internal,load,1,
                           [{file,
                                "/__w/emqx/emqx/source/lib-ce/emqx_modules/src/emqx_mod_acl_internal.erl"},
                            {line,46}]},
                       {emqx_modules,load_module,2,
                           [{file,
                                "/__w/emqx/emqx/source/lib-ce/emqx_modules/src/emqx_modules.erl"},
                            {line,157}]},
                       {lists,foreach,2,[{file,"lists.erl"},{line,1342}]},
                       {emqx_modules_app,start,2,
                           [{file,
                                "/__w/emqx/emqx/source/lib-ce/emqx_modules/src/emqx_modules_app.erl"},
                            {line,30}]},
                       {application_master,start_it_old,4,
                           [{file,"application_master.erl"},
                            {line,293}]}]}}}}}},
 [{emqx_ct_helpers,start_app,4,
      [{file,
           "/__w/emqx/emqx/source/_build/test/lib/emqx_ct_helpers/src/emqx_ct_helpers.erl"},
       {line,99}]},
  {lists,foreach,2,[{file,"lists.erl"},{line,1342}]},
  {emqx_mod_delayed_SUITE,init_per_suite,1,
      [{file,
           "/__w/emqx/emqx/source/lib-ce/emqx_modules/test/emqx_mod_delayed_SUITE.erl"},
       {line,38}]},
  {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
  {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1380}]},
  {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1224}]}]}
```
2022-11-16 10:36:49 -03:00
Thales Macedo Garitezi 5aa6b6dbb6 refactor(alias_enrichment): rename `enrich_clientid_alias` -> `enrich_with_aliases` and `clientid_enrichment_module` ->`alias_enrichment_module`
Addresses
https://github.com/emqx/emqx-enterprise/pull/1535#discussion_r1022132136

Since it enriches client information with more than just clientid
alias.
2022-11-16 10:00:47 -03:00
lafirest 55aa282d34
Merge pull request #9338 from lafirest/fix/jwt_acl
fix(jwt): fix the jwt ACL will return a wrong result when the token is expired
2022-11-16 18:32:30 +08:00
Xinyu Liu 0b02d72480
Merge pull request #9370 from terry-xiaoyu/enlarge_resource_alive_timeout
Enlarge resource alive timeout
2022-11-16 10:22:42 +08:00
Shawn 039135368e chore: update mongodb-erlang to v3.0.15 2022-11-16 10:22:21 +08:00
Shawn f843938364 fix: don't check resource alive for the temporary resources 2022-11-16 09:43:04 +08:00
Zaiming (Stone) Shi 40ae1fac80 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-15 20:01:49 +01:00
Zaiming (Stone) Shi 545c6176b6
Merge pull request #9361 from id/chore-macos-sign-crc32cer-nif-for-ee
chore: sign crc32cer nif on macos when packaging ee
2022-11-15 19:58:05 +01:00
Zaiming (Stone) Shi c063331e14
Merge pull request #9369 from zmstone/1115-fix-default-value
fix(conf): add crl related config default values in conf
2022-11-15 16:58:54 +01:00
Ivan Dyachkov c0674001fb chore(sync from ee): sign extra binaries on macos when packaging 2022-11-15 16:40:45 +01:00
lafirest e3675f5807
Merge pull request #9340 from lafirest/feat/warning_for_default_cookie
refactor(cookie): Warning message when boot with default Erlang cookie
2022-11-15 22:34:30 +08:00
Shawn e4a3dd9ee8 fix: enlarge the timeout when check alive of resources 2022-11-15 21:07:01 +08:00
Zaiming (Stone) Shi 4f02947222 fix(conf): add crl related config default values in conf 2022-11-15 13:16:20 +01:00
firest ed3dc0b614 chore: update changes 2022-11-15 10:47:13 +08:00
firest f4a14ecf66 refactor(cookie): Warning message when boot with default Erlang cookie 2022-11-15 10:31:09 +08:00
firest 8a0158e21d chore: update changes 2022-11-15 09:52:34 +08:00
firest ebfaecfa91 fix(jwt): fix the jwt ACL will return a wrong result when the token is expired 2022-11-15 09:50:49 +08:00
Xinyu Liu e9490654ae
Merge pull request #9359 from JimMoen/fix-topic-rewrite-wildcard
Fix topic rewrite wildcard
2022-11-15 09:38:09 +08:00
JimMoen db08efa0ac
test(rewrite): invalided topic rewrite rule 2022-11-15 09:01:04 +08:00
JimMoen 32a885017b
chore: bump appup.src for `emqx_mod_rewrite` 2022-11-15 09:01:03 +08:00
JimMoen 1bb31776c9
fix(rewrite): add topic rewrite validation for filter or name 2022-11-15 09:01:03 +08:00
Zaiming (Stone) Shi 1783fa1e80 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-14 23:15:39 +01:00
Zaiming (Stone) Shi 60c8db5905
Merge pull request #9366 from zmstone/1114-ci-use-self-hosted-for-all-erlang-tests
ci: use self-hosted for all Erlang tests
2022-11-14 21:23:20 +01:00
Thales Macedo Garitezi 094bf8985a
Merge pull request #9365 from thalesmg/fix-crl-refresh-config-rv44
fix(crl): correct return for `handle_cast(refresh_config)`
2022-11-14 16:36:15 -03:00
Zaiming (Stone) Shi 2b22ff0710 ci: ensure github action workspace is clear 2022-11-14 20:11:50 +01:00
Zaiming (Stone) Shi 949916fc1c ci: use self-hosted for all Erlang tests
prepare, proper, eunit, ct and cover
2022-11-14 19:57:36 +01:00
Thales Macedo Garitezi 92d80b5e55 fix(crl): correct return for `handle_cast(refresh_config)` 2022-11-14 15:08:30 -03:00
JimMoen 1f05498b27
Merge pull request #9360 from JimMoen/fix-api-method-case-sensitive
fix(api): uppercase api request method
2022-11-14 23:38:05 +08:00
Zaiming (Stone) Shi bf6ffe103f Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-14 14:46:32 +01:00
Thales Macedo Garitezi 2952d01a53
Merge pull request #9362 from thalesmg/flatten-crl-cache-ns-rv44
refactor: flatten crl_cache config namespace into root
2022-11-14 10:44:51 -03:00
Thales Macedo Garitezi 5df513f277 refactor: flatten crl_cache config namespace into root 2022-11-14 09:57:04 -03:00
zhongwencool 5e3814c480
Merge pull request #9356 from zhongwencool/tls-version-validation
feat: validate tls_versions value
2022-11-14 20:12:09 +08:00
JimMoen 7b5340ce09
fix(api): uppercase api request method 2022-11-14 17:55:17 +08:00
Zaiming (Stone) Shi e667b564d8 docs: add a comment to .ci/build_packages/Dockerfile 2022-11-14 10:10:34 +01:00
Zaiming (Stone) Shi 6abb451f56
Merge pull request #9348 from zmstone/1110-add-comments
docs: add a comment to schema default value
2022-11-14 09:48:44 +01:00
Zaiming (Stone) Shi be040ff001
Merge pull request #9358 from zmstone/1114-clone-depth-0
ci: ensure github checkout@v1 and checkout@v2 fetch full history
2022-11-14 09:09:32 +01:00
Zaiming (Stone) Shi a48c75594e ci: ensure github checkout@v1 and checkout@v2 fetch full history
for release builds, alwasy fetch full history otherwise
the old tags will not be found resulting in no relup generated
2022-11-14 08:49:03 +01:00
zhongwencool dfa3f4b5f7
chore: apply suggestions from code review
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-11-14 09:26:48 +08:00
Thales Macedo Garitezi 5c169d2060
Merge pull request #9357 from thalesmg/fix-crl-http-timeout-global-rv44
fix(crl): make http timeout global for all listeners
2022-11-11 13:05:28 -03:00
Thales Macedo Garitezi 0ca7492515 feat(crl): add refresh config API 2022-11-11 12:21:03 -03:00
Zaiming (Stone) Shi 7317a8aba8
Merge pull request #9350 from emqx/revert-9321-av-43-remove-3rdparty-cert-in-packages
Revert "fix: remove outdated cert store from packages"
2022-11-11 14:56:06 +01:00
Thales Macedo Garitezi b08d1651ad docs: remove comment
The server will still fetch CRLs on the fly.
2022-11-11 10:50:47 -03:00
Thales Macedo Garitezi c9e05acb4c fix(crl): make http timeout global for all listeners
We make the CRL HTTP timeout the same for all listeners for simplicity
of understanding and implementation.
2022-11-11 10:50:47 -03:00
Thales Macedo Garitezi 6d27e24bb1
Merge pull request #9347 from thalesmg/crl-rename-cfg-rv44
refactor(crl): rename `s/enable_crl_cache/enable_crl_check/g`
2022-11-11 10:49:51 -03:00
zhongwencool 2b6be02485 feat: validate tls_versions value 2022-11-11 18:08:49 +08:00
JimMoen 9b01c7f4a9
Merge pull request #9351 from JimMoen/fix-comment-typo
chore: fix comment in schema and config file
2022-11-11 17:53:42 +08:00
JimMoen 0748ca1238
chore: fix comment in schema and config file 2022-11-11 14:05:44 +08:00
Zaiming (Stone) Shi d5de5ac05c
Revert "fix: remove outdated cert store from packages" 2022-11-11 07:04:28 +01:00
Zaiming (Stone) Shi f9c1f8cf32 docs: add a comment to schema default value 2022-11-10 22:00:25 +01:00
Thales Macedo Garitezi 445e176898 refactor(crl): rename `s/enable_crl_cache/enable_crl_check/g` 2022-11-10 16:26:06 -03:00
Zaiming (Stone) Shi 38980ffd9e chore: bump version to v4.4.11-alpha.2 2022-11-10 20:23:33 +01:00
Zaiming (Stone) Shi 862e6b2c9c docs: add back the comment lost during conflict resolution 2022-11-10 18:48:58 +01:00
Zaiming (Stone) Shi 1774420da0
Merge pull request #9345 from thalesmg/register-crl-listener-rv44
feat(crl): register CRL URLs when starting TLS listeners
2022-11-10 18:23:38 +01:00
Zaiming (Stone) Shi dae7371f3b
Merge pull request #9346 from zmstone/1110-sync-v44
1110 sync v44
2022-11-10 18:21:13 +01:00
Thales Macedo Garitezi fbf5764b2d
docs: improve fn docs
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-11-10 14:02:43 -03:00
Zaiming (Stone) Shi c1d61a6f30 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-10 16:01:29 +01:00
Thales Macedo Garitezi 83183b7e4b feat(crl): register CRL URLs when starting TLS listeners 2022-11-10 11:40:14 -03:00
Zaiming (Stone) Shi 016bbd67ab Merge remote-tracking branch 'origin/release-v44' into release-v44 2022-11-10 15:15:07 +01:00
Xinyu Liu 89b6cce0bd
Merge pull request #9334 from terry-xiaoyu/fix_500_when_resource_unavailable
fix: make init_resource_with_retrier/4 only 'throw' when failed
2022-11-10 14:31:25 +08:00
Shawn 6725a36dbf fix: make init_resource_with_retrier/4 only 'throw' when failed 2022-11-10 10:44:11 +08:00
Zaiming (Stone) Shi 2fe841c451
Merge pull request #9324 from thalesmg/ocsp-fixes-rv44
OCSP + CRL fixes (rv4.4)
2022-11-09 09:08:05 +01:00
Zaiming (Stone) Shi f80884e3fa
Merge pull request #9330 from terry-xiaoyu/fix_raise_macro_rule_engine
fix: typos in the RAISE macro of rule_engine
2022-11-09 08:49:27 +01:00
Shawn 407a197c8a fix: typos in the RAISE macro of rule_engine 2022-11-09 12:06:58 +08:00
Thales Macedo Garitezi df58d19f89 fix(listener_ocsp): assert listener id is present in options (ssl) 2022-11-08 17:01:21 -03:00
Zaiming (Stone) Shi fb81c35cd7 refactor: introduce emqx_const_v1 for immutable anonymous funs 2022-11-08 17:00:57 -03:00
Thales Macedo Garitezi 2b30f95dee
test(ocsp): another fix for macos openssl versions
Co-authored-by: Ivan Dyachkov <dev@dyachkov.org>
2022-11-08 16:45:03 -03:00
Zaiming (Stone) Shi 32a8753e9d refactor: introduce emqx_const_v1 for immutable anonymous funs 2022-11-08 16:41:58 -03:00
Thales Macedo Garitezi ce282797be refactor(ocsp): use listener id instead of name for sni fun matching 2022-11-08 16:12:40 -03:00
Thales Macedo Garitezi 2dcecafce6 test(fix): account for non-openssl programs 2022-11-08 15:54:41 -03:00
Thales Macedo Garitezi bb249834f7 test(ocsp): add more tests 2022-11-08 15:46:16 -03:00
Thales Macedo Garitezi 2e5e6af677 fix(listener): pass along the listener name
The rigid `start_listener/3` does not allow to pass the original
`listener()` map forward, which contains the listener name needed for
OCSP SNI function to later find its required information.  To avoid
changing the arity of this exported function, we stuff the listener
name temporarily along with the esockd options...
2022-11-08 15:18:47 -03:00
Thales Macedo Garitezi cd053a28d4 docs(crl): add config docs for CRL options 2022-11-08 14:21:18 -03:00
Andrei Varga 24f8d41b9a
Merge pull request #9321 from emqx/av-43-remove-3rdparty-cert-in-packages
fix: remove outdated cert store from packages
2022-11-08 19:08:43 +02:00
Thales Macedo Garitezi b0e8e9dc28 refactor(crl): use cast for refreshing crls 2022-11-08 13:53:27 -03:00
Traphalet c319e91758 fix: remove outdated cert store from packages 2022-11-08 18:24:59 +02:00
Thales Macedo Garitezi 2713af507a refactor: move OCSP options into its own section 2022-11-08 13:19:14 -03:00
Thales Macedo Garitezi ca973db2fc refactor: split list comprehension over fn calls 2022-11-08 10:42:38 -03:00
Thales Macedo Garitezi c23c534525 refactor: fix typo, add more detail, rename option to be more clear 2022-11-08 10:42:38 -03:00
JianBo He 01ada64e46
Merge pull request #9325 from HJianBo/fix-flaky-test
test(stomp): fix flaky tests
2022-11-08 16:58:39 +08:00
JianBo He 491b402be3 test(stomp): fix flaky tests 2022-11-08 09:46:01 +08:00
Zaiming (Stone) Shi 45eed402d4 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-07 22:16:05 +01:00
Zaiming (Stone) Shi a7768b6e98
Merge pull request #9313 from zmstone/1105-fix-resource-creation-retry-loop-should-delay-first
fix(emqx_rule_monitor): sleep before retry but not after
2022-11-07 22:09:28 +01:00
Zaiming (Stone) Shi 31a582241b chore: bump version to 4.4.11-alpha.1 2022-11-07 21:57:04 +01:00
Zaiming (Stone) Shi 237f8f7fde Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-07 21:55:46 +01:00
Thales Macedo Garitezi 11175b55f8 fix(ocsp): allow disabling ocsp without touching url 2022-11-07 17:50:02 -03:00
Zaiming (Stone) Shi 3ed10eae07 ci: set CT_READABLE default to true 2022-11-07 21:29:53 +01:00
Zaiming (Stone) Shi 95e7a03f01
Merge pull request #9323 from emqx/av-fix-env-reference
fix: env variable reference in upload-artifact@v3
2022-11-07 21:08:37 +01:00
Thales Macedo Garitezi 26d2ed3d31 fix(crl): allow specifying CRL URLs per listener 2022-11-07 16:42:51 -03:00
Traphalet 42158f79e0 fix: env variable reference in upload 2022-11-07 20:51:12 +02:00
Thales Macedo Garitezi 86278c99a6 fix: enforce minimum refresh interval for ocsp and crl caches 2022-11-07 15:35:07 -03:00
Zaiming (Stone) Shi ea31fc4529
Merge pull request #9322 from zmstone/1107-chore-sync-release-v44
1107 chore sync release v44
2022-11-07 18:53:41 +01:00
Zaiming (Stone) Shi 7b2c4998aa Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-07 15:24:26 +01:00
Zaiming (Stone) Shi 61bd712956
Merge pull request #9318 from zmstone/1107-ci-docker-prune-images-before-and-after-tests
ci: docker prune images before and after test
2022-11-07 14:49:17 +01:00
Zaiming (Stone) Shi a432312b91 build: print apps in lines (but not as space separated args) 2022-11-07 13:02:22 +01:00
Zaiming (Stone) Shi 8f0ef274a8 ci: docker prune images before and after test 2022-11-07 13:02:22 +01:00
Zaiming (Stone) Shi 4ab4ce71f7
Merge pull request #9320 from zmstone/1107-chore-sync-release-v44
1107 chore sync release v44
2022-11-07 11:45:56 +01:00
Zaiming (Stone) Shi 4fb28783c5 chore: bump 4.4 dashboard versions 2022-11-07 10:50:16 +01:00
Zaiming (Stone) Shi 0eebabd34c Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-07 10:48:38 +01:00
Zaiming (Stone) Shi 41718952d8
Merge pull request #9297 from thalesmg/ocsp-rv44
chore(oscp_crl): port OCSP and CRL features to CE repo (re4.4)
2022-11-07 10:44:21 +01:00
Zaiming (Stone) Shi 51a959c3b4 Merge remote-tracking branch 'origin/release-v44' into ocsp-rv44 2022-11-07 10:18:15 +01:00
Zaiming (Stone) Shi b4b1ca27ab docs: add changelogs 2022-11-07 10:12:34 +01:00
Zaiming (Stone) Shi 2998b014ce
Merge pull request #9314 from zmstone/1105-ci-improve-actions
1105 ci improve actions
2022-11-07 09:20:16 +01:00
Zaiming (Stone) Shi 568bd520a8 ci: ensure docker-ct for emqx_auth_http and emqx_web_hook 2022-11-07 08:51:32 +01:00
JimMoen 470497a892
Merge pull request #9295 from JimMoen/fix-mgmt-api-prometheus
fix(prometheus): disable auth for prometheus endpoint on mgmt listener
2022-11-07 09:18:46 +08:00
Zaiming (Stone) Shi 90ff3a71f5 ci: mongo-replicaset and mongo-sharded are ee only 2022-11-06 20:36:22 +01:00
Zaiming (Stone) Shi 8ff8a8b55d ci: split fast (regular) and docker-compose (docker) ct 2022-11-06 19:39:06 +01:00
JimMoen 639006e302
fix(prometheus): disable auth for prometheus endpoint on mgmt listener 2022-11-07 00:44:37 +08:00
Zaiming (Stone) Shi dff02ba0e5 docs: add change log v4.3.22 v4.4.11 2022-11-05 17:48:46 +01:00
Zaiming (Stone) Shi 9b194baf69 fix(emqx_rule_monitor): sleep before retry but not after 2022-11-05 17:42:29 +01:00
Zaiming (Stone) Shi 6ae2b06ba1 chore: upgrade dashboard version 2022-11-04 22:11:41 +01:00
Zaiming (Stone) Shi e73657ac52
Merge pull request #9280 from sstrigler/EMQX-7665-cannot-clear-alarms
fix(emqx_mgmt): call emqx_alarm:delete_all_deactivated_alarms for rem…
2022-11-04 16:13:33 +01:00
Zaiming (Stone) Shi 2c8874cfe0
Merge branch 'release-v43' into EMQX-7665-cannot-clear-alarms 2022-11-04 16:12:56 +01:00
Zaiming (Stone) Shi 351c17a2a0
Merge pull request #9306 from zmstone/1104-ci-split-ct-runs
1104 ci split ct runs
2022-11-04 15:53:52 +01:00
Zaiming (Stone) Shi 3346f2a26c Merge remote-tracking branch 'origin/release-v44' into 1104-ci-split-ct-runs 2022-11-04 14:34:24 +01:00
Zaiming (Stone) Shi 746cdef546
Merge pull request #9241 from thalesmg/rule-jwt-worker-v44
feat: add jwt worker for rule actions
2022-11-04 14:22:48 +01:00
Zaiming (Stone) Shi be10498919 chore: re-generate appup 2022-11-04 13:50:24 +01:00
Thales Macedo Garitezi d3c6ade640 docs: rewrite fn doc 2022-11-04 09:38:40 -03:00
Thales Macedo Garitezi f5c655ec1b refactor: add api to ensure jwt token is created 2022-11-04 09:38:40 -03:00
Thales Macedo Garitezi d714f78590 refactor: use `include` for headers 2022-11-04 09:38:40 -03:00
Thales Macedo Garitezi a33977e635 feat: add ets table creation to jwt supervisor 2022-11-04 09:38:40 -03:00
Thales Macedo Garitezi b4837302aa refactor: move api to emqx_rule_engine_jwt module 2022-11-04 09:38:40 -03:00
Thales Macedo Garitezi 270f47aafc refactor: start jose as an app dependency 2022-11-04 09:38:40 -03:00
Thales Macedo Garitezi f926bcfbc0 fix(appup): stop workers and supervisors before deleting code when downgrading 2022-11-04 09:38:40 -03:00
Thales Macedo Garitezi 4a06c25178 chore: add some docs and specs; treat some possible errors 2022-11-04 09:38:40 -03:00
Thales Macedo Garitezi 7f4ffee7b5 feat: add jwt worker for rule actions
Will be used in GCP PubSub resource for EE.
2022-11-04 09:38:11 -03:00
Zaiming (Stone) Shi 2062911e3b Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-04 13:28:12 +01:00
Xinyu Liu 1887ae735b
Merge pull request #9291 from JimMoen/fix/repub-or-mqtt-bridge-topic-validate
fix: mqtt_bridge and republish validate msg topic
2022-11-04 19:14:41 +08:00
Zaiming (Stone) Shi 7dfa83f3c6
Merge pull request #9223 from emqx/av/parallelCTruns
ci(test): test parallel CT runs on self-hosted runners
2022-11-04 12:11:54 +01:00
Zaiming (Stone) Shi 57cc0366e0
Merge pull request #9305 from zmstone/1104-ci-fix-artifacts-upload
ci: fix artifact upload path
2022-11-04 12:09:35 +01:00
Zaiming (Stone) Shi bd39b9b627 ci: fix artifact upload path 2022-11-04 09:56:19 +01:00
JimMoen f9276edaf8
fix: mqtt_bridge and republish validate msg topic 2022-11-04 15:40:46 +08:00
zhongwencool 5925391b37
Merge pull request #9302 from zhongwencool/update-document
chore: update management.bootstrap_apps_file's document
2022-11-04 15:08:34 +08:00
zhongwencool 215548155b chore: update management.bootstrap_apps_file's document 2022-11-04 10:35:59 +08:00
Zaiming (Stone) Shi 279046c51e Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-03 21:58:25 +01:00
Zaiming (Stone) Shi 29477579b8
Merge pull request #9270 from id/ci-fix-packages-build-for-ee-releases
ci: fix packages build for ee releases
2022-11-03 21:52:02 +01:00
Zaiming (Stone) Shi b7a04c50ff ci: upload all cover data to the same artifact name
all concurrent jobs produces different coverdata file names
so there is clashing
2022-11-03 21:49:18 +01:00
Zaiming (Stone) Shi 31a65ca480 ci: make sure detect-profile works in source dir 2022-11-03 20:47:40 +01:00
Ivan Dyachkov 4579782b62 ci: fix packages build for ee releases
- build otp manually instead of kerl
- bump versions on some actions
- fix deprecated way of setting step output in some cases
2022-11-03 20:45:41 +01:00
Zaiming (Stone) Shi c2bc6b56ec test: ensure all modules are loaded for takeover_SUITE 2022-11-03 20:33:00 +01:00
Zaiming (Stone) Shi 25f200a122
Merge pull request #9298 from zmstone/1103-ci-fix-build
1103 ci fix build
2022-11-03 20:32:21 +01:00
Thales Macedo Garitezi 2f62426aca docs: add changelog entries 2022-11-03 16:21:13 -03:00
Zaiming (Stone) Shi 3667a35844 fix(emqx_relup): dialyzer 2022-11-03 19:42:09 +01:00
JianBo He a73eb29196 chore: avoid side effects from boot modules 2022-11-04 00:41:05 +08:00
Thales Macedo Garitezi b71b106456 feat(special_authn): set hook priority 2022-11-03 13:30:32 -03:00
Thales Macedo Garitezi f0a5208f3c fix(dialyzer): fix dialyzer warning about unmatched value 2022-11-03 11:20:24 -03:00
Thales Macedo Garitezi 30a3ea3dc4 docs: add docs for client enrichment / special auth module configurations 2022-11-03 11:19:49 -03:00
Zaiming (Stone) Shi 78c0ca18a7
Merge pull request #9296 from terry-xiaoyu/improve_testcase_emqx_rule_utils
test: improve the test cases for t_if_contains_placeholder
2022-11-03 14:45:24 +01:00
Thales Macedo Garitezi e53cf17e4c chore: export internal functions for ad-hoc debugging 2022-11-03 10:43:14 -03:00
Thales Macedo Garitezi f29ba06316 docs: fix copyright headers 2022-11-03 10:42:56 -03:00
Zaiming (Stone) Shi 219b2b6dc0 build: fix build script OTP_BASE 2022-11-03 14:37:56 +01:00
Zaiming (Stone) Shi c6efd902f8 ci: make sure detect-profile works in source dir 2022-11-03 14:36:37 +01:00
Thales Macedo Garitezi 915504c694 chore(appup): update appups 2022-11-03 10:35:57 -03:00
Thales Macedo Garitezi af4141bef4 chore(oscp_crl): port OCSP and CRL features to CE repo (re4.4) 2022-11-03 10:10:16 -03:00
Stefan Strigler 835d3a33ef fix(emqx_mgmt): call emqx_alarm:delete_all_deactivated_alarms for remote nodes
Old call was calling a non-existant function on current module, instead we make
call directly into `emqx_alarm` on remote node.
2022-11-03 14:02:55 +01:00
Zaiming (Stone) Shi 9f47ee09fe
Merge pull request #9267 from JimMoen/1028-feat-disconnect-event-type
feat: options for trigger disconnected events by different reasons
2022-11-03 13:35:25 +01:00
Zaiming (Stone) Shi 5bba281c2b chore(appup): ensure emqx module is reloaded 2022-11-03 12:45:16 +01:00
Zaiming (Stone) Shi fbc06b3dc6 chore(emqx.erl): sync changes from ee 2022-11-03 12:43:22 +01:00
Zaiming (Stone) Shi 21ebe3d50c chore: sync changes from ee 2022-11-03 12:42:32 +01:00
Zaiming (Stone) Shi 6f575aedd9 chore: sync emqx_relup to ce 2022-11-03 12:38:32 +01:00
Shawn 2c27f8c474 test: improve the test cases for t_if_contains_placeholder 2022-11-03 18:49:06 +08:00
Zaiming (Stone) Shi d25b614a93 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-03 11:43:50 +01:00
JimMoen cb3bd24528
test: unlink the process would be exited by tcp close 2022-11-03 16:43:34 +08:00
JimMoen 86dd1a3e05
test: different resons for disconnect event 2022-11-03 16:43:34 +08:00
JimMoen 51c532546c
feat: options for trigger disconnected events by different reasons 2022-11-03 16:43:34 +08:00
Zaiming (Stone) Shi 606ca670eb
Merge pull request #9283 from zmstone/1101-hook-order-release-43
1101 hook order release 43
2022-11-03 08:45:19 +01:00
Zaiming (Stone) Shi 0ab5ac95bb test: refactor emqx_takeover_SUITE 2022-11-02 21:09:24 +01:00
Zaiming (Stone) Shi 7d3c7e1cc3 test: clear mqtt_admin table after bootstrap test suite 2022-11-02 20:15:23 +01:00
Zaiming (Stone) Shi 16a306f6f8 test: ensure rule engine resource providers are loaded 2022-11-02 20:06:26 +01:00
Zaiming (Stone) Shi a779a58ff9 ci: no need to make cover after per app ct run 2022-11-02 20:06:26 +01:00
Zaiming (Stone) Shi f4621d3c71 test: connect MQTT client with a retry 2022-11-02 20:06:26 +01:00
Zaiming (Stone) Shi 18486a7e13 ci: run emqx-ct-pipeline without docker dependencies 2022-11-02 19:20:39 +01:00
Zaiming (Stone) Shi 3d7dd4f738 test: ensure $mqtt_pub_caps is cleared after test run 2022-11-02 19:20:39 +01:00
Zaiming (Stone) Shi 25863b6773 test: ensure clean start for emqx_mod_sup_SUITE 2022-11-02 19:20:39 +01:00
Zaiming (Stone) Shi 6d943181d7 test: ensure emqx_dashboard tables are created for data export import 2022-11-02 19:20:39 +01:00
Traphalet 25b6a1c158 ci(test): test parallel CT runs on self-hosted runners 2022-11-02 19:20:39 +01:00
Zaiming (Stone) Shi e0db524a10 refactor: change the format of auth_order and acl_order configs 2022-11-02 11:49:55 +01:00
Ilya Averyanov 52652f6c96 feat(hooks): add config options to set explicit callback order 2022-11-01 19:39:52 +01:00
Zaiming (Stone) Shi ae0225853b chore: regenerate appup 2022-11-01 19:37:35 +01:00
Zaiming (Stone) Shi f0b350ba4f Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-11-01 13:51:06 +01:00
Zaiming (Stone) Shi 2d5b3a2e4f
Merge pull request #9265 from qzhuyan/upgrade/william/vsn-4.4-otp-upgrade
Upgrade/william/vsn 4.4 otp upgrade
2022-11-01 13:49:29 +01:00
William Yang f36fd9f3db docs: update changes/v4.4.11-zh.md
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-11-01 10:05:33 +01:00
zhongwencool d1a5dcd222
Merge pull request #9260 from zhongwencool/bump-minirest-0.3.10
chore: remove useless information from the dashboard listener failure log
2022-11-01 07:47:16 +08:00
zhongwencool 704bf3eade
Merge branch 'release-v43' into bump-minirest-0.3.10 2022-11-01 07:46:50 +08:00
zhongwencool 406428c8ca
chore: update lib-ce/emqx_dashboard/test/emqx_dashboard_SUITE.erl
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-11-01 07:45:58 +08:00
zhongwencool fd69afd899
Merge pull request #9274 from emqx/revert-9256-bootstrap-users
Revert "feat: bootstrap dashboard users from dashboard.bootstrap_users_file"
2022-11-01 07:44:41 +08:00
zhongwencool b8dad3f667
Merge branch 'release-v43' into revert-9256-bootstrap-users 2022-11-01 07:44:21 +08:00
zhongwencool 1b6164224a
Merge pull request #9273 from zhongwencool/bootstrap-apps
feat: bootstrap app/secret from management.bootstrap_apps_file
2022-11-01 07:41:52 +08:00
Zaiming (Stone) Shi 809f98502a chore(emqx_auth_mnesia): re-generate appup 2022-10-31 17:33:51 +01:00
William Yang dde4a28f31
docs: Update changes/v4.4.11-en.md
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-10-31 17:14:35 +01:00
Zaiming (Stone) Shi 7e322bd392
chore: fix typos in command line examples 2022-10-31 16:35:25 +01:00
William Yang 23569198cf ci(relup-test): merge two jobs 2022-10-31 15:44:24 +01:00
William Yang d33b00bfc7 ci(relup_test): Get OTP base vsn from relup-paths.eterm 2022-10-31 15:27:49 +01:00
zhongwencool e4473d34c0 feat: bootstrap app/secret from management.bootstrap_apps_file 2022-10-31 19:57:04 +08:00
zhongwencool 3aeb21cc37
Revert "feat: bootstrap dashboard users from dashboard.bootstrap_users_file" 2022-10-31 19:54:34 +08:00
William Yang 7b14ea92c3 chore: update relup-paths.eterm 2022-10-31 11:41:48 +01:00
Xinyu Liu 91bc2403a5
Merge pull request #9264 from terry-xiaoyu/message_acked_hook_for_coap
fix: run the 'message.acked' hook when ACK received from CoAP devices
2022-10-31 15:20:11 +08:00
Shawn 3f17119e36 fix: run the 'message.acked' hook when ACK received from CoAP devices 2022-10-31 11:46:21 +08:00
zhongwencool 84e089260f
Merge pull request #9256 from zhongwencool/bootstrap-users
feat: bootstrap dashboard users from dashboard.bootstrap_users_file
2022-10-31 09:42:56 +08:00
William Yang 8bda9dd055 docs: upgrade OTP to 24.3.4.2-1 2022-10-30 21:55:45 +01:00
William Yang 03cf2da256 chore: enable OTP upgrade for 4.4 2022-10-30 21:55:38 +01:00
Zaiming (Stone) Shi 0d7855abd4
Merge pull request #9266 from zmstone/1027-sync-v43-to-v44
1027 sync v43 to v44
2022-10-28 22:16:44 +02:00
Zaiming (Stone) Shi 442ab8a246 chore: re-generate appup 2022-10-28 17:09:32 +02:00
Zaiming (Stone) Shi 0031595770
Merge pull request #9263 from JimMoen/fix-typo
chore: fix ci typo
2022-10-28 17:09:23 +02:00
zhongwencool 9167055f56 chore: refactor init_default_admin_user/0 function 2022-10-28 21:49:16 +08:00
zhongwencool 93924f567f chore: apply suggestions from code review
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-10-28 21:44:38 +08:00
zhongwencool d37ad38e7a chore: clear_table mqtt_admin when failed 2022-10-28 21:44:05 +08:00
zhongwencool 47d88186d1 chore: update emqx_auth_mnesia appup 2022-10-28 21:44:05 +08:00
zhongwencool ab51684b36 chore: add more test for emqx_dashboard 2022-10-28 21:44:05 +08:00
zhongwencool ec426df0a7 fix: typo error 2022-10-28 21:44:03 +08:00
zhongwencool 04c0caefac feat: bootstrap dashboard users from dashboard.bootstrap_users_file 2022-10-28 21:43:20 +08:00
Zaiming (Stone) Shi 4a020d0e1a Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-10-28 14:35:56 +02:00
JimMoen 844ebf5ed6
chore: fix ci typo 2022-10-28 20:34:45 +08:00
Zaiming (Stone) Shi 02122469bc
Merge pull request #9253 from zmstone/1027-sync-v43-to-v44
1027 sync v43 to v44
2022-10-28 14:33:22 +02:00
Zaiming (Stone) Shi dd95a26270 Merge remote-tracking branch 'origin/main-v4.3' into release-v43 2022-10-28 14:12:44 +02:00
Zaiming (Stone) Shi 4614167488
Merge pull request #9234 from savonarola/update-emqx-cm
chore(cm): sync emqx_cm with ee
2022-10-28 14:09:06 +02:00
Zaiming (Stone) Shi 86329075cb
Merge pull request #9242 from lafirest/fix/log_sensitive_acl
Use LOG_SENSITIVE to replace the risky LOG in ACL
2022-10-28 13:16:08 +02:00
Zaiming (Stone) Shi 332e5e7b56 fix: ensure unicode binary is used everywhere in data backup 2022-10-28 11:29:05 +02:00
zhongwencool c2c089d0e9 chore: remove useless information from the dashboard listener failure log 2022-10-28 17:26:25 +08:00
firest 5242a6d393 chore: bump otp version 2022-10-28 16:38:59 +08:00
JimMoen 139aabd078
Merge pull request #9190 from JimMoen/rule-engine-api-id
fix(rule_engine): rule id in path urlencoded
2022-10-28 15:41:40 +08:00
Xinyu Liu 8260c55530
Merge pull request #9254 from terry-xiaoyu/webhook_support_placeholders_in_headers
feat: support to use placeholders as http headers in webhook actions
2022-10-28 09:43:11 +08:00
Xinyu Liu eeb87fd253
Merge pull request #9239 from emqx/webhook_support_placeholders_in_headers
feat: support to use placeholders as http headers in webhook actions
2022-10-28 09:01:29 +08:00
Zaiming (Stone) Shi 307ff6b97b
Merge pull request #9244 from HJianBo/using-warning-level
chore(auth-http): using warning level instead of error
2022-10-27 20:42:00 +02:00
Zaiming (Stone) Shi 7b9d943c33 chore: update appup 2022-10-27 20:19:05 +02:00
Zaiming (Stone) Shi 5394de92f8 fix(emqx_mgmt_data_backup): ensure unicode filename 2022-10-27 20:02:56 +02:00
Zaiming (Stone) Shi 537f088616 Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2022-10-27 17:31:15 +02:00
JimMoen a9e835113d
chore: update chanegs 2022-10-27 17:32:22 +08:00
JimMoen c21a2cf4c6
test(rule_engine): test some unicode chars as rule id 2022-10-27 17:32:21 +08:00
Shawn 982fc9b4fe feat: support to use placeholders as http headers in webhook actions 2022-10-27 17:24:05 +08:00
firest eddbf3dc9e chore: update changes 2022-10-27 17:03:12 +08:00
firest b70feef432 chore: bump version && update appup 2022-10-27 17:03:12 +08:00
firest 4fc56a6e5b fix(log): Use LOG_SENSITIVE to replace the risky LOG in ACL
We should ensure that neither client nor backend database passwords should be printed out when users use ACLs
2022-10-27 17:02:57 +08:00
JianBo He d0ad44d364 chore(auth-http): using warning level instead of error 2022-10-27 16:23:30 +08:00
JianBo He 49a5862a63
Merge pull request #9046 from HJianBo/more-logs-for-auth-http
More logs for http authn/authz
2022-10-27 15:42:36 +08:00
JimMoen 892becb5bf
fix(rule_engine): rule_id and resource_id in path urlencoded 2022-10-27 00:39:13 +08:00
lafirest 6feaf1a8cf
Merge pull request #9189 from lafirest/1003-add-a-sensitive-logger
fix(logger): add new macro `?LOG_SENSITIVE` and use it to replace some `?LOG`  for security reason
2022-10-26 19:05:51 +08:00
firest 6783c640a6 chore: update changes 2022-10-26 17:16:36 +08:00
firest e66e563648 fix(logger): add new macro `?LOG_SENSITIVE` and use it to replace some `?LOG` for security reason
some arguments  passed to external API may contain sensitive data, when the API execution fails, sensitive data may be returned as a part of the failure reason, if this reason printed to the log, it will lead to sensitive data leakage, so we should check carefully and scan these failed returns
2022-10-26 17:14:46 +08:00
Ilya Averyanov cc468dca4e chore(cm): sync emqx_cm with ee 2022-10-26 11:49:22 +03:00
zhongwencool b447fc88af
Merge pull request #9156 from zhongwencool/list-trace-crash-when-disable
fix: get trace list crash when trace not initialized
2022-10-26 16:46:23 +08:00
Zaiming (Stone) Shi f5c0ef3e56
Merge pull request #9226 from zmstone/1025-fix-drop-tuple-value-message-headers
fix(emqx_rule_events): do not keep tuple-value message headers
2022-10-26 09:59:12 +02:00
Xinyu Liu 7f63912bba
Merge pull request #9224 from terry-xiaoyu/utf8_backup_filenames
fix: list exported json files failed with utf8 filenames
2022-10-26 15:47:00 +08:00
zhongwencool c41fd8d068 chore: update changelog for fixing trace bug 2022-10-26 15:28:38 +08:00
Zaiming (Stone) Shi ebd01da78b
Merge pull request #9229 from zmstone/1025-sync-modules-from-diverged-ee
chore: sync changes back from ee to ce
2022-10-26 09:23:08 +02:00
Zaiming (Stone) Shi 81e6a40454 fix(emqx_rule_events): do not keep tuple-value message headers
the converted message is for JSON encoding, keeping the tuple-values
will lead to encoding error.
2022-10-26 08:52:20 +02:00
Zaiming (Stone) Shi c6067447ac chore: sync changes back from ee to ce 2022-10-26 08:49:52 +02:00
Xinyu Liu 90ef9254fd
Merge pull request #9199 from terry-xiaoyu/boot_blocked_by_unreachable_resources
fix: refresh resources and rules asynchronously
2022-10-26 13:41:07 +08:00
Shawn fa333157eb fix: list exported json files failed with utf8 filenames 2022-10-26 11:46:45 +08:00
zhongwencool 3dddacb3f0 chore: update emqx_trace_api into appup.src 2022-10-26 10:16:33 +08:00
zhongwencool 81d4bd10a3 fix: alway use os:system_time/1 when managing traces 2022-10-26 10:07:44 +08:00
zhongwencool 0d903eb2e1 chore: update changelog 2022-10-26 10:03:00 +08:00
zhongwencool 59b5923887 chore: update changelog and appup.src 2022-10-26 10:03:00 +08:00
zhongwencool 4e4f72d479 fix: use os:system_time replace erlang:system_time in trace's start_at/end_at 2022-10-26 10:03:00 +08:00
zhongwencool 3dd2084c2e fix: get trace list crash when trace not initialized 2022-10-26 10:03:00 +08:00
Zaiming (Stone) Shi 51c73eed55
Merge pull request #9044 from HJianBo/fix-jwt-acl-rules
fix(acl): support all rules in JWT ACL
2022-10-25 20:33:22 +02:00
Thales Macedo Garitezi 7ba1fa00dc
Merge pull request #9220 from thalesmg/sync-v44-a
Sync v44 a
2022-10-25 11:04:46 -03:00
Thales Macedo Garitezi 8206f39b7c chore: update appups 2022-10-25 09:43:12 -03:00
Thales Macedo Garitezi a987d6fc94 test(rulesql): fix broken test 2022-10-25 09:43:12 -03:00
Shawn 006d2e5f29 fix: rolling upgrade failed on undef funcs 2022-10-25 20:41:31 +08:00
Thales Macedo Garitezi 0a8f3d4e16 Merge remote-tracking branch 'origin/main-v4.3' into sync-v44-a 2022-10-24 16:28:11 -03:00
Thales Macedo Garitezi ba422532c7 Merge remote-tracking branch 'origin/release-v44' into sync-v44-a 2022-10-24 16:26:18 -03:00
Thales Macedo Garitezi 41a488b6ec
Merge pull request #9210 from thalesmg/fix-mgmt-endpoint-status-code-v43
fix(mgmt_api): return 503 when emqx is not running in `/status` (v4.3)
2022-10-24 16:24:53 -03:00
Thales Macedo Garitezi 51f2414eaa
docs: improve changelog
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-10-24 15:24:49 -03:00
Thales Macedo Garitezi c0b5b887c3 fix(mgmt_api): return 503 when emqx is not running in `/status` 2022-10-24 14:22:28 -03:00
Ivan Dyachkov d0a4f75bf2
Merge pull request #9214 from emqx/chore-update-codeowners-paths
chore: add leading slash for paths in codeowners
2022-10-24 13:16:18 +02:00
JimMoen 3c1608f883
Merge pull request #9174 from emqx/1019-fix-ci-workflow
1019 fix ci workflow
2022-10-24 17:42:35 +08:00
Ivan Dyachkov 78fc9ff64e chore: add leading slash for paths in codeowners 2022-10-24 11:28:39 +02:00
JimMoen 34d73960e7
ci: fix macos erlang-otp cache hitting 2022-10-24 16:58:19 +08:00
JianBo He bd59197a58 chore: apply suggestions from code review
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-10-24 16:28:25 +08:00
JimMoen 075228aadc
chore: fix local actions path 2022-10-24 14:15:20 +08:00
JianBo He 4a9b5662f8 chore: fix diaylzer warnings 2022-10-24 09:51:05 +08:00
Zaiming (Stone) Shi 3b59f1440b chore: bump lc from 0.3.1 to 0.3.2
there is no beam change in 0.3.2 (comparing to 0.3.1)
2022-10-22 15:14:58 +02:00
Shawn 15248eb069 chore: update the change log 2022-10-21 15:41:00 +08:00
Shawn 2c61f92eec fix: refresh resources and rules asynchronously 2022-10-21 15:06:35 +08:00
JianBo He b9e9540120 chore(auth): support printing unicode string 2022-10-21 11:59:01 +08:00
JianBo He 38e87579c0 chore(jwt-acl): avoid the disruptions caused by rule formatting errors 2022-10-21 11:47:19 +08:00
JianBo He fa4203effa chore: apply suggestions from code review
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-10-21 11:47:19 +08:00
JianBo He 7b0acf2c4d chore: update changes and appup.src 2022-10-21 11:47:07 +08:00
JianBo He 1857fe643a fix(acl): support all rules in JWT ACL 2022-10-21 11:44:48 +08:00
Xinyu Liu eff4c109e0
Merge pull request #9185 from terry-xiaoyu/fix_precision_of_rule_metrics
fix: set precision of counter 'max_speed' to 2 digits
2022-10-21 09:22:17 +08:00
Shawn f8686ffc62 chore: update the change logs 2022-10-21 09:15:03 +08:00
Shawn bfe238fa1c fix: set precision of counter 'max_speed' to 2 digits 2022-10-21 09:05:25 +08:00
Zaiming (Stone) Shi 0eaa45f958
Merge pull request #9164 from zmstone/1017-docs-split-changelogs
docs: split change logs
2022-10-20 12:25:21 +02:00
Xinyu Liu 99fa3a0a61
Merge pull request #9184 from terry-xiaoyu/mongodb_v3.0.14
chore: update mongodb driver to v3.0.14
2022-10-20 18:18:21 +08:00
JianBo He 8e199b3a77 chore: update appup.src 2022-10-20 15:52:17 +08:00
JianBo He 317ef65c7e chore: remove the duplicated clientid print in log 2022-10-20 15:50:04 +08:00
JianBo He 4cf3d181d8 chore(auth-http): more infos for auth/acl checking failure 2022-10-20 15:48:58 +08:00
Shawn 524ba512d8 chore: update mongodb driver to v3.0.14 2022-10-20 13:41:28 +08:00
Xinyu Liu 8ba3357973
Merge pull request #9183 from emqx/1020-sync-release-v43-back-to-main
1020 sync release v43 back to main
2022-10-20 13:39:51 +08:00
JimMoen e0e8a5a707 chore: re-generate appup for v4.3.22 2022-10-20 10:37:32 +08:00
JimMoen 8adddb018f Merge remote-tracking branch 'emqx/release-v43' into 1020-sync-release-v43-back-to-main 2022-10-20 10:23:08 +08:00
Zaiming (Stone) Shi fd7a8064f4 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-10-19 19:25:43 +02:00
Zaiming (Stone) Shi 6bedc72bd2
Merge pull request #9180 from zmstone/1019-no-shared-message-redispatch-for-takeover
fix(shared): do not redispatch shared messages for certain shutdown
2022-10-19 19:24:38 +02:00
Zaiming (Stone) Shi a163ffce7c test: assert message receive pid is in the expected pids list 2022-10-19 18:16:38 +02:00
Zaiming (Stone) Shi 73a5462cba fix(shared): do not redispatch shared messages for certain shutdown
For takeover, there should be no message re-dispatch because
the messages will be retried by the new session.

For kick, messages should not be re-dispatched for security reason.
i.e. if admin has identified that there are malicious messages
stored in persisted sessions, killing the session should not
cause messages to be re-dispatched
2022-10-19 17:21:56 +02:00
Zaiming (Stone) Shi 5f8453570a
Merge pull request #9168 from JimMoen/1018-fix-ci-path-error
chore: workflow steps with path
2022-10-18 13:21:06 +02:00
Zaiming (Stone) Shi e607826b44
Merge pull request #9165 from zmstone/1017-add-code-owners
chore: add code-owners
2022-10-18 12:32:19 +02:00
JimMoen b0ee2fdd3c chore: workflow steps with path 2022-10-18 17:58:55 +08:00
JimMoen 37663e80c0
Merge pull request #9167 from JimMoen/1018-sync-release-v44-back-to-main
1018 sync release v44 back to main
2022-10-18 15:03:00 +08:00
JimMoen 8a644bac99 chore: bump app.src and appup.src 2022-10-18 11:28:54 +08:00
JimMoen 39ba167044 chore: refine chanelog 2022-10-18 10:52:23 +08:00
JimMoen bac7b61cfd Merge branch 'release-v44' into 1018-sync-release-v44-back-to-main 2022-10-18 10:44:27 +08:00
Zaiming (Stone) Shi a286932743 docs: split change logs
We will start collecting change logs and release notes using scripts.
2022-10-17 22:48:57 +02:00
Zaiming (Stone) Shi f15845fb00 chore: add code-owners 2022-10-17 22:43:50 +02:00
Zaiming (Stone) Shi e03279cbe3
Merge pull request #9160 from zmstone/1015-sync-releas-v43-back-to-main
1015 sync releas v43 back to main
2022-10-17 15:08:44 +02:00
Zaiming (Stone) Shi 5bc822cc78 chore: delete duplicated module from appup 2022-10-17 12:55:22 +02:00
Zaiming (Stone) Shi 11026b7644 chore: re-generate appup for v4.3.22 2022-10-16 08:43:45 +02:00
Zaiming (Stone) Shi 20e0d14026 chore: bump app versions 2022-10-15 15:01:57 +02:00
Zaiming (Stone) Shi 458b9b2e4b chore: prepare new release version 4.3.22-alpha.1 2022-10-15 15:00:37 +02:00
Zaiming (Stone) Shi 1ba2c01f25 Merge remote-tracking branch 'origin/release-v43' into main-v4.3 2022-10-15 14:58:22 +02:00
Zaiming (Stone) Shi 86da0f548e docs: refine v43 changelogs 2022-10-15 14:57:31 +02:00
Zaiming (Stone) Shi 81b1ea8c55 docs: refine change log text 2022-10-14 21:23:14 +02:00
Zaiming (Stone) Shi 1c5ff35225 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-10-14 15:46:53 +02:00
Zaiming (Stone) Shi 882e13b2a2 chore: change release version to 4.3.21 2022-10-14 15:45:11 +02:00
Zaiming (Stone) Shi 62878e7851 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-10-14 12:10:22 +02:00
Xinyu Liu 265fab8ccf
Merge pull request #9150 from terry-xiaoyu/port_rule_metrics_fix_to_release_v43
fix: reset rule metrics crashed under certain conditions
2022-10-14 16:05:23 +08:00
Shawn 381c56d52f fix: reset rule metrics crashed under certain conditions 2022-10-14 10:50:39 +08:00
Zaiming (Stone) Shi a4401d1fde
Merge pull request #9149 from emqx/1013-chore-sync-main-v43
1013 chore sync main v43
2022-10-13 13:50:20 +02:00
Ilya Averyanov 6c21f8c514
Merge pull request #9144 from savonarola/fix-jwt-auth-relup
fix(jwt): restore legacy emqx_auth_jwt hook interface
2022-10-13 13:29:57 +03:00
Ilya Averyanov 53bc2d9d58 fix(jwt): restore legacy emqx_auth_jwt hook interface 2022-10-13 11:37:50 +03:00
Zaiming (Stone) Shi 198a1ed6cb Merge remote-tracking branch 'origin/main-v4.3' into main-v4.3 2022-10-13 08:54:26 +02:00
Zaiming (Stone) Shi 4db59b4204 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-10-12 21:15:48 +02:00
Zaiming (Stone) Shi 1d36a5c4bd
Merge pull request #9145 from zmstone/1012-upgrade-to-gun-1.3.8
fix: upgrade to gun 1.3.8
2022-10-12 20:54:06 +02:00
Zaiming (Stone) Shi 5bd66b1adf chore: bump to 4.3.21-alpha.3 2022-10-12 18:27:43 +02:00
Zaiming (Stone) Shi c2bc1c82e8 fix: upgrade to gun 1.3.8
fix ssl_pssive message handling
2022-10-12 18:27:09 +02:00
Zaiming (Stone) Shi 5fc34ec636 build: sync apps version check script 2022-10-12 14:42:56 +02:00
JianBo He e8eb0e11ac Merge tag 'v4.3.21-alpha.2' into release-v44 2022-10-12 19:33:39 +08:00
JianBo He d2c86c5eee chore: bump vsn 2022-10-12 19:17:39 +08:00
JianBo He 23643680e0
Merge pull request #9143 from zmstone/1012-fix-remsh-prefix-match-for-rpc-log-mute
fix: remsh prefix may not include an underscore
2022-10-12 19:14:18 +08:00
Zaiming (Stone) Shi e57ab9a8c1 fix: remsh prefix may not include an underscore 2022-10-12 12:42:37 +02:00
Ivan Dyachkov 18db788662
Merge pull request #9134 from emqx/fix-demote-rate-limit-log-level-to-notice
fix: demote rate limit log level to notice
2022-10-12 10:23:59 +02:00
JianBo He 4f11f95c40
Merge pull request #9138 from HJianBo/update-dashboard-vsn-44
chore: update dashboard vsn
2022-10-12 14:21:31 +08:00
JianBo He 7aca9183b8
Merge pull request #9137 from HJianBo/update-dashboard-vsn
chore: update dashboard vsn
2022-10-12 14:21:13 +08:00
JianBo He efda32c945 chore: update dashboard vsn 2022-10-12 11:32:39 +08:00
JianBo He 7fe6bc6094 chore: update dashboard vsn 2022-10-12 11:28:44 +08:00
Zaiming (Stone) Shi 7d24c34db5 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-10-11 22:54:25 +02:00
Zaiming (Stone) Shi cfd1d7eea1 chore(bin/emqx): no need to disable SC2086 2022-10-11 17:41:47 +02:00
Ivan Dyachkov 73d72eacce fix: demote rate limit log level to notice 2022-10-11 13:05:21 +02:00
JimMoen a35782bdc0
Merge pull request #9065 from JimMoen/rule-engine-sql-tests
Parts of Rule Engine RuleSQL tests.
2022-10-11 16:18:37 +08:00
Zaiming (Stone) Shi 124f9795cd
Merge pull request #9091 from zmstone/1003-no-shutdown-logging-to-remote-node-when-rpc
fix(emqx): emqx:shutdown should not log to remote node
2022-10-11 08:12:28 +02:00
JimMoen 7f92c29ada chore: bump appup.src for `emqx_rule_funcs.erl` 2022-10-11 13:45:11 +08:00
JimMoen 3e8c070b59 Revert "fix: rm unused module"
This reverts commit 267946c379.

Revert it temporary, we need fix `scripts/update-appup.sh` later.
It only compares the current release with its predecessor.
2022-10-11 13:44:34 +08:00
JimMoen 5047211950 test: rulesql select fields and select from event message 2022-10-11 13:44:34 +08:00
JimMoen 27e19da066 test(rulesql): num funcs type cases 2022-10-11 13:44:34 +08:00
JimMoen 32376c7cf9 fix(rule_func): refine num funcs error info type unsupported 2022-10-11 11:23:25 +08:00
JimMoen 0a5a0867e4 fix(rule_func): refine `+` error info when type implicit conversion 2022-10-11 11:23:25 +08:00
JimMoen d8a022fb45 fix(test): unstopped test client 2022-10-11 11:23:25 +08:00
JimMoen 267946c379 fix: rm unused module
`emqx_rule_date` was added before [v4.3.15-rc1]
PR: emqx#7894
commit: 8558a62ee2

The change was released in [v4.3.15-rc1] [v4.3.15-rc2]

And unused at [v4.3.15-rc3]
PR: emqx#8044
commit: 4fc5cb2817

We just keep the module from [v4.3.15-rc1] to [v4.3.20] and remove this module in newer version
2022-10-11 11:23:25 +08:00
JimMoen fd7230353c refactor(test): move rule_engine sql test cases into a separate file 2022-10-11 11:23:25 +08:00
JianBo He 58dc0a8913
Merge pull request #9130 from HJianBo/merge-rel-v43-into-v44
Merge release-v43 into release-v44
2022-10-11 11:05:49 +08:00
JianBo He 85aa120b06 Merge branch 'release-v43' into release-v44 2022-10-11 10:24:22 +08:00
JianBo He a1affa94b5
Merge pull request #9045 from HJianBo/enhance-flapping-detect
refactor: enhance the flapping detect accuracy
2022-10-11 10:10:47 +08:00
JimMoen f51e2c7f95
Merge pull request #9124 from JimMoen/sub-acl-warning-log
Sub acl warning log
2022-10-11 10:04:26 +08:00
Thales Macedo Garitezi 341e96b479
Merge pull request #9126 from thalesmg/ci-stop-containers-43
ci(test): stop containers at the beginning of the run
2022-10-10 14:57:39 -03:00
Thales Macedo Garitezi e72e1567a1 ci(test): stop containers at the beginning of the run
An attempt to prevent updated container definitions clashing in CI GH
runners between different branches.

A self-hosted runner only runs a single job at a time.

If a container is already running there, an updated docker compose
file might fail to recreate that container, failing the run.
2022-10-10 14:12:25 -03:00
Zaiming (Stone) Shi edf69cee88 feat: mute emqx shutdown log in rpc calls 2022-10-10 17:57:33 +02:00
Xinyu Liu 9a2300e5b6
Merge pull request #9125 from emqx/cannot_reset_metrics_for_fallback_actions
Cannot reset metrics for fallback actions
2022-10-10 23:29:11 +08:00
Shawn 6d52f908d1 chore: update emqx_rule_engine.appup.src 2022-10-10 17:24:27 +08:00
Shawn 338b11ab95 fix: cannot reset metrics for fallback actions 2022-10-10 17:13:39 +08:00
JimMoen ef04310c27 chore: update CHANGES.md 2022-10-10 16:04:57 +08:00
JimMoen 48d8f7e7a9 fix(channel): add warning log if the acl check of a subscribed topic failed 2022-10-10 16:03:31 +08:00
Zaiming (Stone) Shi 373bd41170
Merge pull request #9122 from emqx/1009-fix-shared-sub-sticky-strategy-when-no-local-subs
1009 fix shared sub sticky strategy when no local subs
2022-10-10 08:55:23 +02:00
Zaiming (Stone) Shi 4989e57ebb
Merge pull request #9119 from emqx/1009-fix-sticky-dispatch-should-check-subscription-table
fix(shared): check sticky if sticky pid is still a member
2022-10-10 08:51:51 +02:00
JianBo He 3d61211ded
Merge pull request #9120 from HJianBo/improving-the-retry-mechnism-plugin
Refactor auth-http plugins to support getting retry_times params
2022-10-10 09:46:58 +08:00
JianBo He 2f178fa8f1
Merge branch 'release-v43' into enhance-flapping-detect 2022-10-10 09:40:49 +08:00
Zaiming (Stone) Shi 4f8a7349bf fix(shared): ensure sticky strategy sticks to the first pick
Prior to this fix, the alive pids are never inserted due to a
missing insert when handing remote pids from mnesia event.
2022-10-09 20:18:33 +02:00
Zaiming (Stone) Shi 7f9886e611 Merge remote-tracking branch 'origin/release-v43' into main-v4.3 2022-10-09 19:40:26 +02:00
JianBo He bc68f60bb5 chore: update appup.src 2022-10-09 17:52:59 +08:00
Zaiming (Stone) Shi 761283f616 docs: update change log 2022-10-09 11:49:11 +02:00
JianBo He 68dd29420d chore: fix duplicated variable name 2022-10-09 17:43:30 +08:00
Zaiming (Stone) Shi b2b05c0077 Merge remote-tracking branch 'origin/release-v43' into 1009-fix-sticky-dispatch-should-check-subscription-table 2022-10-09 11:43:14 +02:00
Zaiming (Stone) Shi 8e8ff08973 fix(shared): check sticky if sticky pid is still a member
Prior to this fix, in case of a subscriber unsubscribes without
disconnect, the sticky dispatch strategy will continue to pick the
old member.
This commit fixes it by checking if the member is still in the
group
2022-10-09 11:31:54 +02:00
JianBo He e5a673376f refactor: support the retry option 2022-10-09 17:27:38 +08:00
Zaiming (Stone) Shi cf5f1fd78c
Merge pull request #9094 from emqx/1004-fix-wildcard-redispatch-for-shared-subs
chore: fix shared subscription redispatch
2022-10-09 10:32:02 +02:00
Zaiming (Stone) Shi f4ae4e67c9 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-10-09 09:33:21 +02:00
Xinyu Liu 505507139e
Merge pull request #9079 from terry-xiaoyu/some_issues_in_rule_engine
Some issues in rule engine
2022-10-09 14:32:39 +08:00
lafirest 7fd760db2c
Merge pull request #9024 from lafirest/test/mqtt_sn
test(mqtt_sn): improve test coverage to 90%
2022-10-09 11:10:30 +08:00
JianBo He 92d5caf908
Merge branch 'main-v4.3' into test/mqtt_sn 2022-10-08 14:28:01 +08:00
Shawn 1bb7c23db1 fix: discard the 'id' field when testing a resource 2022-10-08 10:50:42 +08:00
JianBo He e2b0048e88 refactor(flapping): count flapping event if connecting failed 2022-10-08 10:06:20 +08:00
JianBo He 165842ded4 chore: update changes.md 2022-10-08 09:56:23 +08:00
DDDHuang 13f3dafe22 refactor: enhance the flapping detect accuracy
Count the `flapping` event as long as a client try to connect to server
whatever it suceed or failed. It is more helpful to improve
stablebility.
2022-10-08 09:56:23 +08:00
Ivan Dyachkov 120905403c
Merge pull request #9112 from emqx/chore-portable-script-output-coloring
chore: portable stdout coloring in scripts
2022-10-07 09:57:47 +02:00
Ivan Dyachkov 280668ce13 chore: portable stdout coloring in scripts
BSD's (macos) version of echo does not support -e flag
2022-10-06 11:43:45 +02:00
Zaiming (Stone) Shi fc291c8d5f
Merge pull request #9108 from zmstone/1006-support-additional-checks-before-release-tag
build: support additional checks before cutting a release tag
2022-10-06 11:13:24 +02:00
Zaiming (Stone) Shi 10f1052be5 Merge remote-tracking branch 'origin/release-v43' into main-v4.3 2022-10-06 10:31:01 +02:00
Zaiming (Stone) Shi 206ab125a4 build: support additional checks before cutting a release tag 2022-10-06 09:41:14 +02:00
Zaiming (Stone) Shi f667c174a8
Merge pull request #9092 from zmstone/1004-ensure-emqx_modules-modules-loaded
test: ensure module loaded for ct-slave node before starting apps
2022-10-06 08:29:59 +02:00
Zaiming (Stone) Shi eaeb26a1b4
Merge pull request #9102 from zmstone/1005-chore-sync-some-modules
chore: sync diverged modules modules from ee back to ce
2022-10-06 07:29:18 +02:00
Zaiming (Stone) Shi f24728ee7b chore: sync diverged modules modules from ee back to ce 2022-10-05 14:59:18 -03:00
Zaiming (Stone) Shi a1032db4e1 test: add test case to verify QoS 0 message is never redispatched 2022-10-05 18:07:43 +02:00
Zaiming (Stone) Shi 1270dbff24
Merge pull request #9097 from zmstone/1005-sync-v44-upstreams
1005 sync v44 upstreams
2022-10-05 16:49:19 +02:00
Ivan Dyachkov 1e90ef428f
Merge pull request #9098 from emqx/chore-add-timetrap-for-pgsql-test-cases
chore: add timetrap of 2 mins for pgsql test cases
2022-10-05 16:39:08 +02:00
Zaiming (Stone) Shi d23dfcca39 fix(shared): only re-dispatch QoS1 inflights 2022-10-05 16:03:43 +02:00
Ivan Dyachkov c9ff67a637 chore: add timetrap of 2 mins for pgsql test cases 2022-10-05 15:53:55 +02:00
Ivan Dyachkov 3015befdb1
Merge pull request #9099 from emqx/chore-revert-changes-in-misc
chore: revert double exported pmap after merge
2022-10-05 15:52:52 +02:00
Ivan Dyachkov 09b08d092d chore: revert double exported pmap after merge 2022-10-05 15:10:10 +02:00
Zaiming (Stone) Shi fef42b0d17 Merge remote-tracking branch 'origin/main-v4.3' into 1005-sync-v44-upstreams 2022-10-05 13:40:35 +02:00
Zaiming (Stone) Shi 8d42589bf5 chore: update appup 2022-10-05 13:32:48 +02:00
Zaiming (Stone) Shi 28b1a4e6f1 Merge remote-tracking branch 'origin/release-v44' into 1005-sync-v44-upstreams 2022-10-05 13:02:00 +02:00
Zaiming (Stone) Shi fde012b2ef Merge remote-tracking branch 'origin/release-v43' into main-v4.3 2022-10-05 12:57:21 +02:00
Zaiming (Stone) Shi c8920b5499 Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-10-05 12:55:21 +02:00
Zaiming (Stone) Shi d46393c45c Merge remote-tracking branch 'origin/release-v43' into 1004-fix-wildcard-redispatch-for-shared-subs 2022-10-05 12:42:03 +02:00
Zaiming (Stone) Shi 3339df8b24 test: Add test case to cover shared sub QoS2 pubrel in inflights 2022-10-05 12:38:12 +02:00
Zaiming (Stone) Shi 6769bd4edc fix(shared): drop pubrel from inflight collection before redispatch 2022-10-05 10:30:59 +02:00
Zaiming (Stone) Shi ba1c276c75 fix(typespec): fix type spec for emqx_shared_sub:redispatch_to 2022-10-05 10:04:09 +02:00
Zaiming (Stone) Shi 9989f4df7e chore: fix shared subscription redispatch 2022-10-04 18:15:45 +02:00
Zaiming (Stone) Shi f1a2f354c4 test: ensure module loaded for ct-slave node before starting apps 2022-10-04 13:01:56 +02:00
Zaiming (Stone) Shi 231a553fb7
Merge pull request #9090 from zmstone/1003-allow-ct-slave-to-start-without-join
test: allow starting ct-slave without join cluster
2022-10-04 09:15:28 +02:00
Zaiming (Stone) Shi ea6f2bd8d7 test: allow starting ct-slave without join cluster
This is to test/inspect states before/after join
2022-10-03 22:01:52 +02:00
Zaiming (Stone) Shi bea046d5b0
Merge pull request #9088 from zmstone/1003-fix-more-flaky-test
test: fix more flaky test in share sub SUITE
2022-10-03 18:15:50 +02:00
Zaiming (Stone) Shi 7423646191 test: ensure emqx_modules app is started in ct-slave node 2022-10-03 17:05:35 +02:00
Zaiming (Stone) Shi 2e28d5e73e test: fix more flaky test in share sub SUITE 2022-10-03 13:02:46 +02:00
Zaiming (Stone) Shi c39116c7a5 test: fix bad ct:pal call 2022-10-03 09:22:10 +02:00
Zaiming (Stone) Shi 402553b95a test: fix false one-view check 2022-10-03 09:19:26 +02:00
Zaiming (Stone) Shi 366999ccbb Merge remote-tracking branch 'origin/release-v43' into main-v4.3 2022-10-02 11:25:16 +02:00
Zaiming (Stone) Shi c63b8e79d3
Merge pull request #9084 from emqx/0930-fix-flaky-tests
test: fix flaky shared sub tests
2022-10-01 09:08:26 +02:00
Thales Macedo Garitezi ebf131266a test: fix flaky shared sub test case
the route replication is async, added a function to wait for it
2022-09-30 17:22:58 +02:00
Shawn ab3ec9c176 chore: update the appup.src 2022-09-30 16:32:52 +08:00
Shawn 33e68c9d16 chore: update the CHANGES-4.3.md 2022-09-30 15:55:17 +08:00
Zaiming (Stone) Shi e6112c5095
Merge pull request #9020 from zmstone/0921-build-merge-release-br-back-to-main-asap
build: merge release- branch back to main- branch asap
2022-09-29 14:12:50 +02:00
Zaiming (Stone) Shi 07f0f0a5f8 Merge remote-tracking branch 'origin/release-v43' into 0921-build-merge-release-br-back-to-main-asap 2022-09-29 10:56:45 +02:00
Zaiming (Stone) Shi 747c48c3ce build: merge release- branch back to main- branch asap 2022-09-29 10:48:24 +02:00
Shawn 7d2dd3d37d fix: deny POST an existing resource 2022-09-29 13:41:02 +08:00
Shawn 29c76d16d7 fix: reset rule metrics crash if it has not initialized 2022-09-29 13:40:01 +08:00
Thales Macedo Garitezi a64c0b458f
Merge pull request #9072 from emqx/build-fix-profile-detection-in-packages
build: fix profile detection when building packages
2022-09-28 14:56:23 -03:00
Zaiming (Stone) Shi 92d88202c7
Merge pull request #9071 from zmstone/0928-chore-upgrade-eredis-for-password-safety
chore: upgrade eredist to 1.2.9
2022-09-28 19:04:26 +02:00
Zaiming (Stone) Shi 097d4ef120
docs: Update CHANGES-4.3.md
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2022-09-28 19:03:25 +02:00
Ivan Dyachkov 5c2edaec73 build: fix profile detection when building packages 2022-09-28 18:20:01 +02:00
Zaiming (Stone) Shi 4743bcdd07 docs: update change log v43 2022-09-28 16:47:20 +02:00
Zaiming (Stone) Shi 1c5ac33f16 chore: upgrade eredist to 1.2.9 2022-09-28 16:32:14 +02:00
Thales Macedo Garitezi 61af0831f8
Merge pull request #9070 from thalesmg/merge-rv43-into-rv44-a
Merge rv43 into rv44 a
2022-09-28 11:17:01 -03:00
Thales Macedo Garitezi 954e276124 Merge remote-tracking branch 'origin/release-v43' into merge-rv43-into-rv44-a 2022-09-28 09:46:03 -03:00
Zaiming (Stone) Shi f02b7b3d13
Merge pull request #9063 from zmstone/0927-add-secret-module
feat: add emqx_secret module
2022-09-28 08:40:07 +02:00
Zaiming (Stone) Shi 71b0ab9166
Merge pull request #9061 from zmstone/0927-fix-allow-space-in-path
fix(bin/emqx): allow space in root path
2022-09-28 08:36:54 +02:00
Zaiming (Stone) Shi 046eb727cd
Merge pull request #8996 from zmstone/0917-fix-update-appup-script-usage
build(update-appup.sh): fix usage info
2022-09-27 21:44:21 +02:00
Zaiming (Stone) Shi cd313667c6
Merge pull request #9016 from zmstone/0920-chore-fix-git-diff-exclude-pattern-in-app-version-check-script
build: fix git diff exclude pattern in app version check script
2022-09-27 21:43:35 +02:00
Zaiming (Stone) Shi 527ce097aa feat: add emqx_secret module 2022-09-27 21:18:07 +02:00
Thales Macedo Garitezi 4af3fc88c2
Merge pull request #9049 from thalesmg/test-fix-inter-mongo-flakiness
test: attempt to fix inter-suite flakiness
2022-09-27 09:00:08 -03:00
Thales Macedo Garitezi 21f64a6bbc
Merge pull request #9050 from thalesmg/bugfix-lwt-acl-43
fix(acl): check ACL before publishing last will testament (lwt) message (4.3)
2022-09-27 08:53:04 -03:00
Zaiming (Stone) Shi 159173d261 ci: test zip package with space in its root 2022-09-27 10:02:37 +02:00
Zaiming (Stone) Shi 7e2b08e7d6
Merge pull request #9056 from emqx/sync-43-into-44
chore: sync v4.3 to v4.4
2022-09-27 09:57:44 +02:00
Zaiming (Stone) Shi 4352895e56
Merge pull request #9042 from zmstone/0925-chore-allow-non-strict-semver-for-external-deps
build(update_appup.escript): allow external app non-semver
2022-09-27 08:43:54 +02:00
Zaiming (Stone) Shi a770983882 fix(bin/emqx): allow space in root path
Prior to this fix, space was already allowed in root path
for 'start' 'console' etc. (the boot commands).
However the non-boot commands such as 'ping' still had trouble.
2022-09-27 08:36:25 +02:00
Thales Macedo Garitezi 2e0eae54f8 fix(acl): check ACL before publishing last will testament (lwt) message (4.3) 2022-09-26 15:22:29 -03:00
Ivan Dyachkov 77a45f86cc Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2022-09-26 20:19:23 +02:00
Thales Macedo Garitezi a61c97ed9b test: attempt to reduce inter-testcase flakiness in CI
Ex:

```
=== ERROR! init_per_testcase crashed!
	Location: [{emqx_auth_mongo_SUITE,'-init_mongo_data/0-fun-0-',207},
              {emqx_auth_mongo_SUITE,init_mongo_data,207},
              {emqx_auth_mongo_SUITE,init_per_testcase,177},
              {test_server,do_init_per_testcase,1554},
              {test_server,run_test_case_eval1,1255},
              {test_server,run_test_case_eval,1225}]
	Reason: {{assertMatch,[{module,emqx_auth_mongo_SUITE},
               {line,207},
               {expression,"mongo_api : insert ( Connection , ? MONGO_CL_USER , ? INIT_AUTH )"},
               {pattern,"{ { true , _ } , _ }"},
               {value,{error,timeout}}]},
 [{emqx_auth_mongo_SUITE,'-init_mongo_data/0-fun-0-',1,
                         [{file,"/emqx/apps/emqx_auth_mongo/test/emqx_auth_mongo_SUITE.erl"},
                          {line,207}]},
  {emqx_auth_mongo_SUITE,init_mongo_data,0,
                         [{file,"/emqx/apps/emqx_auth_mongo/test/emqx_auth_mongo_SUITE.erl"},
                          {line,207}]},
  {emqx_auth_mongo_SUITE,init_per_testcase,2,
                         [{file,"/emqx/apps/emqx_auth_mongo/test/emqx_auth_mongo_SUITE.erl"},
                          {line,177}]},
  {test_server,do_init_per_testcase,2,[{file,"test_server.erl"},{line,1554}]},
  {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1255}]},
  {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1225}]}]}
```
2022-09-26 09:13:07 -03:00
Thales Macedo Garitezi 7c4842e6e5 test: attempt to fix inter-suite flakiness
Ex:
https://github.com/emqx/emqx-enterprise/actions/runs/3124750818/jobs/5068407612#step:7:769

```
%%% undefined ==> end_per_suite: FAILED
%%% undefined ==> {{badmatch,{error,enoent}},
 [{emqx_auth_mongo_SUITE,end_per_suite,1,
                         [{file,"/emqx/apps/emqx_auth_mongo/test/emqx_auth_mongo_SUITE.erl"},
                          {line,62}]},
  {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1784}]},
  {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1381}]},
  {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1225}]}]}
Testing lib.emqx_auth_mongo: TEST COMPLETE, 3 ok, 0 failed of 3 test cases
```
2022-09-26 08:57:53 -03:00
lafirest d3f020912e
Merge pull request #8981 from lafirest/v4.4
fix(slow_subs): Fix the unit error of the `deliver_begin_at` timestamp
2022-09-26 18:05:54 +08:00
firest 04c52aa5f4 chore: update CHANGES-4.3.md 2022-09-26 18:00:04 +08:00
firest 1e00345777 chore(emqx_sn): bump version && update appup 2022-09-26 18:00:04 +08:00
firest 0a3c8d035c fix(mqtt_sn): after receiving publish in `idle mode` the gateway may panic
the `emqx_sn_gateway` will return `{keep_state, Timeout}` when received publish in `idle mode`, this is an incorrect format of `gen_statem` state return result, this return will replace the `state data` by the `Timeout`, the fix is to change it to `{keep_state_and_data, Timeout}`
2022-09-26 17:59:35 +08:00
firest 6fd0261915 chore: update emqx appup && CHANGES-4.4.md 2022-09-26 17:32:01 +08:00
firest 9f400eb11d fix(slow_subs): Fix the unit error of the `deliver_begin_at` timestamp
The unit of `deliver_begin_at` is incorrectly used the seconds,
this will cause the `internal` stat type to never working and the `response` type time span error
2022-09-26 17:32:01 +08:00
firest 5b14d7f709 test(mqtt_sn): improve test coverage of `emqx_sn_gateway` 2022-09-26 16:37:33 +08:00
Ivan Dyachkov 63817418d1
Merge pull request #9037 from emqx/build-refactor-reusable-steps-into-actions
build: refactor reusable steps into actions
2022-09-26 08:40:57 +02:00
Zaiming (Stone) Shi 9ca2004333
Merge pull request #9028 from emqx/sync-e43-psk-file
refactor(psk): create the ets table in supervisor process
2022-09-25 16:37:40 +02:00
Zaiming (Stone) Shi 0ac78734bd build(update_appup.escript): allow external app non-semver 2022-09-25 14:19:53 +02:00
Thales Macedo Garitezi dbf3a3cee7
Merge pull request #8994 from thalesmg/mongo-coverage-43
test: increase mongo integration test coverage (4.3)
2022-09-23 13:23:22 -03:00
Ivan Dyachkov b74632b5ba build: refactor reusable steps into actions 2022-09-23 15:46:22 +02:00
JianBo He c05ce82933 refactor(psk): create the ets table in supervisor process 2022-09-23 11:16:31 +08:00
zhongwencool 92356b85f3
Merge pull request #9026 from zhongwencool/sync-back-from-e4.3-to-v4.3
chore: sync from release-e4.3
2022-09-23 07:41:02 +08:00
Thales Macedo Garitezi f94c5ee40a feat(auth_mongo): use `with_timeout` for `query` 2022-09-22 11:28:59 -03:00
Zaiming (Stone) Shi 6246fe3ff4
Merge pull request #9023 from savonarola/release-v43-retainer-sync-e43
chore(retainer): sync retainer from release-e43
2022-09-22 12:30:59 +02:00
zhongwencool 1379f39f26 chore: sync from release-e4.3 2022-09-22 18:02:39 +08:00
zhongwencool 8ad152de4b
Merge pull request #8875 from zhongwencool/invite-hooks
chore: add reboot_hook/shutdown_hook for enterprise
2022-09-22 17:55:42 +08:00
Ilya Averyanov 7a26aae27b chore(retainer): sync retainer from release-e43 2022-09-22 12:42:21 +03:00
firest 502f3e8d5c test(mqtt_sn): improve test coverage to 90% 2022-09-22 17:31:08 +08:00
zhongwencool deca9cc395 chore: update changelog for delayed publish 2022-09-22 16:09:42 +08:00
zhongwencool 9642f25ea0 chore: update changelog 2022-09-22 15:12:31 +08:00
zhongwencool 27983e7df4 chore: update emqx.appup.src 2022-09-22 14:24:59 +08:00
zhongwencool 61d745a230 feat: add emqx_misc:ipv6_probe/2 function 2022-09-22 11:00:16 +08:00
zhongwencool c2f1f1aab8 chore: rename on_xxx_hooks to on_xxx 2022-09-22 10:04:52 +08:00
zhongwencool 362c176d24 chore: update appup.src 2022-09-22 10:02:48 +08:00
zhongwencool 4635d52273 chore: add reboot_hook/shutdown_hook for enterprise 2022-09-22 10:02:00 +08:00
Thales Macedo Garitezi 90995069c6 chore(auth_mongo): bump appup 2022-09-21 14:46:17 -03:00
Thales Macedo Garitezi a60763dfcf test(mongo): attempt to improve test stability 2022-09-21 14:03:44 -03:00
Thales Macedo Garitezi ea8f444bda test(mongo): add more acl tests
With this commit, we reach 100 % coverage over `emqx_acl_mongo`.
2022-09-21 14:03:44 -03:00
Thales Macedo Garitezi 69659caaf8 test(mongo): add more coverage tests
reaching 100% coverage of `emqx_auth_mongo` with this.
2022-09-21 14:03:44 -03:00
Thales Macedo Garitezi 3f02c6b574 feat(mongo): add timeouts and more tests 2022-09-21 14:03:44 -03:00
Thales Macedo Garitezi 83fb479311 chore: port `pmap/nolink_apply` features from master 2022-09-21 14:03:44 -03:00
Zaiming (Stone) Shi 514519da33 docs: Add v4.3.22 in CHANGES-4.3.md 2022-09-21 13:23:26 +02:00
Zaiming (Stone) Shi 0fec2b874e Merge remote-tracking branch 'origin/release-v43' into release-v44 2022-09-21 12:59:44 +02:00
Zaiming (Stone) Shi f0f50b3d3f chore: fix CHANGES-4.3.md 2022-09-21 12:50:49 +02:00
Zaiming (Stone) Shi 66197f26d4 docs: update release note for v4.3.21 2022-09-21 12:35:12 +02:00
Zaiming (Stone) Shi 7c7d204da3
Merge pull request #9003 from zmstone/0917-add-release-script
build: add release cut script
2022-09-21 12:16:20 +02:00
Zaiming (Stone) Shi af504af8b3
Merge pull request #9004 from emqx/chore-port-signing-macos-binaries-from-4.3
chore: port signing of macos binaries functionality from main-v4.3
2022-09-20 21:06:33 +02:00
Zaiming (Stone) Shi 9d00b5b0d6 build(update_appup): red color for error logs 2022-09-20 20:30:38 +02:00
Zaiming (Stone) Shi 097c9cbfa3
Merge pull request #9011 from zmstone/0919-docs-update-changelog
docs: update 4.3 changelog
2022-09-20 20:29:59 +02:00
Zaiming (Stone) Shi 9d99bf8b91 build: add release cut script 2022-09-20 20:20:35 +02:00
Thales Macedo Garitezi 1933954508
Merge pull request #9015 from thalesmg/ci-fix-coveralls-glob-pat
ci(coveralls): fix glob pattern to run coveralls after merge
2022-09-20 15:03:34 -03:00
Zaiming (Stone) Shi bdf78aa1f3 build: fix git diff exclude pattern in app version check script 2022-09-20 19:58:14 +02:00
Thales Macedo Garitezi 86028dae5a ci(coveralls): fix glob pattern to run coveralls after merge 2022-09-20 14:24:53 -03:00
Thales Macedo Garitezi fe0ba87fd0 fix: handle interpolation of unavailable info 2022-09-20 14:15:32 -03:00
Thales Macedo Garitezi d3304d49b5 test: increase mongo integration test coverage (4.3) 2022-09-20 14:15:32 -03:00
Ivan Dyachkov 2aaa7195f2 chore: port signing of macos binaries functionality from main-v4.3 2022-09-20 17:33:42 +02:00
Zaiming (Stone) Shi f63d53e6f5 docs: update 4.3 changelog 2022-09-20 15:05:27 +02:00
Zaiming (Stone) Shi b95d3bd6f8
Merge pull request #9014 from emqx/main-v4.3
Main v4.3 to Main v4.4 sync
2022-09-20 14:37:37 +02:00
William Yang 49d1fb2b99
Merge pull request #9007 from qzhuyan/perf/william/tls-buffer-defaults-2
perf(TLS): set default sndbuf and recbuf to 4K
2022-09-20 08:57:10 +02:00
Zaiming (Stone) Shi 9262f4a862
Merge pull request #8975 from thalesmg/merge-v43-into-v44-h
Merge v43 into v44 h
2022-09-19 23:55:53 +02:00
Zaiming (Stone) Shi bbeeafa315 Merge remote-tracking branch 'origin/main-v4.3' into merge-v43-into-v44-h 2022-09-19 20:47:45 +02:00
Zaiming (Stone) Shi e7acd54645 chore: upgrade lib jose to tag emqx-1.11.3 2022-09-19 20:07:24 +02:00
Zaiming (Stone) Shi 94d96804b1 build(xref): delete xerf exclusion from jose_public_key 2022-09-19 19:43:07 +02:00
William Yang 97fb8c1133 perf(TLS): set default sndbuf and recbuf to 4K
Without using default values, sockets will be opened with OS default
buffer sizes. OS default is set by linux aligning to the host memory
size that large memory has larger OS default.

Now more and more user run EMQX in container which has large OS memory
but the container max memory is limited by cgroup that could be very
small amount compared to the OS total memory size.

To eliminate uncertainty, it is better to have the default value set.
2022-09-19 18:53:43 +02:00
William Yang 91dd2fc97f
Merge pull request #9005 from qzhuyan/perf/william/tls-hibernate-after-idling
perf(TLS): new TLS listener option to hibernate proc after idling
2022-09-19 18:47:21 +02:00
Zaiming (Stone) Shi 0100f210c0 chore: add new relup paths to DB 2022-09-19 15:39:18 +02:00
Zaiming (Stone) Shi 548de20c0b chore: re-generate appup after version bump 2022-09-19 15:33:55 +02:00
Zaiming (Stone) Shi 816b4749db chore: update app versions 2022-09-19 15:14:22 +02:00
Zaiming (Stone) Shi 92e1b13fa7 chore: bump version in Chart files 2022-09-19 15:12:22 +02:00
Thales Macedo Garitezi 485fb5d4f0
Merge pull request #8966 from thalesmg/coveralls-test-report
ci: enable running test cases and cover for main-v4.x
2022-09-19 10:11:32 -03:00
Zaiming (Stone) Shi 044b88b8f7 chore: bump version to 4.4.10-alpha.1 2022-09-19 15:05:21 +02:00
William Yang cdadc8ad44 chore: update appup src 2022-09-19 14:53:41 +02:00
William Yang fae590b957 docs(TLS): update change log 2022-09-19 14:53:38 +02:00
William Yang cb607f760a perf(TLS): hibernate TLS process after 5s 2022-09-19 14:53:36 +02:00
Zaiming (Stone) Shi 51e70df440 Merge remote-tracking branch 'origin/main-v4.3' into 0919-sync-v44 2022-09-19 09:54:00 +02:00
Zaiming (Stone) Shi 130e02a7af Merge remote-tracking branch 'thales/merge-v43-into-v44-h' into 0919-sync-v44 2022-09-19 09:50:45 +02:00
Zaiming (Stone) Shi 35131457c0 Merge remote-tracking branch 'origin/dev/v4.4.9' into main-v4.4 2022-09-19 09:49:13 +02:00
Zaiming (Stone) Shi 68d28fdcdd build(update-appup.sh): fix usage info 2022-09-18 11:32:34 +02:00
Zaiming (Stone) Shi 8b7726df4e
Merge pull request #8985 from zmstone/0915-sync-v4320-to-v43-trunk
0915 sync v4320 to v43 trunk
2022-09-18 11:10:45 +02:00
Zaiming (Stone) Shi e6603548d7 chore: generate appups after bumped new version 2022-09-17 18:50:28 +02:00
Zaiming (Stone) Shi 49d72d24b5 Merge remote-tracking branch 'origin/main-v4.3' into 0915-sync-v4320-to-v43-trunk 2022-09-17 15:34:35 +02:00
Zaiming (Stone) Shi bb2e6858b0 Merge tag 'v4.3.20' into main-v4.3 2022-09-17 14:52:03 +02:00
Thales Macedo Garitezi b7fe87d761 ci: enable running test cases and cover for main-v4.x
An attempt to make Coveralls bot to identify and report coverage
changes in `main-v4.{3,4}`-based PRs.

Currently, `master`-based PRs get their reports correctly.  When one
checks such a report, e.g.: https://coveralls.io/builds/52535695 , it
identifies if coverage increased or decreased relative to the base
branch.

`main-v4.x`-based PRs, however, always seem to report as "first
builds", so it doesn't report if coverage increased or
decreased. E.g.: https://coveralls.io/builds/52541065 .

The reason _could be_ that, currently, `main-v4.x` branches do not
build themselves.  That is, PRs run the test + cover analysis, as
usual, but once they're merged, tests (and thus coverage analysis) do
not run.  And that _could be_ why the tool can't see if coverage
increased or decreased with such PR.
2022-09-16 14:18:03 -03:00
Zaiming (Stone) Shi 9e1d70e0cb
Merge pull request #8987 from zmstone/0916-merge-v4320-to-v449
0916 merge v4320 to v449
2022-09-16 17:14:46 +02:00
Thales Macedo Garitezi 68dadf4ea8 chore: fix xref errors 2022-09-16 09:31:14 -03:00
Zaiming (Stone) Shi 2251ee715e Merge tag 'v4.3.20' into 0915-sync-v4320-to-v43-trunk 2022-09-16 13:40:55 +02:00
Zaiming (Stone) Shi f6558f897f Merge tag 'v4.3.20' into 0916-merge-v4320-to-v449 2022-09-16 13:36:20 +02:00
Zaiming (Stone) Shi 8893801910 chore: bump release version to v4.3.20 2022-09-16 13:33:17 +02:00
Zaiming (Stone) Shi 40a0703bf5 Merge tag 'v4.3.20' into dev/v4.4.9 2022-09-16 13:11:46 +02:00
Zaiming (Stone) Shi ccc47719cd chore: bump Chart versions to 4.3.21 2022-09-16 12:58:02 +02:00
Zaiming (Stone) Shi a01d01ac19 chore: bump release version to 4.3.21 2022-09-16 12:57:20 +02:00
Zaiming (Stone) Shi bfb53b7f24 chore: bump app versions after merged tag v4.3.20 2022-09-16 12:56:51 +02:00
Zaiming (Stone) Shi 3c852098d7 Merge tag 'v4.3.20' into main-v4.3 2022-09-16 12:54:00 +02:00
Zaiming (Stone) Shi bf8e3c5061
Merge pull request #8984 from HJianBo/fix-jwt-error
chore: avoid generating crash logs for hook execution
2022-09-16 12:38:53 +02:00
Zaiming (Stone) Shi 135a9a30d9
Merge pull request #8976 from thalesmg/fix-flaky-mongo-test-43
test: avoid inter-suite flakiness
2022-09-16 12:35:32 +02:00
JianBo He 89ed4a350f chore: avoid generating crash logs for hook execution 2022-09-16 17:53:49 +08:00
Ivan Dyachkov f717cc9d81
Merge pull request #8983 from emqx/build-sign-macos-binaries
Build sign macos binaries
2022-09-16 11:01:26 +02:00
Zaiming (Stone) Shi 399b3f9cf9
Merge pull request #8980 from zhongwencool/fix-dashboard-bind
fix: add ip to dashboard listener_on
2022-09-16 10:52:53 +02:00
Ivan Dyachkov d02f483035 build: fix make clean 2022-09-16 10:22:08 +02:00
Ivan Dyachkov ed34108644 build: sign macos binaries 2022-09-16 10:21:56 +02:00
zhongwencool e4c2715842 fix: add ip to dashboard listener_on 2022-09-16 15:36:17 +08:00
Thales Macedo Garitezi 6204481d71 test: avoid inter-suite flakiness
This test runs most of the time fine in CI.  But, if run alone
locally, will fail consistently because the default `acl.conf` has a
catch-all `{allow, all}` clause.  Probably another suite that runs
before this in CI unloads that and everything seems fine.
2022-09-15 18:08:20 -03:00
Thales Macedo Garitezi 59d178d3b5 chore: update appups 2022-09-15 10:51:26 -03:00
Thales Macedo Garitezi d3c291c4d0 Merge remote-tracking branch 'origin/main-v4.3' into merge-v43-into-v44-h 2022-09-15 10:13:47 -03:00
Zaiming (Stone) Shi f2f14573d3
Merge pull request #8865 from qzhuyan/ci/william/add-xref-escript
Ci/william/add xref escript
2022-09-15 14:16:32 +02:00
Zaiming (Stone) Shi 22862cdfaf
Merge pull request #8970 from zmstone/0915-sync-v4320-to-v449
Sync v4320 to v449
2022-09-15 11:44:13 +02:00
Zaiming (Stone) Shi b5594aea8a chore: bump to v4.4.9-alpha.3 2022-09-15 09:43:50 +02:00
Zaiming (Stone) Shi eba6d33b49 Merge tag 'v4.3.20-alpha.2' into dev/v4.4.9 2022-09-15 09:42:04 +02:00
Zaiming (Stone) Shi a90d289480 chore: update release version to v4.3.20-alpha.2 2022-09-15 09:35:48 +02:00
Zaiming (Stone) Shi 16d2d86d09
Merge pull request #8964 from emqx/0914-do-not-skip-relup-download
build: do not skip downloading relup base package
2022-09-15 09:34:38 +02:00
Zaiming (Stone) Shi 1ec8e1deed
Merge pull request #8939 from zmstone/0909-ci-add-chart-version-check
0909 ci add chart version check
2022-09-15 09:19:01 +02:00
Zaiming (Stone) Shi e3d7ad0fec
Merge pull request #8965 from zmstone/0914-allow-ssh-agent-in-buildx
build: allow passing ssh agent to docker run in buildx.sh
2022-09-15 09:16:04 +02:00
Zaiming (Stone) Shi ab21801449 ci: exclude v4.3.13 for centos8 2022-09-15 09:07:20 +02:00
Zaiming (Stone) Shi 2fbb79f84f build: do not skip downloading relup base package
do not skip downloading only because of curl error
for known missing base packages, we should list them in the script
2022-09-15 09:07:20 +02:00
Zaiming (Stone) Shi 2fdf687099
Merge pull request #8962 from zmstone/0914-merge-dev-v449-back-to-trunk
0914 merge dev v449 back to trunk
2022-09-15 08:41:20 +02:00
Zaiming (Stone) Shi bceafe5094 chore: gitignore .gitconfig.tmp 2022-09-14 20:54:25 +02:00
Zaiming (Stone) Shi 20ddd4557f refactor: no need for the --system flag for buildx.sh 2022-09-14 20:54:25 +02:00
Zaiming (Stone) Shi 30a02c74dc build: allow passing ssh agent to docker run in buildx.sh 2022-09-14 20:54:25 +02:00
Thales Macedo Garitezi 0599393741
Merge pull request #8942 from thalesmg/fix-ignore-dialyzer-pt1-43
chore: fix ignored dialyzer warnings (part 1) (4.3)
2022-09-14 14:56:59 -03:00
Zaiming (Stone) Shi 05129bd919 refactor: rename check scripts to start with 'check-' 2022-09-14 19:32:02 +02:00
Zaiming (Stone) Shi 4ff34e3188 ci: ensure chart version is in sync with the release version 2022-09-14 19:32:02 +02:00
Zaiming (Stone) Shi c005cff7a6 chore: syn scripts from ee back to ce 2022-09-14 15:40:21 +02:00
Zaiming (Stone) Shi e08b7aa218 chore: bump to v4.4.9-alpha.2 2022-09-14 15:00:22 +02:00
Zaiming (Stone) Shi 1ce747fe9d
Merge pull request #8960 from zmstone/0914-add-relup-paths-for-4.4.9
0914 add relup paths for 4.4.9
2022-09-14 14:53:58 +02:00
Zaiming (Stone) Shi 0606a55a03 chore: print warning messages to standard_error 2022-09-14 12:48:13 +02:00
Zaiming (Stone) Shi 62aa9656c4 chore: update emqx.appup.src 2022-09-14 12:40:36 +02:00
Zaiming (Stone) Shi d4fa8567c2 ci: fix relup paths check use a different file for enterprise 2022-09-14 12:40:14 +02:00
Zaiming (Stone) Shi 79719eca6e build: add relup paths for 4.4.9 2022-09-14 12:04:03 +02:00
ieQu1 2990d16544
Merge pull request #8955 from ieQu1/prom-4-3-disable
fix(prometheus): Disable auth for prometheus endpoint
2022-09-14 09:29:37 +02:00
ieQu1 eee1869981 fix(prometheus): Disable auth for prometheus endpoint 2022-09-13 20:27:14 +02:00
Thales Macedo Garitezi 9a184642cf
Merge pull request #8938 from thalesmg/ci-dialyzer-check-43
ci: enable dialyzer checks (4.3)
2022-09-13 09:46:27 -03:00
Thales Macedo Garitezi 6fc7df9c54
Merge pull request #8894 from thalesmg/bugfix-will-msg-authn-43
test: add test case for not publishing will msg when not authorized
2022-09-13 09:46:14 -03:00
JianBo He 5592b1503d
Merge pull request #8908 from HJianBo/using-erlang-system-time
fix(time): replace os:system_time with erlang:system_time
2022-09-13 09:09:54 +08:00
Zaiming (Stone) Shi 14e6aa173d chore: update version number to 4.4.9-alpha.1 2022-09-12 20:38:21 +02:00
Zaiming (Stone) Shi 79369caa68 docs: update CHANGES-4.4.md 2022-09-12 20:36:23 +02:00
Zaiming (Stone) Shi cbcde75da2
Merge pull request #8943 from zmstone/merge-v43-to-v44
Merge v43 to v44
2022-09-12 20:26:23 +02:00
Thales Macedo Garitezi fa6c22b366 chore: update appups 2022-09-12 10:56:35 -03:00
Thales Macedo Garitezi d72ca84af0 chore: fix ignored dialyzer warnings (part 1) (4.3) 2022-09-12 10:56:35 -03:00
Thales Macedo Garitezi 1f5103b390 test: add test case for not publishing will msg when not authorized 2022-09-12 09:04:54 -03:00
Zaiming (Stone) Shi d72275685a chore: bump (ce) emqx_dashboard app version 2022-09-12 10:40:07 +02:00
Zaiming (Stone) Shi 4aa0f4980d chore: re-generate appup updates 2022-09-12 09:45:37 +02:00
Zaiming (Stone) Shi b6f24b3ffe
Merge pull request #8940 from emqx/dev/v4.3.20
Merge dev/v4.3.20 back to main-v4.3
2022-09-12 09:32:42 +02:00
Zaiming (Stone) Shi 1013f221e0 Merge remote-tracking branch 'origin/dev/v4.3.20' into dev/v4.4.9 2022-09-12 09:25:07 +02:00
Zaiming (Stone) Shi 4597344881
Merge pull request #8941 from thalesmg/fix-appup-check-contains-re
ci(fix): fix check for appup coverage
2022-09-11 17:27:38 +02:00
Thales Macedo Garitezi 94afb633f8 chore: update missing appup instructions 2022-09-09 13:37:00 -03:00
Thales Macedo Garitezi 9e122f38b9 ci(fix): fix check for appup coverage
Before:

```elixir
iex(14)> :re.run('4.3.10', "4\\.3\\.[0-4]", [{:capture, :first, :list}])
{:match, ['4.3.1']}
```
2022-09-09 13:21:05 -03:00
Zaiming (Stone) Shi c463569d88 chore: bump versions in Chart 2022-09-09 17:10:39 +02:00
Zaiming (Stone) Shi cecedaccba docs: remove stale changlog 2022-09-09 17:01:50 +02:00
Thales Macedo Garitezi c65fad3014 ci: enable dialyzer checks (4.3) 2022-09-09 10:51:58 -03:00
Zaiming (Stone) Shi 9e4cebd192
Merge pull request #8937 from zmstone/fix-revert-some-dialyzer-changes
fix: revert 'accepted' state of exproto plugin
2022-09-09 15:00:48 +02:00
Zaiming (Stone) Shi 2c54190479 fix: revert 'accepted' state of exproto plugin 2022-09-09 12:27:02 +02:00
zhongwencool 2bd6e253f3
Merge pull request #8927 from terry-xiaoyu/fix_sql_topic_matching_to_null_val
Fix sql topic matching to null val
2022-09-09 14:53:54 +08:00
zhongwencool f2165e3e9b
Merge branch 'main-v4.3' into using-erlang-system-time 2022-09-09 09:57:10 +08:00
zhongwencool 754273f2cb
Merge pull request #8928 from zhongwencool/bump-minirest-0.3.9
chore: bump minirest to 0.3.9 to fix bind output
2022-09-09 09:50:18 +08:00
Zaiming (Stone) Shi 2ef6008599
Merge pull request #8918 from HJianBo/fix-shared-subs-dead-msg-loop
fix(shared-sub): fix dead loop if all subscribers are disconected
2022-09-08 13:25:10 +02:00
Shawn 93d10e63b0 chore: update CHANGES-4.3.md for #8927 2022-09-08 16:53:24 +08:00
zhongwencool 9d1f2c802f chore: bump minirest to 0.3.9 to fix bind output 2022-09-08 16:53:22 +08:00
Shawn b9d75181e5 chore: update emqx_rule_engine.appup.src 2022-09-08 16:38:34 +08:00
Shawn f0cc75d144 fix(sql): topic matching to null values should return false 2022-09-08 16:37:38 +08:00
JianBo He ce5cca438a
Merge branch 'main-v4.3' into fix-shared-subs-dead-msg-loop 2022-09-08 16:18:50 +08:00
JianBo He ced06efab2
Merge branch 'main-v4.3' into using-erlang-system-time 2022-09-08 16:08:40 +08:00
JianBo He 7b4fbfef3b chore: update app.src & appup.src 2022-09-08 15:46:47 +08:00
JianBo He 271112ad68 chore: update changes 2022-09-08 15:46:47 +08:00
JianBo He 0d5c32a706 fix(time): use erlang:system_time/0-1 consistently
Avoid the problem of inaccurate timers caused by mixing
erlang:system_time/0-1 and os:system_time/0-1
2022-09-08 15:46:44 +08:00
zhongwencool 408482392b
Merge pull request #8916 from zhongwencool/dashboard-support-ip-bind
feat: dashboard support bind with specific ip
2022-09-08 14:31:44 +08:00
JianBo He 2440733a6f test: ensure shared messages queued by session 2022-09-08 13:59:23 +08:00
JianBo He 95bc9cd8e0 chore: update changes 2022-09-08 13:59:23 +08:00
JianBo He ecae9b5d40 chore: update appup.src 2022-09-08 13:59:21 +08:00
zhongwencool 4f81a49391 feat: dashboard support bind with specific ip 2022-09-08 09:37:00 +08:00
JianBo He 8ec432481d fix(shared-sub): fix dead loop if all subscribers are disconected
In `broker.shared_dispatch_ack_enabled=true`, if all subscribers seesion are
kept and but connnection gone. the subscribers will reply NACKs if someone shared
delivers reached. However, the shared subscription always pick a subscriber to retry,
even if it has already replied with NACKs.

After this PR, the subscriber replies with an ACK and stores it into mqueue,
instead of replying with a NACK
2022-09-07 17:03:41 +08:00
William Yang 432eae6e55 ci(xref): support emqx-ee profile 2022-09-07 10:22:46 +02:00
lafirest ad31dfff35
Merge pull request #8898 from lafirest/fix/jwt_exp_float
fix(jwt): make jwt support float timestamp claims
2022-09-06 16:09:11 +08:00
firest d5494897c7 fix(jwt): make jwt support float timestamp claims 2022-09-06 11:51:39 +08:00
William Yang 820b60f448 build: add rel to xref deps 2022-09-05 10:56:17 +02:00
Thales Macedo Garitezi e255faabd1
Merge pull request #8868 from thalesmg/merge-v43-into-v44-f
Merge v43 into v44 f
2022-09-02 09:06:46 -03:00
William Yang 9dd5e26ddf ci(xref): handle no_such_module 2022-09-02 10:27:31 +02:00
JianBo He 6417b5f3c4
Merge pull request #8864 from lafirest/changes-4.3
chore: update CHANGES-4.3.md
2022-09-02 16:12:48 +08:00
William Yang fef088220c ci(xref): handle non-existing apps/modules 2022-09-02 10:06:09 +02:00
Thales Macedo Garitezi 9c77dbf168 chore: bump vsns and appups 2022-09-01 16:01:49 -03:00
Thales Macedo Garitezi 87cc57096f Merge remote-tracking branch 'origin/main-v4.3' into merge-v43-into-v44-f 2022-09-01 15:44:08 -03:00
Thales Macedo Garitezi 1ba606f57a
Merge pull request #8855 from thalesmg/fix-dialyzer-v44-a
chore: fix dialyzer errors (v4.4)
2022-09-01 15:04:29 -03:00
Thales Macedo Garitezi ec45427d8e
Merge pull request #8856 from thalesmg/ci-test-case-repo-type
ci: check repo type directly in step
2022-09-01 10:57:55 -03:00
William Yang 8b6b9a0d20 ci(xref): excl release related modules 2022-09-01 11:52:09 +02:00
firest 769374f8a5 chore: update CHANGES-4.3.md 2022-09-01 17:24:45 +08:00
lafirest 168df705fa
Merge pull request #8862 from lafirest/fix/jwt_exp
fix(jwt): support non-integer timestamp claims
2022-09-01 17:09:31 +08:00
firest 884ec15567 fix(jwt): make binary_to_number function support list type 2022-09-01 17:05:39 +08:00
firest a6cf74ea6f chore: fix emqx_auth_jwt appup 2022-09-01 16:52:41 +08:00
firest ddc25fc5c2 fix(jwt): simplify binary_to_number function 2022-09-01 16:27:15 +08:00
firest c999b43144 chore: bump emqx_auth_jwt version && update appup 2022-09-01 15:48:14 +08:00
firest 15c84ba152 fix(jwt): support non-integer timestamp claims 2022-09-01 15:43:32 +08:00
William Yang aee1350b1d ci(xref): remove reqplayq 2022-09-01 08:54:55 +02:00
William Yang eed5a24e40 ci(xref): don't check observer 2022-09-01 08:47:28 +02:00
Thales Macedo Garitezi f95d9ca653 ci: check repo type directly in step 2022-08-31 17:04:45 -03:00
Thales Macedo Garitezi d1ac851bd9 chore: fix dialyzer errors (v4.4) 2022-08-31 16:24:34 -03:00
Thales Macedo Garitezi fd025bc1be
Merge pull request #8845 from thalesmg/merge-v43-into-v44-e
Merge v43 into v44 e
2022-08-31 16:23:15 -03:00
Zaiming (Stone) Shi f3ca2b20ed
Merge pull request #8849 from zmstone/0831-fix-rule-action-update
fix(emqx_rule_engine): fix rule update function
2022-08-31 15:17:03 +01:00
Zaiming (Stone) Shi 51412e25c8 fix(emqx_rule_engine): fix rule update function
Prior to this change, the update of a rule will always try to
initialise the action because the 'enabled' flag is by default 'true'
2022-08-31 15:13:38 +02:00
Zaiming (Stone) Shi 6579519076
Merge pull request #8850 from zmstone/0831-merge-tag-v4.3.19-back-to-main-v4.3
0831 merge tag v4.3.19 back to main v4.3
2022-08-31 10:16:37 +01:00
Zaiming (Stone) Shi 6f28e0eb83 chore: update appup files 2022-08-31 08:07:42 +02:00
Zaiming (Stone) Shi ac6f28dabf chore: bump release version to 4.3.20 2022-08-31 07:53:02 +02:00
Zaiming (Stone) Shi 060fbbbd61 Merge tag 'v4.3.19' into main-v4.3 2022-08-31 07:51:59 +02:00
Thales Macedo Garitezi b4cb256612 chore: bump app vsns and update appups 2022-08-30 18:02:31 -03:00
Thales Macedo Garitezi e05605bef0 Merge remote-tracking branch 'origin/main-v4.3' into merge-v43-into-v44-e 2022-08-30 16:38:14 -03:00
zhongwencool de9e004e18
Merge pull request #8841 from emqx/sync-v4.3.19
Merge 4.3 to 4.4
2022-08-30 23:41:56 +08:00
zhouzb 440f7ce007
Merge branch 'main-v4.4' into sync-v4.3.19 2022-08-30 23:36:41 +08:00
zhouzb 6c18a05b78 chore: fix run_fvt_tests workflow 2022-08-30 23:21:15 +08:00
Rory Z 59c2bbe9ad chore: use minikube instead k3s 2022-08-30 23:21:07 +08:00
zhouzb 89db210b5c chore: bump vsn 2022-08-30 23:20:13 +08:00
zhongwencool e903038521 chore: update mnesia_acl appup.src 2022-08-30 23:20:03 +08:00
zhongwencool 3867229b2d chore: add emqx restart command tip 2022-08-30 23:19:47 +08:00
zhongwencool 0803c74999 chore: add emqx_ctl acl list to show all acls 2022-08-30 23:19:37 +08:00
Zaiming (Stone) Shi 5a5d901968 docs: update CHANGES-4.3.md 2022-08-30 23:18:59 +08:00
Zaiming (Stone) Shi 882ee754e5 fix(emqx): Check Erlang start after su command
When installed from RPM or DEB, In case EMQX in started by root,
the boot script changes user to emqx and then re-enter with the
same args.
Prior to this change, the Erlang start check is done before
su, causing it to be checked twice.
This commit moves the Erlang start check to after th su
2022-08-30 23:18:47 +08:00
zhouzb bd7884309a
Merge pull request #8838 from emqx/release-v4.3.19
chore: bump vsn
2022-08-30 22:29:16 +08:00
zhouzb 8305bc96f0
Merge branch 'main-v4.4' into release-v4.3.19 2022-08-30 22:28:44 +08:00
zhouzb d93d80cb8e chore: fix run_fvt_tests workflow 2022-08-30 22:23:38 +08:00
Rory Z b547ed3f75 chore: use minikube instead k3s 2022-08-30 22:23:38 +08:00
zhouzb 36618576a8
Merge pull request #8834 from Rory-Z/main-v4.3
chore: use minikube instead k3s
2022-08-30 22:18:56 +08:00
zhouzb 7daeeff909 chore: bump vsn 2022-08-30 22:15:38 +08:00
zhouzb 57ef5fcd58
Merge pull request #8833 from tigercl/chore/bump-vsn-4.4
chore: bump vsn
2022-08-30 21:28:44 +08:00
zhouzb 16d32b9f57
Merge pull request #8837 from Rory-Z/main-v4.4
chore: use minikube instead k3s
2022-08-30 21:27:12 +08:00
Rory Z ce5988b195 chore: use minikube instead k3s 2022-08-30 20:52:27 +08:00
zhouzb eaa21b15cf chore: fix run_fvt_tests workflow 2022-08-30 20:36:49 +08:00
Rory Z 48aab7daff chore: use minikube instead k3s 2022-08-30 19:34:24 +08:00
zhouzb 0d900e1276 chore: bump vsn 2022-08-30 17:51:29 +08:00
JianBo He 0b221048dd
Merge pull request #8832 from tigercl/chore/bump-vsn
chore: bump vsn
2022-08-30 17:32:03 +08:00
zhouzb df51af0ce6 chore: bump vsn 2022-08-30 17:27:54 +08:00
zhongwencool 91b0e4147e
Merge pull request #8831 from zhongwencool/improve-cli-msg
Improve cli msg
2022-08-30 16:22:25 +08:00
zhongwencool e4992b8f59 chore: update mnesia_acl appup.src 2022-08-30 15:41:23 +08:00
zhongwencool 9258f5a2aa chore: add emqx restart command tip 2022-08-30 15:04:00 +08:00
zhongwencool 78ec03f23b chore: add emqx_ctl acl list to show all acls 2022-08-30 15:03:21 +08:00
zhongwencool 8e84466f8a
Merge pull request #8824 from zmstone/0829-chore-check-erlang-after-check-user
fix(emqx): Check Erlang start after su command
2022-08-29 22:01:14 +08:00
Thales Macedo Garitezi 66a2423b8f
Merge pull request #8820 from thalesmg/fix-dialyzer-a
chore: fix dialyzer errors
2022-08-29 10:05:26 -03:00
William Yang 5d91deb83e ci: add escript xref check
Check all the released modules
2022-08-29 14:33:48 +02:00
Zaiming (Stone) Shi 886b084a67 docs: update CHANGES-4.3.md 2022-08-29 11:14:41 +02:00
Zaiming (Stone) Shi f6c565fc9e fix(emqx): Check Erlang start after su command
When installed from RPM or DEB, In case EMQX in started by root,
the boot script changes user to emqx and then re-enter with the
same args.
Prior to this change, the Erlang start check is done before
su, causing it to be checked twice.
This commit moves the Erlang start check to after th su
2022-08-29 11:10:05 +02:00
William Yang 8c7bc2ff13
Merge pull request #8683 from qzhuyan/ci/william/4.x-self-hosted
main 4.x use self hosted runner
2022-08-29 09:11:51 +02:00
JianBo He bbf86145cd Merge tag 'v4.3.19-beta.4' into main-v4.4 2022-08-27 13:50:59 +08:00
JianBo He 25ea81adc5
Merge pull request #8819 from thalesmg/merge-v43-into-v44-c
Merge v43 into v44
2022-08-27 13:48:00 +08:00
JianBo He 575f46c72c
Merge pull request #8821 from HJianBo/bump-vsn
chore: bump vsn to 4.3.19-beta.4
2022-08-27 13:47:12 +08:00
JianBo He bed6347b4c chore: bump vsn to 4.3.19-beta.4 2022-08-27 13:44:50 +08:00
Thales Macedo Garitezi 64704c3e13 ci: cache dialyzer PLTs 2022-08-26 16:09:39 -03:00
Thales Macedo Garitezi 977ac04d24 chore: fix dialyzer errors 2022-08-26 16:09:39 -03:00
Thales Macedo Garitezi fd576d18c3 Merge remote-tracking branch 'origin/main-v4.3' into merge-v43-into-v44-c 2022-08-26 13:25:17 -03:00
Thales Macedo Garitezi 8471fb3f9b
Merge pull request #8818 from thalesmg/ci-disable-cross-ee
ci: disable cross build outside ce repo
2022-08-26 13:23:34 -03:00
Thales Macedo Garitezi 6dad8f5926 ci: disable cross build outside ce repo 2022-08-26 11:43:34 -03:00
William Yang f245b34c34 ci: run test cases on self-hosted 2022-08-26 11:54:41 +02:00
William Yang 60ef87a4d4 ci: 4.3 runners 2022-08-26 11:54:41 +02:00
zhongwencool c761461217
Merge pull request #8812 from JimMoen/merge-main-v4.3
Merge main v4.3
2022-08-26 15:01:22 +08:00
JimMoen bb16eb4ec5 Merge remote-tracking branch 'emqx/main-v4.3' into merge-main-v4.3 2022-08-26 14:30:34 +08:00
JimMoen d6ddb85a13
Merge pull request #8807 from JimMoen/fix-exhook-ignore-message-hook
Fix exhook ignore message hook
2022-08-26 12:35:54 +08:00
JimMoen 820e848909 test(exhook): more case for topic filter wildcards/level and different qos 2022-08-26 11:13:44 +08:00
JimMoen 2657b78c44 test(exhook): ExHook message hooks with topic filters 2022-08-26 03:35:00 +08:00
JimMoen b083a1cd2d chore: appup.src and CHANGES.md 2022-08-26 03:35:00 +08:00
JimMoen d0f88b1af9 fix(exhook): ignore hook exection for `no_matched` topic
For message hooks, if the topics do not match, the hook should continue to be executed.
2022-08-26 03:35:00 +08:00
Thales Macedo Garitezi 987bce1c6e
Merge pull request #8810 from thalesmg/ci-fix-system-env-var
ci: pass down `$SYSTEM` for relup base versions escript
2022-08-25 15:27:51 -03:00
Thales Macedo Garitezi 5aa8ff86ff fix: windows relup is not supported 2022-08-25 13:10:51 -03:00
zhongwencool 3a39bde3dd
Merge pull request #8806 from zhongwencool/copy-of-main-v4.3
chore: sync v4.3 to v4.4
2022-08-25 21:40:31 +08:00
Thales Macedo Garitezi f40fcdd036 ci: pass down `$SYSTEM` for relup base versions escript
`relup-base-versions.escript` needs to know the system the package is
being built for to correctly enumerate the base versions for relup.
2022-08-25 10:23:52 -03:00
zhongwencool 26956784ff Merge branch 'main-v4.4' into copy-of-main-v4.3 2022-08-25 17:37:55 +08:00
zhongwencool 074e25f433
Merge pull request #8801 from zhongwencool/improve-warning-default-modules
chore: warning default modules/plugins is working
2022-08-25 14:27:58 +08:00
zhongwencool c20c045812
Merge pull request #8803 from zhongwencool/pin-gun-to-1.3.7
chore: pin gun 1.3.7
2022-08-25 14:07:31 +08:00
zhongwencool 066db0557b chore: pin gun 1.3.7 2022-08-25 12:17:49 +08:00
zhongwencool b732aa5aa2 chore: warning default modules/plugins is working 2022-08-25 11:19:50 +08:00
Thales Macedo Garitezi 268eb59dab
Merge pull request #8795 from thalesmg/flaky-shared-sub-test
test: attempt to fix flaky shared sub test
2022-08-24 10:34:53 -03:00
Thales Macedo Garitezi a1a3f5198a test: attempt to fix flaky shared sub test
```
 %%% emqx_shared_sub_SUITE ==> t_local_fallback: FAILED
%%% emqx_shared_sub_SUITE ==> {{badmatch,[{share,<<"local_foo/bar">>,{ok,1}},
            {share,<<"local_foo/bar">>,{error,no_subscribers}}]},
 [{emqx_shared_sub_SUITE,t_local_fallback,1,
                         [{file,"/emqx/test/emqx_shared_sub_SUITE.erl"},
                          {line,411}]},
  {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
  {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1292}]},
  {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1224}]}]}
```
2022-08-24 09:19:38 -03:00
Thales Macedo Garitezi 4fd62a7ace
Merge pull request #8776 from thalesmg/relup-base-db-44
ci: add relup version db (4.4)
2022-08-24 09:01:48 -03:00
zhongwencool 98e8980513
Merge pull request #8787 from zhongwencool/fix-plugings-ct
fix: fix plugins ct failed on ee
2022-08-24 14:19:43 +08:00
zhongwencool 3abc9f07c6 fix: fix plugins ct failed on ee 2022-08-24 11:47:25 +08:00
Thales Macedo Garitezi c30ba73af1 refactor: store entries as multiple tuples 2022-08-23 17:55:14 -03:00
Thales Macedo Garitezi 81b0844f03 fix: compare parsed versions 2022-08-23 17:49:31 -03:00
Thales Macedo Garitezi c52286a20a refactor: store db as list and rename file to `relup-paths.eterm` 2022-08-23 12:46:07 -03:00
zhongwencool 73403b65e9
Merge pull request #8782 from zhongwencool/sync-v4.3-to-v4.4
chore: sync v4.3 to v4.4
2022-08-23 21:44:14 +08:00
zhongwencool 8d389d9619 Merge branch 'main-v4.4' into sync-v4.3-to-v4.4 2022-08-23 21:42:58 +08:00
zhongwencool 0ed43fe857
Merge pull request #8781 from zhongwencool/bump-v4.3.19-beta.3
chore: bump to e4.3.19.beta.3
2022-08-23 21:41:34 +08:00
zhongwencool 4a1d05b266 chore: bump to e4.3.19.beta.3 2022-08-23 21:39:35 +08:00
Thales Macedo Garitezi e7d42dce49 refactor: remove redundant find usage 2022-08-22 17:45:26 -03:00
Thales Macedo Garitezi 54a6674b08 style: fix indentation 2022-08-22 17:33:24 -03:00
Thales Macedo Garitezi 6f40405242 ci: add relup version db 2022-08-22 17:22:37 -03:00
zhongwencool 9857914235
Merge pull request #8772 from zhongwencool/remove-telemetry-from-ee-default-plugins
fix: remove emqx_telemetry from ee's default plugins
2022-08-22 16:50:10 +08:00
zhongwencool 7ad7658bbc fix: remove emqx_telemetry from ee's default plugins 2022-08-22 15:29:08 +08:00
zhongwencool f8516ed887
Merge pull request #8766 from zhongwencool/copy-of-main-v4.3
chore: sync main-v4.3 to main-v4.4
2022-08-19 23:53:29 +08:00
zhongwencool 7a72e85555 Merge branch 'main-v4.4' into copy-of-main-v4.3 2022-08-19 23:09:31 +08:00
zhongwencool ed99232a8d
Merge pull request #8725 from HJianBo/fix-exhook-exproto-bugs
fix exhook exproto bugs
2022-08-19 23:02:52 +08:00
JianBo He efdde6e107 test(exproto): fix timeout cases 2022-08-19 18:13:59 +08:00
zhongwencool 16d6b35cd8
Merge pull request #8762 from zhongwencool/bump-v4.3.19-beta.2
chore: bump v4.3.19 beta.2
2022-08-19 17:50:46 +08:00
zhongwencool dfd3fca3c2
Merge pull request #8763 from zhongwencool/bump-v4.4.8-beta.2
chore: bump dashboard to v4.4.5/v4.4.15
2022-08-19 17:27:31 +08:00
zhongwencool 8f40d7befd chore: bump dashboard to v4.4.5/v4.4.15 2022-08-19 16:56:20 +08:00
zhongwencool 50f1d241dc chore: bump dashboard to v4.3.10/v4.3.24 2022-08-19 16:54:23 +08:00
zhongwencool e8d495b17b chore: bump to v4.3.19-beta.2 2022-08-19 16:35:20 +08:00
JianBo He f4ad7acd06 chore: update appup.src 2022-08-19 16:03:15 +08:00
JianBo He a66dc7c02b chore: update changes-4.3 2022-08-19 16:03:15 +08:00
JianBo He 5e505fa41c chore: update appup.src 2022-08-19 16:03:15 +08:00
JianBo He 5ba048f787 chore: upgrade grpc-erl to 0.6.7 2022-08-19 16:03:15 +08:00
JianBo He 8186e9e47a chore: close keepalive timeout channel 2022-08-19 16:03:15 +08:00
JianBo He 7d3ea85ef3 fix(exproto): produce disconnected event if kicked 2022-08-19 16:03:15 +08:00
JianBo He 515fd014d3 fix(exproto): fix undefined clientid in client.connect hook 2022-08-19 16:03:15 +08:00
JianBo He 58db1eb5a9 fix(exhook): avoid emqx_exhook_mgnr to force killed due to exceed
supervior shutdown timeout
2022-08-19 16:03:15 +08:00
zhongwencool 49dec82928
Merge pull request #8757 from zhongwencool/copy-of-main-v4.3
sync main-v4.3 to main-v4.4
2022-08-19 14:05:58 +08:00
zhongwencool 940ceb570d Merge branch 'main-v4.4' into copy-of-main-v4.3 2022-08-19 10:53:48 +08:00
Xinyu Liu 70b8f427d8
Merge pull request #8743 from terry-xiaoyu/fix_sql_compare
Fix sql compare to undefined values
2022-08-18 17:33:38 +08:00
Zaiming (Stone) Shi 0dbc07e73f
Merge pull request #8751 from zmstone/0817-ci-fix-slim-build
ci: update OTP version
2022-08-18 07:07:49 +01:00
Zaiming (Stone) Shi b4ea2aefa6 test: export ct callbacks 2022-08-18 08:07:25 +02:00
Zaiming (Stone) Shi da05a2ad30 test: delete unknown plugin 2022-08-18 08:07:25 +02:00
JianBo He 1eadd4f750
Merge pull request #8736 from lafirest/fix/init_jwt
fix(jwt): change `request_jwks` to be called after initialization
2022-08-18 10:19:30 +08:00
Shawn 413612a69d fix: duplicate appup instructions 2022-08-18 09:18:41 +08:00
Zaiming (Stone) Shi f1ad4cb8ca chore: fix emqx_misc ipv6 probe
The new OTP version exports gen_tcp:ipv6_probe/0 which always return
true. So we no longer need the old hacky way to do it.
2022-08-17 23:43:07 +02:00
Zaiming (Stone) Shi a645a88700 ci: skip relup test from 4.3.13 2022-08-17 23:43:07 +02:00
Zaiming (Stone) Shi 10cabddb07 ci: update OTP version 2022-08-17 23:43:07 +02:00
zhongwencool 7fc3f25da1
Merge pull request #8754 from zhongwencool/bump-v4.4.8-beta.1
chore: bump to v4.4.8-beta.1
2022-08-17 23:53:01 +08:00
zhongwencool 32a0aebf77 chore: bump to v4.4.8-beta.1 2022-08-17 23:52:19 +08:00
zhongwencool 71610b01c6
Merge pull request #8752 from zhongwencool/fix-crash-list-listener-bad-json
fix: list_listener crash with invaild json
2022-08-17 23:38:52 +08:00
zhongwencool 8a78c8a2f5 chore: add emqx_app to 4.3.19 2022-08-17 23:37:50 +08:00
zhongwencool a583c221f0 fix: list_listener crash with invaild json 2022-08-17 23:12:51 +08:00
zhongwencool 28859bad7d
Merge pull request #8747 from zmstone/0817-chore-sync-emqx-appup-file
chore: sync ee emqx.appup.src to ce
2022-08-17 23:12:03 +08:00
zhongwencool 89b2f361e1
Merge pull request #8750 from zhongwencool/remove-rebance-plugins
feat(rebalance): remove unannounced plugins from plugin lists
2022-08-17 22:07:38 +08:00
zhongwencool 117348fb85 feat(rebalance): remove unannounced plugins from plugin lists 2022-08-17 22:05:22 +08:00
zhongwencool 46e45615c5
Merge pull request #8748 from zhongwencool/bump-to-v4.3.19-beta.1
chore: bump to v4.3.19-beta.1
2022-08-17 20:28:37 +08:00
zhongwencool 1d43c11e5b chore: bump to v4.3.19-beta.1 2022-08-17 20:27:41 +08:00
Xinyu Liu 88cf427ecc
Merge branch 'main-v4.3' into fix_sql_compare 2022-08-17 18:24:03 +08:00
Shawn e1615e86df chore: update the change log 2022-08-17 18:14:29 +08:00
firest 1bcc58e298 chore: update CHANGES-4.3.md 2022-08-17 17:59:16 +08:00
firest b9d26506a6 chore(jwt): bump version && update appup 2022-08-17 17:55:00 +08:00
firest 719f6cfb2c fix(jwt): change `request_jwks` to be called after initialization
If called in `init/1`, the module-enabled API may have inconsistent state due to timeout
2022-08-17 17:55:00 +08:00
Zaiming (Stone) Shi 2a50daa98b chore: sync ee emqx.appup.src to ce
main-v4.3-enterprise had some ee specific changes added to emqx.erl
having emqx module added to reload even there is no change is OK
so we can simply sync the file from ee to ce
2022-08-17 11:46:32 +02:00
Xinyu Liu f944e74440
Merge pull request #8745 from JimMoen/fix-mqtt-bridge-status
fix(bridge): mqtt bridge worker status idle
2022-08-17 17:27:31 +08:00
Xinyu Liu 29cb80a9df
Merge pull request #8737 from JimMoen/refine-rule-engine-error-log
Refine rule engine error log
2022-08-17 17:26:29 +08:00
zhongwencool d0b2900810
Merge pull request #8746 from zhongwencool/bump-eredis-1.2.8
chore: bump eredis to 1.2.8 to fix reconnect port leak
2022-08-17 17:13:33 +08:00
zhongwencool 58e24c2fde chore: bump eredis to 1.2.8 to fix reconnect port leak 2022-08-17 16:27:52 +08:00
JimMoen 768ab4eacd fix(bridge): mqtt bridge worker status idle 2022-08-17 16:24:39 +08:00
JimMoen 0502be6055 chore(typo): fix typo 2022-08-17 15:36:04 +08:00
JimMoen 4a89dfe362 chore: update CHANGES.md and appup.src
This reverts commit 7af25a82e70845a631be0c8b83ba7f1838d68389.
2022-08-17 11:48:59 +08:00
JimMoen 67ec6e0e66 fix: log RuleId for take action failed 2022-08-17 11:09:58 +08:00
Shawn 582ead1d77 fix: update appup for rule engine 2022-08-16 21:38:57 +08:00
Shawn 4055b20259 fix: sql compare to undefined values 2022-08-16 21:32:24 +08:00
Zaiming (Stone) Shi bffff65df5
Merge pull request #8734 from zmstone/0816-update-retainer-sup
chore: make a no-op change in emqx_retainer_sup
2022-08-16 11:23:45 +01:00
Zaiming (Stone) Shi 0287d6c755
docs: fix comment typo in emqx_retainer_sup.erl
Co-authored-by: ieQu1 <99872536+ieQu1@users.noreply.github.com>
2022-08-16 10:30:05 +02:00
Zaiming (Stone) Shi e01f3a15f9
Merge pull request #8739 from zmstone/0816-move-node-rebalance-and-evacuation-to-ee
chore: move rebalance and eviction code to ee
2022-08-16 08:50:00 +01:00
Zaiming (Stone) Shi 303249e2e8 chore: move rebalance and eviction code to ee 2022-08-16 07:40:16 +02:00
Zaiming (Stone) Shi 93a97e0df2 chore: make a no-op change in emqx_retainer_sup
Just to keep the appup in sync with enterprise edition
2022-08-16 00:56:50 +02:00
Thales Macedo Garitezi a09575a5e6
Merge pull request #8696 from thalesmg/relup-upgrade-44-to-45
feat: enable upgrading release from 4.4.X to 4.5.Y
2022-08-15 10:57:07 -03:00
lafirest 68487fb17f
Merge pull request #8625 from lafirest/fix/connect_event
fix(channel): Adjust the timing of the client.connected event
2022-08-15 15:32:18 +08:00
firest b02a3b9429 fix(channel): Adjust the timing of the `client.connected` event 2022-08-15 14:10:19 +08:00
zhongwencool b88d4a61b1
Merge pull request #8694 from zhongwencool/fix-bad-default-plugins
fix: bad default plugins
2022-08-15 10:12:42 +08:00
zhongwencool e6a98524b5 chore: improve retainer ct init between ce and ee 2022-08-15 09:42:21 +08:00
zhongwencool 698b1b6df6 fix: different default plugins start between ee and ce 2022-08-15 09:32:25 +08:00
Ilya Averyanov 5c45418a87
Merge pull request #8597 from savonarola/node-rebalance
feat(node_rebalance): implement node evacuation and rebalancing
2022-08-14 11:02:29 +03:00
Zaiming (Stone) Shi 9435b6aa82
docs: Update CHANGES-4.3.md 2022-08-13 14:07:55 +02:00
Ilya Averyanov a19fbe214f feat(node_rebalance): implement node evacuation and rebalancing 2022-08-13 11:32:14 +03:00
Thales Macedo Garitezi fc9e802b26 chore: bump release version, app vsns, appups 2022-08-12 13:41:52 -03:00
Ilya Averyanov 9064b5acb8 chore(ci): make apps-version-check.sh accept new apps 2022-08-12 17:44:26 +03:00
Zaiming (Stone) Shi 767bbec8e9 Merge tag 'v4.3.18' into main-v4.3 2022-08-12 16:29:40 +02:00
Thales Macedo Garitezi 98da31e8b2 feat: enable importing backup json for 4.5 2022-08-12 11:15:58 -03:00
Thales Macedo Garitezi efef052ec7 feat: enable upgrading release from 4.4.X to 4.5.Y
When upgrading from 4.4.X, the `install_upgrade` script from 4.4.X
is used, which forbids such transition.
2022-08-12 11:15:58 -03:00
Thales Macedo Garitezi 7b887078c7
Merge pull request #8713 from emqx/dev/v4.4.7
merge `v4.4.7` tag back into `main-v4.4`
2022-08-12 11:14:55 -03:00
zhouzb 2af895e579
Merge pull request #8703 from tigercl/chore/bump-vsn-4.4
chore: bump vsn to 4.4.7
2022-08-12 10:53:19 +08:00
zhouzb 63f1499687
Merge pull request #8702 from tigercl/chore/bump-vsn
chore: bump vsn to 4.3.18
2022-08-12 10:53:11 +08:00
zhouzb a6ff730aa8 chore: bump vsn to 4.4.7 2022-08-12 10:43:06 +08:00
zhouzb 2ef8a985b3 chore: bump vsn to 4.3.18 2022-08-12 10:41:05 +08:00
Zaiming (Stone) Shi 718eaa94a7
Merge pull request #8691 from zmstone/0811-no-crash-dump-when-trying-to-start-erl
0811 no crash dump when checking erl start
2022-08-11 15:53:05 +01:00
Zaiming (Stone) Shi 4531703d14 refactor(bin/emqx): move file permission fix out from check_erlang_start 2022-08-11 16:30:18 +02:00
Zaiming (Stone) Shi 3a917605f5 fix(bin/emqx): avoid creating crash dump file when checking erlang 2022-08-11 16:30:18 +02:00
Zaiming (Stone) Shi 0a6a01463e
Merge pull request #8689 from zmstone/0811-fix-missing-function-in-bin-emqx
fix: add the 'die' function in bin/emqx
2022-08-11 08:41:50 +01:00
Zaiming (Stone) Shi 6a0d2c9d46 fix: add the 'die' function in bin/emqx 2022-08-11 08:25:37 +02:00
William Yang 962f5c9016
Merge pull request #8682 from qzhuyan/dev/william/bump-relup-helper-2.1.0
build: bump relup helper to 2.1.0
2022-08-10 17:50:37 +02:00
zhongwencool 9a1beb1148
Merge pull request #8668 from zhongwencool/add-trace-detail-api
feat: add GET /trace/:name/detail HTTP API
2022-08-10 23:16:33 +08:00
William Yang dd5eea5ada build: bump relup helper to 2.1.0 2022-08-10 14:34:35 +02:00
Zaiming (Stone) Shi 418db4a9d6
Merge pull request #8680 from emqx/dev/v4.4.7
sync dev/v4.4.7 to  main-v4.4
2022-08-10 13:29:01 +01:00
Zaiming (Stone) Shi 4ca487af35
Merge pull request #8671 from zmstone/0809-add-tzdata-package-to-alpine
chore: add tzdata to alpine docker image
2022-08-10 12:38:55 +01:00
JianBo He 3e0f9b3881
Merge pull request #8628 from HJianBo/start-idle-checking-timer
Fix(exproto): start idle timer to avoid client leaking
2022-08-10 17:03:18 +08:00
Zaiming (Stone) Shi afed5546ea
Merge pull request #8669 from zmstone/0809-revert-app-desc
chore: revert EMQX to EMQ X in emqx app desc
2022-08-10 09:20:58 +01:00
zhongwencool 0951e1b409 Merge branch 'add-trace-detail-api' of https://github.com/zhongwencool/emqx into add-trace-detail-api 2022-08-10 15:29:31 +08:00
zhongwencool 0a98071068 Merge branch 'add-trace-detail-api' of https://github.com/zhongwencool/emqx into add-trace-detail-api 2022-08-10 15:29:08 +08:00
Zaiming (Stone) Shi e7f8e00aa4 ci: remove -S option for env 2022-08-10 09:01:39 +02:00
zhouzb ce0ad7bbbe
Merge pull request #8678 from tigercl/chore/bump-vsn
chore: change vsn to 4.4.7-beta.1
2022-08-10 14:56:57 +08:00
zhouzb 8c08a37458 chore: change vsn to 4.4.7-beta.1 2022-08-10 14:50:14 +08:00
zhongwencool cde2812005 Merge branch 'add-trace-detail-api' of https://github.com/zhongwencool/emqx into add-trace-detail-api 2022-08-10 11:45:22 +08:00
zhongwencool e59f542afd test: add more debug info for t_trace_file_detail ct 2022-08-10 11:45:02 +08:00
zhouzb fe453c1dd6
Merge pull request #8675 from Rory-Z/chore/update-latest
ci: cancel latest tag for docker image
2022-08-10 09:59:12 +08:00
Rory Z 6630fe6318 ci: cancel latest tag for docker image
only EMQX 5.0 image can update latest tag
2022-08-10 09:54:23 +08:00
Zaiming (Stone) Shi 20d6a53fa1 chore: add changelog for tzdata addition in alpine image 2022-08-09 13:23:22 +02:00
Zaiming (Stone) Shi c93dbf7624 chore: add tzdata to alpine docker image 2022-08-09 13:21:39 +02:00
zhongwencool e239d1a303
Merge branch 'main-v4.4' into add-trace-detail-api 2022-08-09 17:08:25 +08:00
Zaiming (Stone) Shi 56a0a19807
Merge pull request #8654 from zmstone/0804-chore-improve-lwm2m-object-id-error
fix(lwm2m): improve error logging for bad lwm2m requests
2022-08-09 10:05:12 +01:00
zhongwencool 6b8d5e10de chore: update emqx_modules version 2022-08-09 17:02:57 +08:00
Zaiming (Stone) Shi 15b97ec78e chore: revert EMQX to EMQ X in emqx app desc 2022-08-09 10:28:55 +02:00
zhongwencool 4e362d2d0a feat: add GET /trace/:name/detail HTTP API 2022-08-09 16:09:58 +08:00
zhongwencool 19792bc2d0
Merge pull request #8660 from zhongwencool/enabled-default-modules
fix: enable emqx_mod_module if default_plugins
2022-08-09 14:17:31 +08:00
zhongwencool e9a5c4295c fix: bad NeedToLoad plugins 2022-08-09 10:29:17 +08:00
zhongwencool 25228ed248 test: fix compile warning 2022-08-09 09:37:05 +08:00
zhongwencool 50bb5a4f5a fix: emqx version is 4.3.19 2022-08-09 09:36:33 +08:00
zhongwencool 2443c06810
Merge pull request #8659 from zhongwencool/fix-trace-disable-return-enoent
fix: check if trace is enabled when the file is not found
2022-08-09 09:13:31 +08:00
zhongwencool b8a2b8f4f4
Merge pull request #8655 from zhongwencool/fix-auth-user-count-error
fix: support custom count function
2022-08-09 09:12:58 +08:00
Zaiming (Stone) Shi 16edf61b50
Merge pull request #8665 from zmstone/chore-sync-dev/v4.3.18-todev/v4.4.7
Chore sync dev/v4.3.18 to dev/v4.4.7
2022-08-08 17:35:18 +01:00
Zaiming (Stone) Shi eca211373f Merge remote-tracking branch 'origin/dev/v4.3.18' into dev/v4.4.7 2022-08-08 16:39:09 +02:00
zhongwencool 8dd966e8ef fix: enable emqx_mod_module if default_plugins 2022-08-08 16:48:51 +08:00
zhongwencool 9b10aefd80 chore: update changelog and appup.src 2022-08-08 14:24:04 +08:00
zhongwencool 2740c80b20 fix: check if trace is enabled when the file is not found 2022-08-08 11:59:26 +08:00
zhongwencool 4869c94e97 chore: replace / with _ in match_spec 2022-08-08 10:25:01 +08:00
zhongwencool f2a248d83f
chore: update CHANGES-4.3.md
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2022-08-08 09:35:26 +08:00
Zaiming (Stone) Shi 5ff864af15 docs: update CHANGES-4.3.md 2022-08-05 15:48:24 +02:00
Zaiming (Stone) Shi ccb51265b8 chore: prepare for 4.3.18-beta.1 release 2022-08-05 11:41:21 +02:00
Zaiming (Stone) Shi f943892fa8 docs: update changelog for SSL gc 2022-08-05 11:41:00 +02:00
zhongwencool 43e1087e13 test: add auth_mnesia count test 2022-08-05 11:34:04 +08:00
zhongwencool f97820f913 test: add auth_mnesia count test 2022-08-05 11:07:16 +08:00
zhongwencool 1d9ee25c92 fix: support custom count function 2022-08-05 10:33:57 +08:00
Zaiming (Stone) Shi 6a1a784ee1
Merge pull request #8641 from Rory-Z/chore/fix-helm-error
ci: fix helm version error
2022-08-04 22:01:11 +01:00
Zaiming (Stone) Shi 683bec16a3
Merge pull request #8436 from zmstone/0706-ci-use-new-lux-image
0706 ci use new lux image
2022-08-04 22:00:34 +01:00
Zaiming (Stone) Shi 616a2235f2 fix(lwm2m): improve error logging for bad lwm2m requests 2022-08-04 19:14:53 +02:00
Thales Macedo Garitezi 0155b4209e
Merge pull request #8649 from thalesmg/esockd-tls-gc-43
feat: add option to gc after TLS/SSL handshake (4.3)
2022-08-04 13:45:59 -03:00
William Yang f2a9f1b81e
Merge pull request #8653 from qzhuyan/fix/william/use-otp-matching-boot-file
fix(upgrade): ensure use correct no_dot_erlang.boot
2022-08-04 17:09:01 +02:00
William Yang a88c42cf82 fix(upgrade): ensure use correct no_dot_erlang.boot 2022-08-04 15:42:19 +02:00
Thales Macedo Garitezi 5e9462afc8 feat: add option to gc after TLS/SSL handshake (4.3)
Port of https://github.com/emqx/emqx/pull/8637
2022-08-04 08:51:50 -03:00
Zaiming (Stone) Shi 5a9e8a23b3
Merge pull request #8652 from thalesmg/fix-env-flag
fix: rm non-portable `env` option
2022-08-04 06:35:57 +01:00
Thales Macedo Garitezi c533f58ee5 fix: rm non-portable `env` option
On some systems, like `centos7`, `env` does not have a `-S` option.
2022-08-03 17:47:11 -03:00
Zaiming (Stone) Shi 6d1bb20eca ci: update rux match pattern for emqtt_bench outputs 2022-08-03 16:46:10 +02:00
Zaiming (Stone) Shi ef1b7e97bf ci: use lux from emqx-builder/4.4-19:24.1.5-3-ubuntu20.04 2022-08-03 15:33:16 +02:00
Zaiming (Stone) Shi 1c56b70d05
Merge pull request #8648 from zmstone/0803-sync-v4.3-to-v4.4
sync v4.3 to v4.4
2022-08-03 14:32:24 +01:00
Zaiming (Stone) Shi b19298b2d9 chore: update chart version 2022-08-03 15:23:10 +02:00
Zaiming (Stone) Shi 07afc26927 ci: remove macOS 10 2022-08-03 14:35:41 +02:00
Zaiming (Stone) Shi db979f7b48 chore: update release version and appups prepare for new version 4.4.7 2022-08-03 13:41:11 +02:00
Zaiming (Stone) Shi f47d952d82 Merge main-4.3 to 0803-sync-v4.3-to-v4.4 2022-08-03 13:41:11 +02:00
Zaiming (Stone) Shi df6303d793
Merge pull request #8646 from zmstone/0803-build-fix-relup-overwrite-escript
build: fix relup app overwrite escript
2022-08-03 10:34:20 +01:00
Zaiming (Stone) Shi ddd6f066e4 chore: run escript in compile mode 2022-08-03 10:41:45 +02:00
Zaiming (Stone) Shi e74a97013e build: fix relup app overwrite escript
the rel file name is always emqx.rel, has nothing to do with profile
2022-08-03 10:01:20 +02:00
JianBo He ec5c0816f7 chore: update app.src & appup.src 2022-08-03 14:01:01 +08:00
JianBo He 9e2987034b chore(exproto): start idle timer for udp clients 2022-08-03 13:58:48 +08:00
Rory Z 9d71aff5d3 ci: fix helm version error 2022-08-03 10:16:16 +08:00
zhouzb 763f0a852d
Merge pull request #8639 from tigercl/chore/vsn
chore: update vsn for helm chart
2022-08-03 10:04:10 +08:00
zhouzb 29df428052 chore: update vsn for helm chart 2022-08-03 10:01:08 +08:00
Zaiming (Stone) Shi 7805513130
Merge pull request #8636 from zmstone/0802-docs-update-4.3-changelog
docs: update changes made for v4.3.18
2022-08-02 20:38:21 +01:00
Zaiming (Stone) Shi 901d6909f5 chore: ensure enqx_dashboard app version bump 2022-08-02 19:49:01 +02:00
Zaiming (Stone) Shi 744af708f1 chore: update appup files for 4.3.18 2022-08-02 15:58:04 +02:00
Zaiming (Stone) Shi 1b9ce77d7d chore: bump release version to 4.3.18 2022-08-02 15:50:49 +02:00
Zaiming (Stone) Shi a3c6c9125e docs: update changes made for v4.3.18 2022-08-02 15:26:49 +02:00
Zaiming (Stone) Shi a162196719
Merge pull request #8511 from qzhuyan/ci/william/4.3-new-otp-23.3
[WIP] ci: [4.3 only] release with OTP 23.3
2022-08-02 13:28:41 +01:00
Zaiming (Stone) Shi 3cd513d74e
Merge pull request #8553 from zmstone/0722-add-ssl-debug
feat: make possible to debug ssl handshake
2022-08-02 12:07:16 +01:00
William Yang 0d1b26cabf ci(linux): disable 23.2.7.2-emqx-3 2022-08-02 10:01:54 +02:00
William Yang 874d308334 build: docker build from otp-23.3 2022-08-02 09:59:59 +02:00
William Yang 19d36fbf14 ci: assert no restart_emulator in relup 2022-08-02 09:59:33 +02:00
William Yang 8835296c7a ci(rel): intro. rel_otp_apps.eterm 2022-08-02 09:59:33 +02:00
William Yang b17078b93f fix(otp23.3): OTP app overwrites support emqx-edge 2022-08-02 09:59:33 +02:00
William Yang c9c1dfb823 fix(upgrade): ensure files in BINDIR executable
During upgrade procedure, emqx zip file is repacked to .tar.gz but does not
preserve permission of files.

This commit ensure files under BINDIR is executable
2022-08-02 09:59:33 +02:00
William Yang 08033a82e8 build(relup): restore emqx.rel backups after rebar relup 2022-08-02 09:59:33 +02:00
zhouzb 071998a423
Merge pull request #8629 from emqx/main-v4.3
Sync 4.3 to 4.4
2022-08-02 10:58:18 +08:00
zhouzb 12bc3da560
Merge pull request #8619 from Rory-Z/chore/fix-helm-error
ci: fix push helm repo error
2022-08-02 10:56:43 +08:00
Rory Z bb7575f5d6 ci: fix push helm repo error 2022-08-01 10:59:50 +08:00
zhouzb b2c8f7d1ce
Merge pull request #8615 from tigercl/chore/dashboard-vsn
chore: update dashboard vsn
2022-07-30 12:30:51 +08:00
zhouzb d2dda69729 chore: update dashboard vsn 2022-07-30 12:29:36 +08:00
zhouzb 499e794a59
Merge pull request #8614 from emqx/main-v4.3
Sync 4.3 to 4.4
2022-07-30 12:25:15 +08:00
zhouzb f55aaf3a39
Merge pull request #8613 from tigercl/chore/dashboard-vsn
chore: update dashboard vsn
2022-07-30 12:21:26 +08:00
zhouzb 3a62935205 chore: update dashboard vsn 2022-07-30 12:18:55 +08:00
zhouzb 9110d0d271
Merge pull request #8609 from emqx/sync-4.3
chore: sync v4.3 to v4.4
2022-07-29 20:59:45 +08:00
zhouzb 633f22cda9
Merge branch 'main-v4.4' into sync-4.3 2022-07-29 20:59:23 +08:00
JianBo He 84154f0a24
Merge pull request #8606 from HJianBo/docs-for-quick-false
chore: add docs for false_quick_deny
2022-07-29 17:15:09 +08:00
JianBo He e315f1a146 chore: add docs for false_quick_deny 2022-07-29 17:11:36 +08:00
zhongwencool 32d7cd99dc
Merge pull request #8605 from zhongwencool/bump-v4.4.6
chore: bump to 4.4.6
2022-07-29 15:14:33 +08:00
zhongwencool 6352b381b6
Merge pull request #8604 from zhongwencool/bump-4.3.17
chore: bump to 4.3.17
2022-07-29 15:14:11 +08:00
zhongwencool 0ba6ab7feb chore: bump to 4.4.6 2022-07-29 15:00:50 +08:00
zhongwencool b5b6e036f3 chore: bump to 4.3.17 2022-07-29 14:58:03 +08:00
zhouzb 5e61f895b6
Merge pull request #8600 from Rory-Z/chore/update-helm
ci: use action to update helm repo
2022-07-29 13:55:10 +08:00
Rory Z dafa4d63cb ci: use action to update helm repo 2022-07-29 10:29:03 +08:00
zhongwencool 938607baca
Merge pull request #8587 from emqx/main-v4.3
chore: sync v4.3 to v4.4
2022-07-28 08:30:28 +08:00
JianBo He 836b988b91
Merge pull request #8575 from HJianBo/fix-exproto-on-udp
Fix(exproto): refine keepalive timer checking
2022-07-27 14:23:52 +08:00
JianBo He 448ae41a64 chore: update changes 2022-07-27 09:58:27 +08:00
JianBo He a5bf1a3b2d chore(exproto): update app.src & appup.src 2022-07-27 09:38:46 +08:00
JianBo He c188eeb1d9 fix(exproto): refine keepalive timer checking 2022-07-27 09:36:18 +08:00
JianBo He db26956f3e feat(exproto): keeping client information up to date 2022-07-27 09:36:18 +08:00
ieQu1 f23134d52a
Merge pull request #8539 from ieQu1/shared-sub-test-timeout
test(shared_sub): Increase timeout
2022-07-26 15:57:00 +02:00
ieQu1 b042498b3c
test(shared_sub): Apply remarks
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2022-07-26 15:25:01 +02:00
ieQu1 0982e8e7fd test(shared_sub): Fix gen_rpc setup 2022-07-26 15:15:25 +02:00
zhongwencool 955e92cba1
Merge pull request #8573 from zhongwencool/copy-of-main-v4.4
sync main-v4.3 to main-v4.4
2022-07-26 17:04:42 +08:00
zhongwencool 778260f245 Merge branch 'main-v4.3' into copy-of-main-v4.4 2022-07-26 17:03:48 +08:00
zhongwencool 93010e83d1
Merge pull request #8574 from zhongwencool/bump-v4.3.17-beta.4
chore: bump to v4.3.17.beta.4
2022-07-26 17:01:44 +08:00
zhongwencool 26cae49e4a chore: bump to v4.3.17.beta.4 2022-07-26 17:00:46 +08:00
ieQu1 1a2a8f017c test(shared_sub): Increase timeout 2022-07-26 10:37:40 +02:00
zhongwencool 0e8888716d Merge branch 'main-v4.3' into copy-of-main-v4.4 2022-07-26 15:48:06 +08:00
zhongwencool 489e4fcd74
Merge pull request #8572 from zhongwencool/query-sort-order
fix: duplicate rule when query by page
2022-07-26 15:44:43 +08:00
zhongwencool 91a7022e83 fix: duplicate rule when query by page 2022-07-26 11:13:29 +08:00
zhongwencool b7bcb9ea11
Merge pull request #8558 from zhongwencool/note-include-conf-check-result
chore: conf check cli notes include conf result
2022-07-25 17:28:08 +08:00
zhongwencool 3df4c8c57e chore: conf check cli notes include conf result 2022-07-25 16:57:53 +08:00
zhongwencool 9c41ddaf3b
Merge pull request #8529 from ieQu1/copy-of-main-4.3
Sync 4.3 changes
2022-07-25 09:41:39 +08:00
zhongwencool 60e0b64434 fix: emqx.appup.src format 2022-07-25 08:54:33 +08:00
zhongwencool 56eedf0c9d Merge branch 'main-v4.3' into copy-of-main-4.3 2022-07-25 08:47:25 +08:00
zhongwencool 4dcbb87be2
Merge pull request #8557 from zhongwencool/bump-v4.4.6-beta.3
chore: update version to beta.3
2022-07-25 08:38:28 +08:00
zhongwencool c88badfa97
Merge pull request #8556 from zhongwencool/bump-v4.3.17-beta.3
chore: update version to beta.3
2022-07-25 08:29:16 +08:00
zhongwencool 81be04456b chore: update version to beta.3 2022-07-25 07:48:23 +08:00
zhongwencool a43482807f chore: update version to beta.3 2022-07-25 07:45:27 +08:00
zhongwencool 181af6f2f2
Merge pull request #8548 from DDDHuang/better_re_log
chore: better rewrite load log. do not show re code; loop log rewrite…
2022-07-25 07:30:02 +08:00
William Yang 3655ea050c build(relup): overwrite OTP vers of upgrade bases 2022-07-23 00:46:47 +02:00
Ilya Averyanov 9c39860280
Merge pull request #8540 from savonarola/fix-lua-hooks
fix on_message_publish lua hook
2022-07-22 19:50:32 +03:00
Zaiming (Stone) Shi 935e6e2f36 feat: make possible to debug ssl handshake 2022-07-22 15:00:23 +02:00
DDDHuang b1672a8352 chore: better rewrite load log. do not show re code; loop log rewrite rule info 2022-07-22 16:19:26 +08:00
Ilya Averyanov afbb3f295b fix(lua_hooks): fix on_message_publish lua hook 2022-07-21 13:52:52 +03:00
ieQu1 276c735b2c chore: Update emqx.appup.src 2022-07-20 23:30:03 +02:00
ieQu1 1c441e43af
Merge branch 'main-v4.4' into copy-of-main-4.3 2022-07-20 23:22:17 +02:00
ieQu1 07f0aee96e
Merge pull request #8527 from emqx/shared-sub-dont-redispatch-on-takeover
fix(shared_session): Don't redispatch inflight messages on takeover
2022-07-20 21:05:27 +02:00
ieQu1 e7c117ef19 fix(shared_session): Don't redispatch inflight messages on takeover 2022-07-20 16:54:42 +02:00
Xinyu Liu 44ea4696a2
Merge pull request #8524 from emqx/copy-of_main-v4.3
merge v4.3 -> v4.4
2022-07-20 21:31:01 +08:00
Xinyu Liu 84c2aceba9
Merge branch 'main-v4.4' into copy-of_main-v4.3 2022-07-20 21:29:49 +08:00
Xinyu Liu 0e4b05cb9b
Merge pull request #8523 from terry-xiaoyu/release_4.3.17-beta.2
chore: release v4.3.17-beta.2
2022-07-20 21:21:11 +08:00
Shawn fd86206461 chore: release v4.3.17-beta.2 2022-07-20 21:19:54 +08:00
Xinyu Liu b30cc6a2a6
Merge pull request #8512 from terry-xiaoyu/binary_file_validator
fix: add type binary_file to emqx_rule_validator
2022-07-20 21:17:28 +08:00
Xinyu Liu f9d174feea
Merge pull request #8448 from HJianBo/changes-restart-strategy
Change the emqx_broker_sup restarting strategy
2022-07-20 21:16:27 +08:00
Xinyu Liu befde373c8
Merge branch 'main-v4.3' into changes-restart-strategy 2022-07-20 21:11:06 +08:00
ieQu1 e36bc96028
Merge pull request #8522 from ieQu1/dispatch-shared-sub-over-gen-rpc
fix(shared_sub): Use gen_rpc to send shared_sub payloads
2022-07-20 15:06:12 +02:00
ieQu1 8e418cdc6b fix(shared_sub): Use gen_rpc to send shared_sub payloads 2022-07-20 14:44:24 +02:00
William Yang abbb2e2ec7 build: otp23.2 is marked in package name 2022-07-20 13:32:49 +02:00
Xinyu Liu f19ca3db7d
Merge pull request #8515 from terry-xiaoyu/builder-4.4-18
chore: update emqx-builder to 4.4-18
2022-07-20 16:31:11 +08:00
William Yang 80727065ba ci: [4.3 only] release with OTP 23.3
rpm/deb: build packages with two tracks: 23.2 and 23.3
    - Track 1: Add 23.3, bring in fix of https://github.com/erlang/otp/issues/5346
    - Track 2: Keep 23.2 for hot upgrading

docker:
    Default to 23.3
2022-07-20 09:34:27 +02:00
Shawn 2ab2c39fdc chore: update emqx-builder to 4.4-18 2022-07-20 15:21:00 +08:00
Shawn 691407f9fd fix: add type binary_file to emqx_rule_validator 2022-07-20 11:16:44 +08:00
William Yang 1fff0ced2c
Merge pull request #8496 from qzhuyan/dev/william/4.3-script-emqx-cluster-rescue
feat: add emqx_cluster_rescue (4.3)
2022-07-19 16:22:41 +02:00
Shawn 2d267364c4 fix: OS Env EMQX_DESCRIPTION not exported 2022-07-19 22:10:49 +08:00
zhongwencool 887590a469
Merge pull request #8507 from zhongwencool/bump-4.3.17.beta.1
chore: bump to 4.3.17.beta.1
2022-07-19 21:44:05 +08:00
zhongwencool ad6482d72e
Merge pull request #8508 from zhongwencool/bump-4.4.6.beta.1
chore: bump to 4.4.6.beta.1
2022-07-19 21:42:49 +08:00
zhongwencool f6467de696 chore: bump to 4.3.17.beta.1 2022-07-19 20:54:42 +08:00
zhongwencool 2a4ded6f4f chore: bump to 4.4.6.beta.1 2022-07-19 19:51:59 +08:00
zhongwencool 1a980dfec7
Merge pull request #8503 from zhongwencool/sync-4.3-to-4.4
chore: sync 4.3 to 4.4
2022-07-19 19:38:38 +08:00
zhongwencool 347f071079 chore: make sure emqx_app/emqx_relup in emqx's appup.src 2022-07-19 19:01:40 +08:00
zhongwencool b6b4ad9b70 chore: update appup.src 2022-07-19 18:44:04 +08:00
zhongwencool 9594ad4839 Merge branch 'sync-4.3-to-4.4' of https://github.com/zhongwencool/emqx into sync-4.3-to-4.4 2022-07-19 17:46:13 +08:00
zhongwencool 28e5539645 chore: revert emqx.appup.src 2022-07-19 17:45:25 +08:00
zhongwencool 9512b31703
Merge branch 'main-v4.4' into sync-4.3-to-4.4 2022-07-19 16:06:52 +08:00
zhongwencool f3ff73e683
Merge pull request #8505 from tigercl/chore/relup
chore(relup): download relup base version packages from s3
2022-07-19 16:00:49 +08:00
zhouzb b400ccdeb4 chore(relup): download relup base version packages from s3 2022-07-19 15:09:04 +08:00
zhongwencool 368fe40c34 fix: merge appup.src 2022-07-19 11:50:08 +08:00
zhongwencool 3248cb92e8 Merge branch 'main-v4.3' into sync-4.3-to-4.4 2022-07-19 11:02:11 +08:00
zhongwencool d9ca791365
Merge pull request #8486 from zhongwencool/check-conf-cli
feat: add check_conf cli to check config format
2022-07-18 18:05:58 +08:00
JimMoen a8adba1d1f
Merge pull request #8500 from JimMoen/update-dashboard/v4.4
chore: update dashboard version
2022-07-18 17:44:53 +08:00
JimMoen 5cac5931d7
Merge pull request #8499 from JimMoen/update-dashboard/v4.3
chore: update dashboard version
2022-07-18 17:43:09 +08:00
Zaiming (Stone) Shi c6ba22a0b4
chore: indentation fix in bin/emqx 2022-07-18 09:47:02 +02:00
zhongwencool 5f6259f6f4
chore: update bin/emqx
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-07-18 15:10:15 +08:00
zhongwencool 53c3f48755
chore: update bin/emqx
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-07-18 15:10:08 +08:00
zhongwencool 0834bc52d4
chore: update bin/emqx
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-07-18 15:09:59 +08:00
JimMoen 1180eca04d chore: update dashboard version 2022-07-18 14:11:02 +08:00
JimMoen 2366794c2f chore: update dashboard version 2022-07-18 14:09:27 +08:00
JimMoen 8fcef61ad3
Merge pull request #8490 from JimMoen/fix-missing-version
Fix inconsistent replayq version
2022-07-17 21:39:57 +08:00
William Yang fc67d71f17 feat: add emqx_cluster_rescue 2022-07-15 16:55:07 +02:00
JimMoen 5aca96afa3 chore: missing version update by wolff
wolff 1.5.6 requires replayq 0.3.4
2022-07-15 16:07:56 +08:00
zhongwencool 87aeead653 feat: add check_conf cli to check config format 2022-07-14 17:17:03 +08:00
Xinyu Liu d9c714153f
Merge pull request #8473 from terry-xiaoyu/fix_emqx_start_failed_after_uninstall_old_vsn
fix: emqx start failed after uninstalling old version
2022-07-13 20:53:48 +08:00
Shawn 4b6f275a43 fix: emqx start failed after uninstalling old version 2022-07-13 20:14:20 +08:00
zhongwencool 5a25c8b682
Merge pull request #8428 from zhongwencool/fix-subid-undefined
fix: get subscriptions crash when subid is undefined
2022-07-13 17:08:55 +08:00
zhongwencool c5dc86a060
Merge pull request #8450 from zhongwencool/list-rules-with-filter
feat: list rules support for pagination and fuzzy filtering
2022-07-13 14:21:40 +08:00
zhongwencool 9b433eb002 fix: list_rules support enable_paging 2022-07-13 10:06:18 +08:00
Thales Macedo Garitezi 2026087ffc
Merge pull request #8460 from thalesmg/fix-default-conf-ssl-cacert
fix: default config should specify `cacert` file (4.3)
2022-07-12 10:11:43 -03:00
DDDHuang 04bc2edc9e
Merge pull request #8466 from DDDHuang/wb_name
fix: better zh param name
2022-07-12 17:19:58 +08:00
zhouzb 9d291af248
Merge pull request #8465 from tigercl/chore/relup
chore(relup): download relup base version packages from s3
2022-07-12 15:08:14 +08:00
DDDHuang 790f97c853 fix: better zh param name 2022-07-12 14:53:25 +08:00
zhouzb d2774935df chore(relup): fix bad url 2022-07-12 14:50:59 +08:00
zhouzb fe56985eec chore(relup): download relup base version packages from s3 2022-07-12 14:30:50 +08:00
DDDHuang 6cc39dfa23
Merge pull request #8463 from DDDHuang/rewrite_log
chore(rewrite): add some log
2022-07-12 11:26:07 +08:00
DDDHuang 13e9e9de51 chore(rewrite): add some log 2022-07-12 10:54:55 +08:00
Thales Macedo Garitezi bc132a4275 fix: default config should specify `cacert` file (4.3)
The default configuration had the `cacert` option for the
`ssl.external` listener commented out.  If one is to set `verify =
verify_peer` in that listener without noticing that `cacert` is
unspecified, all connections will fail with:

```
2022-07-11T11:48:28.540807-03:00 [error] supervisor: 'esockd_connection_sup - <0.3971.0>', errorContext: connection_shutdown, reason: {ssl_error,{options,{cacertfile,[]}}}, offender: [{pid,<0.8225.13>},{name,connection},{mfargs,{emqx_connection,start_link,[[{deflate_options,[]},{max_conn_rate,10000},{active_n,100},{zone,external},{proxy_address_header,<<>>},{proxy_port_header,<<>>},{supported_subprotocols,[]}]]}}]
```
2022-07-11 11:50:20 -03:00
Zaiming (Stone) Shi cd8a4503f8 Merge tag 'v4.4.5' into main-v4.4 2022-07-08 11:53:52 +02:00
zhongwencool d1254faf6f feat: list rules support for pagination and fuzzy filtering 2022-07-08 16:54:35 +08:00
JimMoen 419ab97e72
Merge pull request #8449 from JimMoen/update-ekka
chore: update ekka version
2022-07-08 14:35:51 +08:00
JianBo He 838ced7840 test: no shared subscription lost 2022-07-08 10:54:05 +08:00
JianBo He 7c1a680c33 chore: allow restarting children for emqx_broker_sup 2022-07-08 10:54:04 +08:00
JimMoen 2abeb53eb7 chore: update ekka version 2022-07-08 09:48:48 +08:00
ieQu1 445926c550
Merge pull request #8444 from ieQu1/shared-sub-dispatch-v4.3
chore: Update changelog
2022-07-07 15:12:58 +02:00
ieQu1 77e974971e chore: Update changelog 2022-07-07 14:02:11 +02:00
ieQu1 a344487935
Merge pull request #8441 from ieQu1/shared-sub-dispatch-v4.3
fix(shared_sub): Fix crash on dispatch with subscribers disconnected
2022-07-07 12:02:25 +02:00
ieQu1 e145fdbef3 fix(shared_sub): Fix crash on dispatch with subscribers disconnected 2022-07-07 11:15:58 +02:00
lafirest aaaa65786a
Merge pull request #8342 from lafirest/fix/pipeling
fix: change the type of enable_pipelining from bool to integer
2022-07-07 09:36:08 +08:00
Zaiming (Stone) Shi 3db6fd85bb
Merge pull request #8426 from zmstone/0705-add-quick-deny-for-anonymous
feat: add a quick deny option to allow_anonymous config
2022-07-06 14:00:03 +01:00
Zaiming (Stone) Shi 820d981b4d
docs: fix typo in code comment
Co-authored-by: Ilya Averyanov <av@rubybox.ru>
2022-07-06 13:33:52 +02:00
firest e1346148ec chore: bump version && update appup 2022-07-06 18:28:08 +08:00
firest 5c2797e1ca chore: Add compatibility note 2022-07-06 18:13:26 +08:00
firest 6cd79f92e0 fix(emqx_auth_http): make configure backward compatible 2022-07-06 18:06:06 +08:00
firest 85b0ce3843 fix: change the type of enable_pipelining from bool to integer 2022-07-06 18:05:56 +08:00
Zaiming (Stone) Shi 998f79070d feat: add a quick deny option to allow_anonymous config
prior to this change, allow_anonymous is only true | false
when set to 'false', even if the client is connected without
a username, the auth backends will be invoked.

this commit introduced a new config value `false_quick_deny`
to deny access immediately without involving auth backends
2022-07-06 11:40:24 +02:00
zhongwencool 5a9638b09b fix: get subscriptions crash when subid is undefined 2022-07-06 17:12:11 +08:00
JianBo He ad7c2456e6
Merge pull request #8386 from HJianBo/port-new-4316
Fix fail to join old version cluster crash
2022-07-05 09:38:27 +08:00
Zaiming (Stone) Shi 6cbc91f60f
Merge pull request #8411 from thalesmg/fix-list-diff-prec
fix: fix list difference precedence
2022-07-04 22:30:53 +01:00
Thales Macedo Garitezi 1a6cf38c00 fix: fix list difference precedence
```erlang
1> [a, b, c] ++ [d] -- [a].
[a,b,c,d]
2> ([a, b, c] ++ [d]) -- [a].
[b,c,d]
```
2022-07-04 16:38:49 -03:00
JianBo He c1b3cc756c chore: bump mgmt/dashboard vsn 2022-07-04 13:57:00 +08:00
JianBo He 6eadacd5a2 chore: bump rule-engine app vsn 2022-07-04 11:32:05 +08:00
Zaiming (Stone) Shi 0e55fabfda
Merge pull request #8400 from zmstone/0702-4.3-fix-app-vsn-check-script-with-include-dir
4.3 fix app vsn check script with include dir
2022-07-03 07:13:04 +01:00
Zaiming (Stone) Shi 0e4626aab3 ci: app version check script should also check include dir 2022-07-02 11:35:47 +02:00
Zaiming (Stone) Shi 9390fe665c
Merge pull request #8390 from thalesmg/update-appup-tool-vsns
chore: copy `.tool-versions` when calculating appups
2022-07-02 09:27:14 +01:00
Thales Macedo Garitezi 0e82979ce3
Merge pull request #8391 from thalesmg/ci-xref
ci: run xref checks in CI
2022-07-01 16:26:31 -03:00
Thales Macedo Garitezi fcb2d3dc51 fix(mgmt): use correct arity fn 2022-07-01 15:54:02 -03:00
Thales Macedo Garitezi 84c6a27758 ci: run xref checks in CI 2022-07-01 13:19:41 -03:00
Thales Macedo Garitezi 03649cc3f3 chore: copy `.tool-versions` when calculating appups
This can make it simpler to ensure the same OTP version that builds
the current checkout will match the one that builds the appup base,
since one may change the version locally.
2022-07-01 13:05:29 -03:00
JianBo He 12056d3f11
Merge pull request #8385 from emqx/fix-exclusive-sub-roll-upgrading
Merge v4.3.16 into hotfix/v4.4.5
2022-07-01 22:42:04 +08:00
JianBo He 92d1c37662 Merge v4.3.16 into hotfix/v4.4.5 2022-07-01 22:40:45 +08:00
lafirest 3dd523bdff
Merge pull request #8380 from lafirest/fix/exclusive_upgarde_4.3.16
Fix/exclusive upgarde 4.3.16
2022-07-01 19:11:50 +08:00
firest 59ce864f45 chore: add upgrade callback for exclusive_subscription 2022-07-01 18:43:18 +08:00
firest 8abf647452 fix(exclusive): add upgarde codes 2022-07-01 18:35:08 +08:00
Thales Macedo Garitezi 866ad5b1fa
Merge pull request #8354 from thalesmg/fix-run-mgmt-tests
test(mgmt): run all tests in suite
2022-06-30 13:26:10 -03:00
zhouzb c74bbae22b
Merge pull request #8364 from emqx/sync-4.3
Sync from 4.3
2022-06-30 21:48:44 +08:00
zhouzb 9539446ca6
Merge branch 'main-v4.4' into sync-4.3 2022-06-30 21:48:29 +08:00
Zaiming (Stone) Shi 1b3f54c3be
Merge pull request #8361 from zmstone/0630-ensure-os-mon-app-env
chore: ensure os_mon.memsup_improved_system_memory_data is set to true
2022-06-30 14:43:00 +01:00
zhouzb 9d50e8f66b
Merge pull request #8363 from tigercl/chore/bump-release
chore: bump version
2022-06-30 21:41:41 +08:00
zhouzb 7415e2dbc7 chore: bump version 2022-06-30 21:40:40 +08:00
zhouzb 56f76c61b0
Merge pull request #8362 from tigercl/chore/bump-release
chore: bump vsn
2022-06-30 21:36:14 +08:00
zhouzb 3fcd28882e chore: bump vsn 2022-06-30 21:34:36 +08:00
Zaiming (Stone) Shi 237afd0984 chore: ensure os_mon.memsup_improved_system_memory_data is set to true 2022-06-30 14:57:01 +02:00
lafirest b4ab6d91af
Merge pull request #8358 from lafirest/fix/rmv_zone_def_val
fix: remove the default value of zone's exclusive_subscription
2022-06-30 19:51:57 +08:00
firest 6a741f2085 fix: remove the default value of zone's exclusive_subscription 2022-06-30 19:48:35 +08:00
Thales Macedo Garitezi b10f8b8928 test(mgmt): run all tests in suite 2022-06-30 08:45:19 -03:00
Xinyu Liu 3c1251a99a
Merge pull request #8349 from emqx/copy-of_main-v4.3
merge main-v4.3 into main-v4.4
2022-06-29 22:30:42 +08:00
Xinyu Liu 2a89443377
Merge branch 'main-v4.4' into copy-of_main-v4.3 2022-06-29 22:27:49 +08:00
Xinyu Liu e41562d4cb
Merge pull request #8348 from terry-xiaoyu/release_4.3.16-beta.4
chore: release 4.3.16-beta.4
2022-06-29 22:20:32 +08:00
Shawn cb82e8cdb6 chore: release 4.3.16-beta.4 2022-06-29 22:19:46 +08:00
Xinyu Liu a3cb718f97
Merge pull request #8346 from thalesmg/fix-sub-filter-hook
fix(hooks): return error on hook-removed subscription rather than deleting it
2022-06-29 22:14:05 +08:00
Thales Macedo Garitezi 5c89998049 fix(hooks): return error on hook-removed subscription rather than deleting it
Following https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901178
2022-06-29 11:08:22 -03:00
JianBo He 905ae0dcad
Merge pull request #8345 from HJianBo/refresh-http-handlers
chore: stop http listener to load latest http handlers
2022-06-29 21:26:21 +08:00
JianBo He e3bf11fe39 chore: stop http listener to load latest http hanlders 2022-06-29 20:52:11 +08:00
Xinyu Liu 56775beede
Merge pull request #8341 from emqx/copy-of_main-v4.3
merge main-v4.3 into main-v4.4
2022-06-29 15:40:25 +08:00
Xinyu Liu c6573c708f
Merge branch 'main-v4.4' into copy-of_main-v4.3 2022-06-29 15:40:14 +08:00
Ilya Averyanov 19e0d72fe7
Merge pull request #8337 from savonarola/jwt-fix-timer-4.3
Fix JWT handling
2022-06-28 22:03:29 +03:00
Ilya Averyanov 4447948c5e fix: handle claim verification errors correctly 2022-06-28 19:36:46 +03:00
Ilya Averyanov f238e8f83d fix: update JWKS renewal timer correctly 2022-06-28 09:54:12 +03:00
Shawn a365c40765 chore: update dashboard version 2022-06-28 10:39:37 +08:00
Xinyu Liu 6a9b68f9ef
Merge pull request #8334 from emqx/main-v4.3
merge main-v4.3 into main-v4.4
2022-06-28 10:36:42 +08:00
Shawn 343770ce52 chore: update dashboard version 2022-06-28 10:29:01 +08:00
Ilya Averyanov 5f2fbe50c4
Merge pull request #8329 from savonarola/fix-log-errors
fix: remove unnecessary error messages generated by JWT auth
2022-06-27 20:08:54 +03:00
Ilya Averyanov ddc06e8bcd fix: remove unnecessary error messages generated by JWT auth 2022-06-27 18:42:44 +03:00
Xinyu Liu ae294cccb9
Merge pull request #8328 from emqx/copy-of-main-v4.3
merge main-v4.3 into main-v4.4
2022-06-27 21:36:59 +08:00
Xinyu Liu c812975ca6
Merge branch 'main-v4.4' into copy-of-main-v4.3 2022-06-27 21:34:11 +08:00
Xinyu Liu cf66a29d70
Merge pull request #8327 from terry-xiaoyu/release_v4.3.16-beta.3
chore: release v4.3.16-beta.3
2022-06-27 18:57:15 +08:00
Shawn 5e21c60fe2 chore: release v4.3.16-beta.3 2022-06-27 18:56:19 +08:00
zhongwencool 84856252c9
Merge pull request #8302 from zhongwencool/dashboard-default-username-missing
fix: can't start dashboard if default_username is missing
2022-06-27 15:05:55 +08:00
zhongwencool ab2e477ffd fix: default_password should not be empty 2022-06-27 14:35:14 +08:00
zhongwencool fd22639bcb chore: remove unnessary function case 2022-06-27 14:35:14 +08:00
zhongwencool 4a87d77be3 fix: can't start dashboard if default_username is missing 2022-06-27 14:35:12 +08:00
Zaiming (Stone) Shi 9af4cb75ef
Merge pull request #8324 from zmstone/0626-fix-mem-stats
chore: return system total and used memory in node_info
2022-06-27 07:04:45 +01:00
JianBo He 5e3e5a5ffa
Merge pull request #8311 from HJianBo/support-key-dispatch
Ensuring that exhook dispatches the client events are sequential
2022-06-27 13:38:08 +08:00
JianBo He ee05895058 chore(exhook): update changes-4.3 for #8314 2022-06-27 11:30:54 +08:00
JianBo He e4df71d90e chore: update changes-4.3 2022-06-27 11:27:45 +08:00
JianBo He 9bb3533d11 fix(exhook): guarantee sequential dispatch of client's events from the same node
fix: https://github.com/emqx/emqx/issues/7569
2022-06-27 11:27:44 +08:00
JianBo He 08976c6946
Merge pull request #8314 from lafirest/feat/exhook_tcp_opts
Feat/exhook tcp opts
2022-06-27 11:26:02 +08:00
Zaiming (Stone) Shi c4f1c83003 chore: return system total and used memory in node_info 2022-06-26 21:16:55 +02:00
Thales Macedo Garitezi 52684ca944
Merge pull request #8301 from thalesmg/add-redbug
feat: add redbug
2022-06-24 13:52:55 -03:00
JianBo He ea1faaaa13
Merge pull request #8313 from HJianBo/bump-esockd-vsn
Fix lwm2m/coap plugin can't bind IP address
2022-06-24 21:09:35 +08:00
Xinyu Liu c5304f8356
Merge pull request #8312 from terry-xiaoyu/fallback_action_not_triggered
fix: fallback action not triggered when send to webhook failed
2022-06-24 17:58:13 +08:00
firest 9ad1e5c08e chore(exhook): bump version && update appup 2022-06-24 17:52:29 +08:00
firest abe2a9cb45 feat(exhook): expose tcp some options for grpc client 2022-06-24 17:50:05 +08:00
JianBo He a48ba40f1b fix: fix LWM2M can't bind IP address error 2022-06-24 15:02:35 +08:00
Xinyu Liu fc5e443f45
Merge pull request #8310 from DDDHuang/rewrite_v43
fix(topic-rewrite): better hooks, max priority 1000
2022-06-24 14:41:02 +08:00
Shawn 0a99e835e7 fix: fallback action not triggered when send to webhook failed 2022-06-24 14:34:40 +08:00
DDDHuang 0092d55b46 fix(topic-rewrite): better hooks, max priority 1000 2022-06-24 11:33:01 +08:00
Xinyu Liu 23ed374055
Merge pull request #8306 from emqx/copy-of_main-v4.3
Merge main-v4.3 to main-v4.4
2022-06-23 23:11:13 +08:00
Xinyu Liu 565b6b0eb3
Merge branch 'main-v4.4' into copy-of_main-v4.3 2022-06-23 22:44:53 +08:00
Xinyu Liu 7a3941ce5d
Merge pull request #8307 from terry-xiaoyu/release_v4.3.16-beta.2
fix: correct the emqx.appup.src
2022-06-23 22:23:51 +08:00
Shawn ee6a2155e2 fix: correct the emqx.appup.src 2022-06-23 22:22:24 +08:00
Xinyu Liu 905cf7470d
Merge pull request #8305 from terry-xiaoyu/release_v4.3.16-beta.2
chore: release v4.3.16-beta.2
2022-06-23 21:23:38 +08:00
Shawn f7e0476b94 chore: release v4.3.16-beta.2 2022-06-23 21:16:18 +08:00
lafirest 2f154e5a94
Merge pull request #8303 from lafirest/fix/mgmt_warning
Fix/mgmt warning
2022-06-23 18:04:20 +08:00
firest 73b72f40e5 chore: update emqx.appup.src 2022-06-23 17:57:41 +08:00
firest f732b41c5c fix(ctl): remove the warning log when the mgmt upgrade 2022-06-23 17:51:32 +08:00
lafirest 4909973e37
Merge pull request #8294 from lafirest/feat/exclusive_sub
feat: add exclusive subscription
2022-06-23 17:49:04 +08:00
firest a90f91d3e8 chore: update emqx.appup.src 2022-06-23 17:04:15 +08:00
firest fc4794613c test(mqtt_caps): fix t_check_sub error 2022-06-23 17:04:15 +08:00
firest 746b996de4 feat(exclusive): update schema and conf 2022-06-23 17:03:51 +08:00
firest 7084e510d6 feat(exclusive): refactor the implementation 2022-06-23 16:31:48 +08:00
firest 6599b71b5e feat: add exclusive subscription 2022-06-23 16:31:48 +08:00
Xinyu Liu 14a37bbc89
Merge pull request #8288 from thalesmg/fix-client-sub-hook
fix(hooks): use hook response to stop subscriptions
2022-06-23 11:42:42 +08:00
Thales Macedo Garitezi 50c546290c feat: add redbug 2022-06-22 18:05:18 -03:00
Xinyu Liu 3bc613d660
Merge pull request #8297 from DDDHuang/ddd_cahngelog
fix: add some changelog
2022-06-22 19:29:04 +08:00
DDDHuang 990f02928e fix: add some changelog 2022-06-22 19:05:42 +08:00
Xinyu Liu b3bd31ec86
Merge pull request #8267 from zmstone/0617-ci-no-more-latest-tag-for-4.4
ci: no more latest tag for 4.4
2022-06-22 18:08:28 +08:00
Xinyu Liu 193595ad61
Merge pull request #8275 from zhongwencool/zip-trace
fix: clean trace zip file after download
2022-06-22 18:07:58 +08:00
zhongwencool d345590206 fix: CT failed 2022-06-22 17:35:57 +08:00
zhongwencool 040e964956 fix: appup failed 2022-06-22 16:36:30 +08:00
zhongwencool df40e3aaa1 chore: update trace changelog 2022-06-22 16:36:28 +08:00
zhongwencool 773c464572 fix: clean trace zip file after download 2022-06-22 16:35:41 +08:00
zhongwencool 98b1a232e1
Merge pull request #8290 from zhongwencool/publish-with-properties-http-api
feat: mqtt/publish support to publish with properties and user_properties
2022-06-22 16:33:16 +08:00
DDDHuang 5b62334e89
Merge pull request #8291 from DDDHuang/kafka_import
fix(kafka): data backup, support old strategy style
2022-06-22 11:49:48 +08:00
DDDHuang 6cf583a301 fix(kafka): data backup, support old strategy style 2022-06-22 11:03:34 +08:00
zhongwencool fd11e02639 feat: mqtt/publish support to publish with properties and user_properties 2022-06-22 10:00:25 +08:00
Thales Macedo Garitezi 4bda62b195 fix(hooks): use hook response to stop subscriptions
Fixes https://github.com/emqx/emqx-lua-hook/issues/118

1) If the Lua hook returns an empty list, it should replace the final
topic filter list.
2) The subscribed topics after running the 'client.subscribe' hook
should not contain topics filtered out by the hooks.
2022-06-21 17:06:39 -03:00
Thales Macedo Garitezi 117e040174
Merge pull request #8280 from thalesmg/acl-placeholder-nomatch-fix
fix(acl): do not leave placeholders unreplaced
2022-06-20 15:40:43 -03:00
Thales Macedo Garitezi 7d303ae7fe fix(acl): do not leave placeholders unreplaced
If there is no information in the `ClientInfo` map that can be used to
template a placeholder, then we should avoid letting the literal
placeholder match.  Otherwise, the literal placeholder will allow
messages to be published/received unintentionally.

One can still use `{eq, <<"%c">>}` if matching the placeholder is
really desired.
2022-06-20 14:52:51 -03:00
Xinyu Liu 3bf08960da
Merge pull request #8282 from emqx/copy-of_main-v4.3
Main v4.3
2022-06-20 23:24:38 +08:00
Xinyu Liu 7ec49af40f
Merge branch 'main-v4.4' into copy-of_main-v4.3 2022-06-20 23:24:15 +08:00
Xinyu Liu 1ae070f8b3
Merge pull request #8281 from terry-xiaoyu/release_4.3.16-beta.1
chore: release v4.3.16-beta.1
2022-06-20 23:19:53 +08:00
Shawn 9cee40caec chore: release v4.3.16-beta.1 2022-06-20 23:17:42 +08:00
Xinyu Liu 5a746448e1
Merge pull request #8274 from emqx/copy-of_main-v4.3
merge main-v4.3 -> main-v4.4
2022-06-20 14:04:28 +08:00
Xinyu Liu dc777c68a1
Merge branch 'main-v4.4' into copy-of_main-v4.3 2022-06-20 11:22:58 +08:00
Zaiming (Stone) Shi 5220cdd1f6 ci: no more 'latest' docker tag for 4.4 2022-06-17 20:26:56 +02:00
DDDHuang a8b74c10f2
Merge pull request #8113 from DDDHuang/export_ip_config
Add listening port to erlang node distribution
2022-06-17 09:45:33 +08:00
Thales Macedo Garitezi 25fd9db4cd
Merge pull request #8251 from thalesmg/upload-appup-fix
ci: fix appup artifact upload patterns
2022-06-16 17:49:04 -03:00
Zaiming (Stone) Shi b4cdfcb709
Merge pull request #8160 from gsychev/webhook_json_fix
fix(web_hook): proper json encoding
2022-06-16 20:11:28 +01:00
Georgy Sychev 91221aa194 fix(emqx): reverted appup 2022-06-16 22:37:46 +04:00
Thales Macedo Garitezi f0cbfff866 ci: fix appup artifact upload patterns 2022-06-16 14:37:51 -03:00
Rory Z 627112fd75
Merge pull request #8236 from Rory-Z/chore/add-pod-annotation
chore(helm): add pod annotation
2022-06-16 17:56:08 +08:00
Rory Z 72f21f2d55 chore(helm): add pod annotation 2022-06-16 14:01:23 +08:00
Xinyu Liu 606b6d8e6c
Merge pull request #8233 from DDDHuang/grpc065
fix: update grpc deps & deps in root rebar.config
2022-06-16 11:10:21 +08:00
DDDHuang fcdb6217db fix: update grpc deps & deps in root rebar.config 2022-06-16 10:49:53 +08:00
Thales Macedo Garitezi b7762ede6e
Merge pull request #8225 from thalesmg/merge-43-into-44-1
Merge main-v4.3 into main-v4.4
2022-06-15 16:01:19 -03:00
Thales Macedo Garitezi f08aedbf1f Merge branch 'main-v4.3' into merge-43-into-44-1 2022-06-15 14:45:01 -03:00
Thales Macedo Garitezi daa87e525f
Merge pull request #8228 from thalesmg/artifacts-for-all-builds-43
ci: upload artifacts for all builds (not just tags) (4.3)
2022-06-15 14:44:22 -03:00
Thales Macedo Garitezi 35c3eba03b ci: upload artifacts for all builds (not just tags) (4.3)
Port of #8233 .
2022-06-15 14:30:52 -03:00
Thales Macedo Garitezi a55d583de6 chore: bump more app versions 2022-06-15 14:14:34 -03:00
Thales Macedo Garitezi 13f575bc84 chore(relup): bump release and app vsns, update appups 2022-06-15 13:45:05 -03:00
Georgy Sychev f3b596eb7e fix(webhook): removed User-Property field from message 2022-06-15 20:29:41 +04:00
Thales Macedo Garitezi b93a0743ac Merge branch 'main-v4.3' into 'main-v4.4' 2022-06-15 10:48:02 -03:00
JianBo He 23616be4a4
Merge pull request #8215 from Rory-Z/chore/delete-pre-strop
chore(helm): delete preStop command
2022-06-15 13:47:10 +08:00
Rory Z b680ce6d61 chore(helm): delete preStop command 2022-06-15 10:35:27 +08:00
JianBo He ffaabe9f6d
Merge pull request #8179 from Rory-Z/chore/fix-loaded-plugin
chore: fix when load plugins, update loaded file error
2022-06-14 11:28:59 +08:00
JianBo He 00fe560dac
Merge branch 'main-v4.3' into chore/fix-loaded-plugin 2022-06-14 09:47:14 +08:00
Zaiming (Stone) Shi 3a17fb2522
Merge pull request #8204 from zmstone/0612-build-exclude-sub-build-dirs
build: add strict-semver version bump check for apps
2022-06-13 19:33:06 +01:00
Zaiming (Stone) Shi 100aeda83b build: add strict-semver version bump check for apps 2022-06-13 17:46:06 +02:00
Zaiming (Stone) Shi 83e9876e68
Merge pull request #8188 from zmstone/0612-build-exclude-sub-build-dirs
build: ignore _build sub-dir in release dir
2022-06-13 15:53:02 +01:00
Zaiming (Stone) Shi 38b7e5fa11 chore: bump app vsn for emqx_dashboard 2022-06-13 15:00:03 +02:00
Thales Macedo Garitezi 249f5a9e1e
Merge pull request #8177 from thalesmg/fix-connack-auth-err-mqtt3-43
fix(metrics): inc `connack.auth_error` when using MQTT 3.1
2022-06-13 09:17:03 -03:00
DDDHuang fbd179b5f5
Merge pull request #8166 from DDDHuang/republish
feat: republish support  qos & retain placeholder
2022-06-13 16:46:30 +08:00
DDDHuang 1e02656035 fix(rule): better func name for emqx_rule_utils 2022-06-13 16:27:41 +08:00
JianBo He 9bf1423452 chore: update changes-4.3.md 2022-06-13 15:29:22 +08:00
JianBo He 5f75f03be8 chore(appup): update emqx.appup.src 2022-06-13 15:15:01 +08:00
Zaiming (Stone) Shi 215286760a build: ignore _build sub-dir in release dir 2022-06-12 21:07:13 +02:00
Rory Z 9975f3dda8 chore: fix when load plugins, update loaded file error 2022-06-11 17:34:22 +08:00
Zaiming (Stone) Shi 37072bdcfd
Merge pull request #8171 from thalesmg/ci-relup-follow-redir
ci(relup): fix: follow URL redirects when checking for package existence
2022-06-11 07:57:54 +01:00
Thales Macedo Garitezi e993364f4d
Merge pull request #8170 from thalesmg/ci-upload-expected-appup-43
ci(appup): upload appup files when ci check fails
2022-06-10 16:44:22 -03:00
Thales Macedo Garitezi 1733f19608
chore: bump version and update changelog 2022-06-10 16:30:27 -03:00
Thales Macedo Garitezi 1ba8ad4c25
fix(metrics): inc `connack.auth_error` when using MQTT 3.1
Since MQTT 3.1 uses a different reason code for auth failures, it was
failing to increase the corresponding metric that works for MQTT 5.0.
2022-06-10 15:00:57 -03:00
DDDHuang c5f754c3b8 fix(suite): add republish qos & retain test case 2022-06-10 17:21:45 +08:00
DDDHuang e1e2fd50fd fix(republish): action input editable_select 2022-06-10 16:22:35 +08:00
DDDHuang 7d848950c7 fix(republish): to_qos & to_retain, add new util funcs 2022-06-10 16:10:30 +08:00
Thales Macedo Garitezi 6a5c896f56
ci(relup): fix: follow URL redirects when checking for package existence 2022-06-09 11:51:02 -03:00
Thales Macedo Garitezi 34d84599c3
ci(appup): upload appup files when ci check fails
Often we have to remember to update both local tags and local
dependencies, and even so local results might differ from what the CI
check expects.  To help fixing expected appup file differences, we can
upload what CI produced to apply to our branch.
2022-06-09 11:34:58 -03:00
DDDHuang ac700b8e6f fix(rule): replubish SUIT 2022-06-09 17:35:55 +08:00
DDDHuang 6b1da3bcc8 feat: republish support qos & retain placeholder 2022-06-09 14:55:07 +08:00
zhouzb 8a89fb2238
Merge pull request #8164 from zmstone/0609-fix-ci-for-e4.3.10-rc.6
ci: ensure git safe directory for test case run
2022-06-09 14:02:49 +08:00
Zaiming (Stone) Shi ac09b90ab6 ci: ensure git safe directory for test case run 2022-06-09 07:30:33 +02:00
Zaiming (Stone) Shi 8d7c79eb90
Merge pull request #8146 from Rory-Z/fix/fix-helm-install-error
fix: fix helm install failed when enable ingress
2022-06-08 20:45:17 +01:00
Thales Macedo Garitezi d91c5806e0
Merge pull request #8129 from thalesmg/key-pass-dash-mgmt-43
feat(tls): add configs for private key password in dashboard/mgmt
2022-06-07 09:14:50 -03:00
Rory Z 6ad1a92db0 fix: fix helm install failed when enable ingress 2022-06-07 14:45:08 +08:00
Zaiming (Stone) Shi b305c90b9c
Merge pull request #8123 from zmstone/0602-ci-use-erlef-setup-beam
ci: use erlef/setup-beam@v1 to install erlang
2022-06-07 05:10:47 +01:00
Zaiming (Stone) Shi 1acbe4f721 chore(emqx_rule_engine): bump app vsn and update appup 2022-06-06 23:19:39 +02:00
Zaiming (Stone) Shi 681d3652c6 chore: bump emqx_dashboard app vsn 2022-06-06 16:16:37 +02:00
Zaiming (Stone) Shi c52e2f1b51 ci: use erlef/setup-beam@v1 to install erlang 2022-06-06 16:14:54 +02:00
JianBo He 2aa164e36a
Merge pull request #8067 from lafirest/fix/topic_rewarite
feat(rewrite): Support %u and %c placeholders in topic rewrite rules
2022-06-06 09:34:01 +08:00
Thales Macedo Garitezi 50ff2edf13
feat(tls): add configs for private key password in dashboard/mgmt 2022-06-03 11:21:12 -03:00
JianBo He 4b867e6536
Merge pull request #8124 from zmstone/0602-ci-ensure-otp-24-for-helm_test
ci: ensure otp 24 for helm test
2022-06-02 21:45:30 +08:00
Zaiming (Stone) Shi 7ebc9fc205 Merge remote-tracking branch 'zmstone/0602-ci-use-erlef-setup-beam' into main-v4.4 2022-06-02 13:47:39 +02:00
Zaiming (Stone) Shi 266354cf15 ci: use erlef/setup-beam@v1 to install erlang 2022-06-02 13:45:00 +02:00
JianBo He a7f31b2546
Merge pull request #8122 from zmstone/0602-ci-ensure-otp24
0602 ci ensure otp24
2022-06-02 17:52:15 +08:00
Zaiming (Stone) Shi e2b659d321 ci: ensure otp 24.1.5 in run_fvt_tests.yaml 2022-06-02 11:35:09 +02:00
zhouzb ad224a98f4
Merge pull request #8121 from zmstone/0602-ci-ensure-otp-version
ci: ensure otp 23 in run_automate_tests.yaml
2022-06-02 17:33:31 +08:00
Zaiming (Stone) Shi 077dc37ea2 Merge remote-tracking branch 'zmstone/0602-ci-ensure-otp-version' into 0602-ci-ensure-otp24 2022-06-02 11:32:08 +02:00
Zaiming (Stone) Shi 0e9c446409 ci: ensure otp 23 in run_automate_tests.yaml 2022-06-02 11:14:39 +02:00
JianBo He 5c58e1b734
Merge pull request #8119 from emqx/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-06-02 11:40:42 +08:00
JianBo He 94141f5915 Merge tag 'v4.3.15' into main-v4.4 2022-06-02 11:39:45 +08:00
JianBo He 3c994b1f6a
Merge pull request #8118 from emqx/recovering-hot-upgrade
chore(appup): recovering lost hot update commands
2022-06-02 11:34:37 +08:00
JianBo He 6e90e9b9b7 chore: bump version v4.3.15 2022-06-02 11:33:54 +08:00
JianBo He c32edfde18 chore(appup): recovering lost hot update commands 2022-06-02 10:42:55 +08:00
JianBo He 78f9520e71
Merge pull request #8115 from emqx/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-06-01 17:01:53 +08:00
JianBo He 9c91788a9e Merge tag 'v4.3.15-rc.5' into merge-main-v4.3-into-v4.4 2022-06-01 17:01:10 +08:00
JianBo He b6faf3fd68
Merge pull request #8114 from HJianBo/bump-vsn
chore: bump v4.3.15-rc.5
2022-06-01 16:58:59 +08:00
JianBo He 2e6ec21dc2 chore: bump v4.3.15-rc.5 2022-06-01 16:58:08 +08:00
DDDHuang f900e4ea3f feat: add rpc server listener bind ip config 2022-06-01 16:21:41 +08:00
JianBo He 3fa341642c
Merge pull request #8110 from DDDHuang/log_adapter
fix: adjust old logger config
2022-06-01 16:14:49 +08:00
DDDHuang 43b56e82bd feat: add listener bind ip config. 2022-06-01 15:34:29 +08:00
Xinyu Liu a03cbd7fe2
Merge pull request #8111 from DDDHuang/relup_log44
fix: better release up log
2022-06-01 14:42:22 +08:00
DDDHuang 983a699592 fix: better release up log 2022-06-01 14:39:50 +08:00
DDDHuang 4347fa1b95 fix: adjust old logger config 2022-06-01 14:35:23 +08:00
JianBo He 691c5bdaa9
Merge pull request #8102 from HJianBo/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-05-31 22:11:35 +08:00
JianBo He f033cd1a87 chore: sync changes 2022-05-31 22:09:53 +08:00
JianBo He 25be198d2a Merge tag 'v4.3.15-rc.4' into merge-main-v4.3-into-v4.4 2022-05-31 22:07:57 +08:00
JianBo He 2050d9601b
Merge pull request #8101 from emqx/bump-vsn
chore: bump vsn v4.3.15-rc.4
2022-05-31 22:05:41 +08:00
JianBo He 8ca0effb0d chore: bump vsn v4.3.15-rc.4 2022-05-31 22:04:25 +08:00
Zaiming (Stone) Shi 8f398b42d4 docs: fix typo in CHANGES-4.3.md 2022-05-31 10:56:59 +02:00
DDDHuang 137d7c0d7d
Merge pull request #8078 from DDDHuang/up_dashboard_43
feat: dashboard v4.3.20 for ee 4.3.10
2022-05-30 13:39:25 +08:00
DDDHuang 8cbabe94f8
Merge pull request #8079 from DDDHuang/up_dashboard_44
feat: dashboard v4.4.11 for ee 4.4.4
2022-05-30 13:39:14 +08:00
DDDHuang a96984d280 feat: dashboard v4.4.11 for ee 4.4.4 2022-05-30 11:34:55 +08:00
DDDHuang e1150e36a2 feat: dashboard v4.3.20 for ee 4.3.10 2022-05-30 11:30:23 +08:00
firest 1b658171a2 chore(modules): bump version and update appup file 2022-05-30 10:36:31 +08:00
JianBo He 585c5fc34d
Merge pull request #8070 from HJianBo/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-05-27 22:33:17 +08:00
JianBo He ce1dd88676 chore: fix bad `add_module` instrs 2022-05-27 21:54:57 +08:00
JianBo He 2ca952bbe6 chore: update emqx.appup.src 2022-05-27 18:22:39 +08:00
JianBo He 918e2fc58f chore: bump version 4.4.4-rc.3 2022-05-27 18:14:01 +08:00
JianBo He 6c765b3e02 Merge tag 'v4.3.15-rc.3' into merge-main-v4.3-into-v4.4 2022-05-27 18:13:38 +08:00
JianBo He 39518f5e27 Merge tag 'v4.4.3' into merge-main-v4.3-into-v4.4 2022-05-27 18:08:08 +08:00
JianBo He 12de3ed250
Merge pull request #8064 from HJianBo/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-05-27 17:12:25 +08:00
Xinyu Liu 526d8a8200
Merge pull request #8065 from HJianBo/fix-xref-bad-func-name
fix(alram): fix bad function name
2022-05-27 16:55:54 +08:00
Xinyu Liu abfdfdd659
Merge pull request #8062 from zhongwencool/trace-large-msg-format-as-iolist
fix: heap size is growing very fast when trace large msg
2022-05-27 16:55:28 +08:00
firest 0b52097c78 feat(rewrite): Support %u and %c placeholders in topic rewrite rules
fix #7438
2022-05-27 16:51:05 +08:00
JianBo He 975c7eb095
Merge branch 'main-v4.3' into trace-large-msg-format-as-iolist 2022-05-27 16:42:04 +08:00
Zaiming (Stone) Shi 30b66809f9 Merge new tag 'v4.4.3' into rebuild-v4.4.3 2022-05-27 10:16:26 +02:00
JianBo He ec6e42f78a Merge tag 'v4.3.14' into fix-xref-bad-func-name 2022-05-27 16:15:36 +08:00
Zaiming (Stone) Shi dbe4ff7b02 Merge tag 'v4.4.2' into rebuild-v4.4.3 2022-05-27 10:15:02 +02:00
JianBo He bfa54523c6 chore: revert the needless appup.src changes by #8061 2022-05-27 16:15:00 +08:00
JianBo He 9200fc2512 fix(alram): fix bad function name 2022-05-27 16:12:11 +08:00
DDDHuang fa302eeaee
Merge pull request #8063 from DDDHuang/logger_cl
chore(doc): customize log date : update change log
2022-05-27 16:08:01 +08:00
zhongwencool 87b4bddaae chore: add changelog for trace 2022-05-27 14:15:43 +08:00
DDDHuang a6c258165a chore(doc): customize log date : update change log 2022-05-27 14:13:32 +08:00
DDDHuang b4d2223d4f
Merge pull request #8061 from DDDHuang/rr_badarg
fix: rule engine clear resource bad name & type
2022-05-27 13:50:08 +08:00
JianBo He 090a52c9fa
Merge pull request #8060 from Rory-Z/feat/add-monitor
feat(helm): add service monitor for prometheus
2022-05-27 11:44:29 +08:00
JianBo He b0c00df867 Merge remote-tracking branch 'stone/0525-ci-pin-builder-4.4-12' into merge-main-v4.3-into-v4.4 2022-05-27 11:16:01 +08:00
JianBo He 7ee5f90516 Merge tag 'v4.3.15-rc.3' into merge-main-v4.3-into-v4.4 2022-05-27 11:09:11 +08:00
zhongwencool 637202e463 fix: heap size is growing very fast when trace large msg 2022-05-27 11:04:49 +08:00
DDDHuang 78e5aa30d7 fix: rule engine clear resource bad name & type 2022-05-27 11:00:03 +08:00
JianBo He b0abe2d06e
Merge pull request #8059 from zmstone/0527-4.4-build-on-otp-24
ci: For 4.4, release package on OTP 24 only
2022-05-27 10:53:35 +08:00
Rory Z 628b57038d feat(helm): add service monitor for prometheus 2022-05-27 09:19:18 +08:00
Zaiming (Stone) Shi 3029e2b243 ci: For 4.4, release package on OTP 24 only 2022-05-27 03:16:57 +02:00
Zaiming (Stone) Shi e9905d7063 build: ensure _build dir is owned by root when build in docker
so the dependency clones will not complain safe.directory etc.
2022-05-27 01:25:21 +02:00
Zaiming (Stone) Shi fbdcc243a3 Merge remote-tracking branch 'origin/fix/v4.3.14' into rebuild-v4.3.14 2022-05-27 01:04:13 +02:00
Zaiming (Stone) Shi 94092bc52e ci: ensure _build dir is owned by root
so the git command can run without safe.directory config for
cloned dependencies
2022-05-27 00:59:31 +02:00
Zaiming (Stone) Shi 0402903d71 chore: update to version 4.3.15-rc.3 2022-05-26 23:49:52 +02:00
Zaiming (Stone) Shi a403c9ff91 ci: pin emqx-buider 4.4-12
Centos/Rockylinux had troulbe booting because OpenSSL version
was too new (1.1.1n).

builder 4.4-12 has
* Centos7: only one version (1.1.1k) OpenSSL installed
* Centos8: go back to use default OpenSSL (1.1.1k)
2022-05-26 19:33:04 +02:00
Zaiming (Stone) Shi 29622558c5 ci: pin emqx-buider 4.4-12
Centos/Rockylinux had troulbe booting because OpenSSL version
was too new (1.1.1n).

builder 4.4-12 has
* Centos7: only one version (1.1.1k) OpenSSL installed
* Centos8: go back to use default OpenSSL (1.1.1k)
2022-05-26 18:04:01 +02:00
Zaiming (Stone) Shi 31ade29bae Merge tag 'v4.3.14' into main-v4.3
v4.3.14 has been re-tagged to fix openssl issue found in centos
packages

also raspbian10 has been removed from ci because it's too slow
to emulate
2022-05-26 16:55:37 +02:00
Zaiming (Stone) Shi 9274899ce9 ci: delete raspbian10 from build list 2022-05-26 16:53:56 +02:00
gsychev d2e4ed37c3
Merge pull request #7984 from emqx/shared_dispatch_full_inflight
Shared dispatch full inflight
2022-05-26 10:20:04 +00:00
JianBo He 157bcffd6f
Merge branch 'main-v4.3' into shared_dispatch_full_inflight 2022-05-26 16:53:35 +08:00
DDDHuang ed8c61bf8d
Merge pull request #8044 from DDDHuang/log_format
fix: logger formatter
2022-05-26 16:51:35 +08:00
Georgy Sychev aabfb71804 chore: changes.md 2022-05-26 12:32:15 +04:00
JianBo He 5dc733940e
Merge pull request #8043 from HJianBo/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-05-26 16:07:11 +08:00
DDDHuang 64a455bf8e fix: old date format style example & some code format 2022-05-26 16:06:04 +08:00
JianBo He 4b36d9b08b chore: bump version to 4.4.4-rc.2 2022-05-26 13:57:04 +08:00
JianBo He cfbf2ca4d2 Merge tag 'v4.3.15-rc.2' into merge-main-v4.3-into-v4.4 2022-05-26 13:34:33 +08:00
JianBo He 6efa41b346
Merge pull request #8051 from HJianBo/test-ci
build: fix 'fatal: unsafe repository ...' on ubuntu20.04
2022-05-26 13:33:22 +08:00
DDDHuang e1ad8aab46 fix: date format funs & logger conf & appup & change log 2022-05-26 13:13:00 +08:00
DDDHuang 4fc5cb2817 fix: rule engine date format fun & date to timestamp 2022-05-26 12:57:53 +08:00
DDDHuang 664ebcc192 fix: log date format by emqx_calendar 2022-05-26 12:57:53 +08:00
DDDHuang 34ec0cc04b fix: logger formatter 2022-05-26 12:57:53 +08:00
JianBo He 4655d55192 build: fix 'fatal: unsafe repository ...' on ubuntu20.04 2022-05-26 12:50:39 +08:00
JianBo He c5349cef64 Merge remote-tracking branch 'ce/main-v4.3' into merge-main-v4.3-into-v4.4 2022-05-26 11:18:15 +08:00
JianBo He cd5889fb92
Merge pull request #8047 from HJianBo/bump-vsn-for-v4.3
chore: bump to 4.3.15-rc.2
2022-05-26 11:08:23 +08:00
JianBo He c9f45a692a chore: bump to 4.3.15-rc.2 2022-05-26 09:40:27 +08:00
Georgy Sychev 31d4c92a17 fix(shared): retry dispatch when inflights are full 2022-05-25 20:31:10 +04:00
Zaiming (Stone) Shi 314f2ae4b5
Merge pull request #8040 from zmstone/0524-fix-ram-alarm-4.3
fix(alarm): fix false sysmem usage alarm
2022-05-25 17:13:27 +01:00
Zaiming (Stone) Shi 5a84b2c623 chore: only deal with 0-100 scale sysmem high watermark 2022-05-25 16:35:08 +02:00
Zaiming (Stone) Shi 1bebbd6ee5 fix(emqx_os_mon): ensure alarm is deactivated on unsupported platforms 2022-05-25 16:21:53 +02:00
Zaiming (Stone) Shi 0400638f71 feat(update_appup.escript): allow skipped versions
Say app current version is 1.1.2, and the compare baes is
version 1.1.1, but there is a 1.1.2 in appup.

We may skip updating appup instructions for 1.1.2
as it's never used, (at least not in EMQX)
2022-05-25 15:36:12 +02:00
Zaiming (Stone) Shi 17b9baf509 fix(alarm): fix false sysmem usage alarm
Use information from lc app to trigger sysmem alarm set/clear actions
2022-05-25 15:35:42 +02:00
JianBo He c839df539b chore: rearrange CHANGS-4.4.md 2022-05-25 17:03:48 +08:00
JianBo He 7862d75ee4 Merge remote-tracking branch 'ce/main-v4.3' into merge-main-v4.3-into-v4.4 2022-05-25 16:59:04 +08:00
Zaiming (Stone) Shi 7fc0a84b43
Merge pull request #8033 from zmstone/0524-fix-bin-emqx-license-option
fix(bin/emqx): fix license option to allow space in path
2022-05-24 09:46:52 +01:00
JianBo He 1038762408
Merge pull request #8031 from HJianBo/fix-modules-import-auth-mnesia
Fix modules import auth mnesia
2022-05-24 16:46:38 +08:00
Zaiming (Stone) Shi c741b9dfbe fix(bin/emqx): fix license option to allow space in path 2022-05-24 09:45:58 +02:00
Shawn d9252dc672 fix(schema): init resources before restoring schema registry 2022-05-24 14:37:44 +08:00
JianBo He 355f859a9b test: format data-export files 2022-05-24 14:37:44 +08:00
JianBo He 0eef297747 chore: fix dialyzer error 2022-05-24 14:37:44 +08:00
JianBo He 1531b34f8a test: add cases for importing e427 2022-05-24 14:37:44 +08:00
JianBo He 8fe933e885 fix: ensure auth_mnesia started first 2022-05-24 14:37:44 +08:00
Xinyu Liu cd95166c01
Merge pull request #8030 from terry-xiaoyu/top_level_epgsql_deps
chore: move epgsql deps to the top-level rebar.config
2022-05-24 11:10:51 +08:00
Shawn 6e7cbc1b9b chore: move epgsql deps to the top-level rebar.config 2022-05-24 09:33:17 +08:00
Zaiming (Stone) Shi 391c015154
Merge pull request #8026 from thalesmg/fix-node-dump-43
fix(node_dump): define `RUNNER_ROOT_DIR` before sourcing vars
2022-05-23 21:36:00 +01:00
Thales Macedo Garitezi 24f0592e94
fix(node_dump): define `RUNNER_ROOT_DIR` before sourcing vars
Port of https://github.com/emqx/emqx/pull/7733

`emqx_vars` requires `RUNNER_ROOT_DIR` to be defined before being
sourced.
2022-05-23 16:23:46 -03:00
Xinyu Liu e5098869c9
Merge pull request #8025 from emqx/copy-of_main-v4.3
merge main-v4.3 to main-v4.4
2022-05-23 23:25:20 +08:00
Shawn 433d74254e chore: dashboard v4.4.10 2022-05-23 23:24:32 +08:00
Xinyu Liu 211fee3035
Merge branch 'main-v4.4' into copy-of_main-v4.3 2022-05-23 23:19:19 +08:00
Xinyu Liu f1f7ace723
Merge pull request #8024 from thalesmg/fix-bkp-restore-changelog
chore: update changelog
2022-05-23 22:45:15 +08:00
Shawn 41331c5c1a chore: release 4.3.15-rc.1 2022-05-23 22:26:20 +08:00
Thales Macedo Garitezi 3689977e26
chore: update changelog 2022-05-23 11:24:52 -03:00
Zaiming (Stone) Shi a17e415e47
Merge pull request #8014 from zmstone/0523-docs-update-changelog
docs: update changelog for 4.4
2022-05-23 15:19:07 +01:00
Xinyu Liu c2a64facd4
Merge pull request #8022 from HJianBo/enhance-auth-mongo-appup
chore: enhance emqx_auth_mongo appup.src
2022-05-23 22:02:06 +08:00
Xinyu Liu a1120ef09b
Merge pull request #8023 from HJianBo/pretty-change-logs
chore: pretty change logs
2022-05-23 21:51:22 +08:00
JianBo He ae8b41e87e
Merge pull request #8015 from zmstone/0523-update-changelog-4.3
docs: add missing docs for changes made in bin/emqx and upgrade script
2022-05-23 21:50:39 +08:00
JianBo He 95d613e204 chore: pretty change logs 2022-05-23 21:48:26 +08:00
JianBo He 90aa301830 chore: enhance emqx_auth_mongo appup.src 2022-05-23 21:44:05 +08:00
Thales Macedo Garitezi cfd009abe1
Merge pull request #7996 from thalesmg/fix-import-data-outside-bkp
fix(backup): accept files outside `data/dir` when importing
2022-05-23 10:36:07 -03:00
Xinyu Liu 814f4fee48
Merge pull request #8019 from HJianBo/restart-auth-pgsql
chore(pgsql): restart emqx_auth_pgsql due to the egpsql upgraded
2022-05-23 20:30:06 +08:00
JianBo He 2b81839126 chore(pgsql): restart emqx_auth_pgsql due to the egpsql upgraded
We have to restart the emqx_auth_pgsql because epgsql has upgraded 4.4.0 to 4.6.0
see: #8001
2022-05-23 20:27:41 +08:00
Xinyu Liu 31235ff654
Merge pull request #8017 from HJianBo/update-changes-for-mgmt
chore: update changes and appup.src for emqx_management
2022-05-23 19:45:55 +08:00
JianBo He c93626e97f chore: update changes and appup.src for emqx_management 2022-05-23 18:05:41 +08:00
JianBo He b97f7fa8fc
Merge pull request #8005 from thalesmg/fix-mgmt-listener-port
fix(mgmt): allow binding to specific interface
2022-05-23 18:01:45 +08:00
Zaiming (Stone) Shi 10b01be264 docs: update changelog for 4.4 2022-05-23 11:42:27 +02:00
Zaiming (Stone) Shi 6dcdb58482 docs: add missing docs for changes made in bin/emqx and upgrade script 2022-05-23 11:39:29 +02:00
Xinyu Liu 5ab6943133
Merge pull request #8012 from DDDHuang/pgsql_emqx
fix: epgsql use emqx fork
2022-05-23 14:37:37 +08:00
DDDHuang e73cd57b5a fix: epgsql use emqx fork 2022-05-23 14:35:23 +08:00
Xinyu Liu 6c3059f891
Merge pull request #8010 from terry-xiaoyu/copy_of_main-v4.3
Copy of main v4.3
2022-05-23 13:22:10 +08:00
Shawn 98a06f25b0 fix: remove downgrade emqx_metrics instrs from emqx.appup.src 2022-05-23 12:48:38 +08:00
Shawn b330f0f2a2 fix: conflicts between main-v4.3 and main-v4.4 2022-05-23 11:57:26 +08:00
Shawn ca842aa869 fix: merge main-v4.3 to main-v4.4 2022-05-23 11:23:27 +08:00
JianBo He 5a66f1e854
Merge pull request #7987 from zhongwencool/more-msg-check-erlang-failed
chore: show more error msg when check_erlang_start failed
2022-05-23 10:17:57 +08:00
JianBo He 25e67bf3f4
Merge pull request #8002 from JimMoen/refactor-auth-metrics
refactor(metrics): clearer auth success/failure metrics
2022-05-23 09:02:58 +08:00
JimMoen 4ed8f4d953 chore: update CHANGES.md 2022-05-22 22:06:02 +08:00
JimMoen 69abca17f2 chore(appup): bump app version & update appup 2022-05-22 22:06:02 +08:00
JimMoen bd23dae523 refactor(auth): auth apps use counter in emqx_metrics 2022-05-22 22:06:02 +08:00
Thales Macedo Garitezi e57e2f68d4
fix(mgmt): allow binding to specific interface
When one tries to define the management http listener as, for example,
`172.25.0.2:8081`, ranch is given `{port, {"172.25.0.2",8081}}` and
breaks.

```sh
env EMQX_MANAGEMENT__LISTENER__HTTP=172.25.0.2:8081 make quickrun
```

```
2022-05-20T13:14:19.451272-03:00 [error] Supervisor: {<0.2485.0>,ranch_listener_sup}. Context: start_error. Reason: badarg. Offender: id=ranch_acceptors_sup,pid=undefined.
2022-05-20T13:14:19.451400-03:00 [error] crasher: initial call: supervisor:ranch_acceptors_sup/1, pid: <0.2487.0>, registered_name: [], exit: {badarg,[{inet_tcp,listen,2,[{file,"inet_tcp.erl"},{line,166}]},{ranch_acceptors_sup,init,1,[{file,"ranch_acceptors_sup.erl"},{line,39}]},{supervisor,init,1,[{file,"supervisor.erl"},{line,330}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,423}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}, ancestors: [<0.2485.0>,ranch_sup,<0.2187.0>], message_queue_len: 0, messages: [], links: [<0.2485.0>], dictionary: [{logger,error_logger}], trap_exit: true, status: running, heap_size: 610, stack_size: 29, reductions: 612; neighbours:
2022-05-20T13:14:19.451754-03:00 [error] Minirest(Handler): Start http:management listener on {"172.25.0.2",8081} unsuccessfully:
```

So, it’s currently not possible to make the management listener bind
to a specific interface.
2022-05-20 16:50:36 -03:00
Thales Macedo Garitezi 78c5cb4aac
refactor: only import checks for external backup file 2022-05-20 10:21:47 -03:00
JimMoen 9435fe0bb9 refactor(metrics): more understandable auth metrics
`client.auth.success`/`client.auth.failure`
`client.auth.success.anonymous`
2022-05-20 17:48:41 +08:00
Xinyu Liu 5e3b0cf2d8
Merge pull request #8003 from terry-xiaoyu/deny_relup_between_minor_versions
fix: deny relup between minor versions
2022-05-20 16:43:07 +08:00
Shawn 92c09fdd7b fix: deny relup between minor versions 2022-05-20 15:40:59 +08:00
DDDHuang e6a2a3d5d2
Merge pull request #7999 from terry-xiaoyu/ldap_flaky_tests
fix(test): flaky test cases of auth_ldap
2022-05-20 15:26:22 +08:00
Xinyu Liu e68c100cb2
Merge pull request #8001 from DDDHuang/up_pgsql_v43
Update pgsql SDK for otp23 & otp24
2022-05-20 15:19:09 +08:00
Shawn 35d091aa1b fix(test): flaky test cases of auth_ldap 2022-05-20 14:18:39 +08:00
DDDHuang c10c75ce00 fix: appup for epgsql 4.4.0 -> 4.6.0 2022-05-20 14:15:52 +08:00
DDDHuang ae71125271 fix: update pgsql sdk for otp23 & otp24 2022-05-20 14:04:53 +08:00
Thales Macedo Garitezi e8aa53feec
Merge pull request #7997 from thalesmg/fix-dashboard-verify-opt
fix(dashboard): use atom for `verify` tls option in dashboard listener
2022-05-19 17:15:00 -03:00
Thales Macedo Garitezi c705f294a1
fix(dashboard): use atom for `verify` tls option in dashboard listener
```
2022-05-19T10:47:34.262135-04:00 [error] Failed to start Ranch
listener 'https:dashboard' in ranch_ssl:listen <snip> for reason {options,{verify,"verify_none"}} (unknown POSIX error)
```
2022-05-19 13:48:31 -03:00
Thales Macedo Garitezi 67e3e2de96
fix(backup): accept files outside `data/dir` when importing
Fixes https://github.com/emqx/emqx/issues/7990

Currently, when importing a data backup using `emqx_ctl data import
/some/data.json`, it'll only search in the `data/backup` directory and
fail if the file is not inside that dir.
2022-05-19 11:24:57 -03:00
gsychev 192c65047e
Merge pull request #7807 from emqx/shared_redispatch43
feat(shared): redispatch to another shared sub, when no ACK received
2022-05-19 12:14:25 +00:00
Xinyu Liu df3d935b32
Merge pull request #7992 from EMQ-YangM/update-CHANGES
fix: update CHANGES-4.3.md
2022-05-19 15:43:00 +08:00
EMQ-YangM b2176b7652 fix: update CHANGES-4.3.md 2022-05-19 15:39:53 +08:00
Xinyu Liu 5806d5107f
Merge pull request #7991 from EMQ-YangM/add_rule_engine_func
feat: add rule engine function float2str/2
2022-05-19 15:31:45 +08:00
EMQ-YangM 7b38c66538 feat: add rule engine function float2str/2 2022-05-19 14:18:22 +08:00
zhongwencool 2a348c812c chore: show more error msg when check_erlang_start failed 2022-05-19 11:21:57 +08:00
zhongwencool 144efca79c
Merge pull request #7983 from zhongwencool/clients-api-mqueue-len-dropped-support
feat: client api support mqueue_len/mqueue_dropped filter
2022-05-19 10:29:37 +08:00
JianBo He 411ee84a35 chore(session): fix bad indent 2022-05-19 09:23:58 +08:00
Xinyu Liu 04b02b7b6f
Merge pull request #7979 from DDDHuang/bad_node_name
fix(conf): check node name, otp regular expression
2022-05-19 08:49:26 +08:00
zhongwencool 3df5c15819 feat: client apisupport mqueue_len/mqueue_dropped filter 2022-05-18 23:05:02 +08:00
Georgy Sychev b345002e84 feat(shared): redispatch to another shared sub, when no ACK received 2022-05-18 18:28:58 +04:00
Xinyu Liu 03c1efa439
Merge pull request #7977 from EMQ-YangM/hexstr2bin_support_half_byte
fix: hexstr2bin support half byte
2022-05-18 17:47:23 +08:00
EMQ-YangM de1d8909c3 fix: hexstr2bin support half byte 2022-05-18 17:45:26 +08:00
DDDHuang 1adb33a6a0 fix: check node name, regular expression (good idea from stone) 2022-05-18 15:59:33 +08:00
DDDHuang f269260293
Merge pull request #7745 from DDDHuang/fetch_re_status
fix: test resource with fetch new status
2022-05-18 15:55:07 +08:00
DDDHuang 71a7d71f68 fix(rule_engine): bad status SUITE 2022-05-18 15:18:12 +08:00
DDDHuang cdb1c149e7 fix(conf): check node name, otp regular expression 2022-05-18 14:30:16 +08:00
DDDHuang a67dff4568 fix(rule_engine): better function name for resource 2022-05-18 11:17:06 +08:00
DDDHuang f3bef3c81c fix(rule_engine): remove resource with clean alarms 2022-05-18 10:37:54 +08:00
DDDHuang a5716318b6 fix: better code format 2022-05-18 09:59:35 +08:00
zhongwencool 84fa6bfaeb
Merge pull request #7969 from zhongwencool/auth-acl-fitler-support
feat: auth acl fitler support
2022-05-17 18:14:46 +08:00
Ilya Averyanov bdfe4f89a1
Merge pull request #7888 from savonarola/fix-jwt-acl
fix(jwt auth): fix claim validation
2022-05-17 12:08:38 +03:00
JimMoen b1d642bd6a
Merge pull request #7972 from JimMoen/fix-pub-api 2022-05-17 16:31:54 +08:00
JimMoen 77fb8bfc19 test(mgmt): use pub api with bad params 2022-05-17 15:53:13 +08:00
JimMoen d655bea16a fix(mgmt): pubsub api use bad params caused sub client crash 2022-05-17 15:53:13 +08:00
zhongwencool 56f73548cc fix: regurar appup vsn is string 2022-05-17 14:18:32 +08:00
zhongwencool 8882778a43 fix: appup failed 2022-05-17 13:07:18 +08:00
zhongwencool 2db123bec6 chore: update auth/acl changelog 2022-05-17 11:34:55 +08:00
DDDHuang eb5956316a fix(emqx_rule_engine): export func for rpc 2022-05-17 11:27:55 +08:00
zhongwencool 73faf08059 feat: mnesia auth/acl support multiple condition queries 2022-05-17 11:19:29 +08:00
DDDHuang 86e8de4737 fix: merge main-4.3 2022-05-17 09:49:19 +08:00
Ilya Averyanov 8198e3496f fix(jwt auth): fix claim validation 2022-05-16 21:40:14 +03:00
Zaiming (Stone) Shi 810ca65011
Merge pull request #7953 from zmstone/0513-deny-all-acl-for-expired-token
fix(acl): deny all ACl when token expired
2022-05-16 10:19:47 +01:00
JianBo He 7c82b84293
Merge pull request #7960 from HJianBo/fix-mqttsn-qos2
fix(mqttsn): fix mqtt-sn client disconnected due to re-send a duplicated qos2 message
2022-05-16 16:46:21 +08:00
JianBo He e8aa1ef988
Merge pull request #7962 from HJianBo/add-proto-name-for-client-disconnected
feat(rule-engine): add proto_name/proto_ver for $event/client_disconnected event
2022-05-16 16:45:28 +08:00
JianBo He 442248f1a4 feat(rule-engine): add proto_name/proto_ver for $event/client_disconnected event 2022-05-16 14:30:41 +08:00
JianBo He 7357ee5918 fix(mqttsn): fix mqtt-sn client disconnected due to re-send a duplicated qos2 message 2022-05-16 13:54:38 +08:00
JianBo He 61014e5088
Merge pull request #7955 from zmstone/0515-fix-verify-none-for-telemetry-clients
fix(telemetry): Ensure verify_none for http client
2022-05-16 09:42:30 +08:00
Zaiming (Stone) Shi ea9af26642 chore(appup): bump emqx_telemetry app vsn and update appup 2022-05-15 23:31:39 +02:00
Zaiming (Stone) Shi ef0c14c522 fix(telemetry): Ensure verify_none for http client 2022-05-15 23:16:32 +02:00
Zaiming (Stone) Shi 655c2987f3 fix(acl): deny all ACl when token expired 2022-05-15 09:24:02 +02:00
Zaiming (Stone) Shi 9463d02fd0
Merge pull request #7885 from zmstone/build-macos-do-not-depend-on-gsed
build(macos): do not depend on gsed
2022-05-09 08:52:42 +01:00
Yang Miao d6178f8611
Merge pull request #7894 from EMQ-YangM/add_format_time
feat: add some date format functions
2022-05-09 10:15:08 +08:00
EMQ-YangM f3d91abe1a fix: update CHANGES-4.3.md 2022-05-09 09:52:11 +08:00
EMQ-YangM be16dfa758 fix: update emqx_rule_engine.appup.src 2022-05-07 17:53:13 +08:00
EMQ-YangM 8558a62ee2 feat: add some date format functions 2022-05-07 17:04:45 +08:00
Zaiming (Stone) Shi 4b0fe016f3 build(macos): do not depend on gsed 2022-05-07 08:35:46 +02:00
Thales Macedo Garitezi 5d22483634
Merge pull request #7876 from thalesmg/bump-ekka-0-8-1-10
chore(ekka): bump ekka -> 0.8.1.10
2022-05-06 09:02:50 -03:00
Thales Macedo Garitezi 469d239140
chore(ekka): bump ekka -> 0.8.1.10
Improves autocluster resilience against split-brain during startup.

https://github.com/emqx/ekka/pull/158
2022-05-05 16:32:57 -03:00
zhongwencool 492f6ba56c
Merge pull request #7862 from zhongwencool/username-as-clientid-not-valid-v4.3
fix: don't allow empty username if username_as_clientid is true
2022-05-05 17:21:43 +08:00
zhongwencool 554548dbfb chore: update emqx.appup.src and changelog 2022-05-05 16:52:33 +08:00
zhongwencool 761436c967 fix: don't allow empty username if username_as_clientid is true 2022-05-05 10:50:53 +08:00
Zaiming (Stone) Shi 787530459f chore: bump emqx_management app version to 4.4.4 2022-04-29 20:22:21 +02:00
Zaiming (Stone) Shi ea7f845d9f Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2022-04-29 20:21:44 +02:00
Thales Macedo Garitezi e8d1e4a708
Merge pull request #7828 from thalesmg/fix-update-appup-force-clean
fix(update_appup): clean untracked nested git directories
2022-04-29 15:13:32 -03:00
Zaiming (Stone) Shi 47377e0708 ci: rename apps_vsn_check for main-v4.x
so it's a different name for master branch and 4.x branches
2022-04-29 10:14:23 +02:00
Zaiming (Stone) Shi fb18c565c8
Merge pull request #7836 from zmstone/0429-4.x-systemd-service-file-path-to-bash
fix: use /bin/bash in systemd service file
2022-04-29 09:12:10 +01:00
Zaiming (Stone) Shi 6e404f7220 fix: use /bin/bash in systemd service file
Otherwise ubuntu may have troulbe to boot
2022-04-29 07:54:13 +02:00
Zaiming (Stone) Shi 3569576b3c
Merge pull request #7831 from thalesmg/fix-helm-tag
fix(helm): use tag if defined
2022-04-28 20:50:02 +01:00
Thales Macedo Garitezi 315bfa0385
fix(helm): use tag if defined
The previous code was ignoring `.Values.image.tag` and always using
`.Char.AppVersion`.
2022-04-28 14:58:35 -03:00
Thales Macedo Garitezi 0cfeca9d90
fix(update_appup): clean untracked nested git directories
Since the script copies the current workdir into the temporary
directory for the previous build, when we latter try to clean the
directory, `git clean -fdx` refuses to clean the folders of some
dependencies:

```
+ git clean -fdx
Skipping repository _build/default/lib/lc
```

So, if the branch contains a dependency with changed version, it'll
not be picked up by the script, as both versions will be identical and
hence have no `.appup` difference.
2022-04-28 11:09:25 -03:00
Zaiming (Stone) Shi f07bb5a5d1
Merge pull request #7761 from emqx/eredis_cluster_bump
chore(eredis_cluster): bump
2022-04-27 13:22:26 +01:00
Zaiming (Stone) Shi c5329d7f60
Merge pull request #7787 from zmstone/0426-bad-password-penalty
fix: add 2 seconds delay penalty for bad logins
2022-04-27 10:33:43 +01:00
Xinyu Liu e415425780
Merge pull request #7774 from EMQ-YangM/fix_error_field
fix: remove error field
2022-04-27 13:40:51 +08:00
EMQ-YangM e67b710fac fix: update emqx_rule_engine.appup.src 2022-04-27 09:35:20 +08:00
Zaiming (Stone) Shi 4f45670725 fix: add 2 seconds delay penalty for bad logins 2022-04-26 21:02:45 +02:00
gsychev 1bae610c3d
chore(eredis): changelog
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-04-26 18:37:20 +00:00
Georgy Sychev 8385b3cca4 chore(eredis_cluster): bump eredis version to 0.7.2 2022-04-26 19:30:36 +04:00
EMQ-YangM ffd51e1fe6 fix: remove error field 2022-04-26 19:07:00 +08:00
Zaiming (Stone) Shi 0d43bd6243
Merge pull request #7759 from zmstone/fix-improve-app-secret-randomisation
fix(emqx_mgmt_auth): randomise all bytes in app secret
2022-04-25 16:54:19 +01:00
Zaiming (Stone) Shi 0dd48e30b6 fix(emqx_mgmt_auth): randomise all bytes in app secret
prior to this change, app secrets are uuids which is not
completely random.
2022-04-25 11:34:46 +02:00
zhongwencool f7f1b0ecbf
Merge pull request #7689 from zhongwencool/fix-sub-search
fix: topic filter with qos/clientid/share
2022-04-25 09:34:42 +08:00
zhongwencool 4789f1f97b chore: bump management to 4.3.13 2022-04-24 17:37:37 +08:00
zhongwencool 9d4d918e2c
Merge branch 'main-v4.3' into fix-sub-search 2022-04-24 17:18:01 +08:00
zhongwencool 29e453383a chore: update changelog 2022-04-24 16:48:12 +08:00
Rory Z d052680793
Merge pull request #7714 from Rory-Z/feat/helm-ingress
feat(helm): the pathType of ingress can be made configurable via values
2022-04-24 09:39:14 +08:00
Zaiming (Stone) Shi 5182016ad5
Merge pull request #7737 from zmstone/0423-fix-sed-replace-for-macos10
fix(bin/emqx): make sed replace \n work in macos 10
2022-04-23 13:56:22 +01:00
Zaiming (Stone) Shi 2710dff8c5
Merge pull request #7736 from zmstone/merge-v43-to-v44
Merge v43 to v44
2022-04-23 13:56:03 +01:00
Zaiming (Stone) Shi 5d8539c01a fix(bin/emqx): make sed replace \n work in macos 10 2022-04-23 13:27:02 +02:00
Zaiming (Stone) Shi a9acfc0ee1 fix(bin/emqx): fix sed replace with '/n' work for macos 10 2022-04-23 13:22:05 +02:00
Zaiming (Stone) Shi 4330edd674 fix(appup): bump to 4.4.4-beta.1
also fix emqx appup instructions
2022-04-23 11:50:07 +02:00
Zaiming (Stone) Shi 42aa0e5d0a chore: add debug output to update-appup.sh 2022-04-23 10:43:58 +02:00
Zaiming (Stone) Shi be24868b36 Merge remote-tracking branch 'origin/fix/v4.4.3' into merge-v43-to-v44 2022-04-23 10:42:28 +02:00
Zaiming (Stone) Shi 0bf55b99e3 chore: fix appup after merge from 4.3 2022-04-23 10:32:13 +02:00
Zaiming (Stone) Shi 723f294119 Merge remote-tracking branch 'origin/main-v4.3' into merge-v43-to-v44 2022-04-23 10:07:25 +02:00
Ilya Averyanov 7ee1d6d54d
Merge pull request #7620 from savonarola/jwt-acl-nocache
Add support for JWT authorization
2022-04-22 14:54:16 +03:00
Zaiming (Stone) Shi 0764ef9303
Merge pull request #7720 from zmstone/0422-simplify-windows-scripts-4.3
fix(windows): boot console and remote_console from erl not werl
2022-04-22 12:35:24 +01:00
Ilya Averyanov 41746e8d7a feat(emqx_auth_jwt): use JWT for ACL checks 2022-04-22 12:22:58 +03:00
Ilya Averyanov 36c1ecd9b7 chore(emqx_auth_jwt): do not use gen_server call for jwt verification 2022-04-22 12:16:32 +03:00
Zaiming (Stone) Shi 4a5602dc9c fix(windows): boot console and remote_console from erl not werl
Otherwise it's impossible to troubleshoot when werl fail to start
2022-04-22 09:04:11 +02:00
zhongwencool 10bca7f6b5 fix: topic filter with qos/clientid/share 2022-04-22 14:42:12 +08:00
Zaiming (Stone) Shi 59660e99db
Merge pull request #7711 from emqx/dev/v4.3.15
merge dev/v4.3.15 to main-v4.3
2022-04-22 07:15:54 +01:00
JianBo He b267866dc1
Merge pull request #7647 from lafirest/fix/remove_empty_check_in_frame_4.3
fix(frame): remove empty topic check, because it checked in emqx_channel
2022-04-22 14:13:19 +08:00
Zaiming (Stone) Shi 1de3ed8783 Merge remote-tracking branch 'origin/main-v4.3' into dev/v4.3.15 2022-04-22 07:45:00 +02:00
Rory Z 74e9754154 feat(helm): the pathType of ingress can be made configurable via values 2022-04-22 10:00:08 +08:00
JianBo He 7981e5f5bd
Merge pull request #7706 from HJianBo/merge-v4314
Merge v4.3.14 to main-v4.3
2022-04-21 22:24:04 +08:00
JianBo He 14bc646e86 Merge tag 'v4.3.14' into merge-v4314 2022-04-21 21:14:53 +08:00
Zaiming (Stone) Shi a070bf5e2f
Merge pull request #7681 from zmstone/0419-4.3-fix-rpm-dependencies
fix(rpm): ensure correct dependencies for el7 and el8
2022-04-21 10:35:18 +01:00
JianBo He bd640a1748 Merge tag 'v4.3.14' into fix/v4.4.3 2022-04-21 17:27:42 +08:00
Zaiming (Stone) Shi ec80a05a50
Merge pull request #7702 from savonarola/fix-install_upgrade
fix(install_upgrade): fix unpack_zipballs return value
2022-04-21 10:05:14 +01:00
Ilya Averyanov d60252d678 fix(install_upgrade): fix unpack_zipballs return value 2022-04-21 11:56:51 +03:00
firest 8fcff16bff fix: fix bad indent 2022-04-21 15:11:28 +08:00
Zaiming (Stone) Shi 81d62082ec chore(emqx_dashboard): bump app vsn 2022-04-20 10:41:10 +02:00
Zaiming (Stone) Shi 31b4be79f0 chore(emqx_rule_engine): update appup 2022-04-20 09:29:14 +02:00
Zaiming (Stone) Shi b068937ce3 fix(rpm): ensure correct dependencies for el7 and el8 2022-04-19 22:49:40 +02:00
firest 03cdcab6f6 chore: bump emqx version 2022-04-18 18:27:19 +08:00
firest 8a269099ad fix(frame): remove empty topic check, because it checked in emqx_channel 2022-04-18 14:23:22 +08:00
Xinyu Liu 645b79c793
Merge pull request #7646 from emqx/copy-of_main-v4.3
Merge main-v4.3 -> main-v4.4
2022-04-18 12:02:40 +08:00
Xinyu Liu ca43fb73c5
Merge branch 'main-v4.4' into copy-of_main-v4.3 2022-04-18 12:02:11 +08:00
Xinyu Liu 93411ecd4b
Merge pull request #7645 from HJianBo/bump-vsn-for-v4.3
chore: tag 4.3.14
2022-04-18 11:59:07 +08:00
JianBo He c0f6c08836 chore: tag 4.3.14 2022-04-18 11:55:46 +08:00
Xinyu Liu cbf5ad849f
Merge pull request #7637 from HJianBo/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-04-16 12:41:53 +08:00
JimMoen 09a100fc2d chore: apps version check ignore comments in erl/hrl file 2022-04-16 12:10:52 +08:00
JianBo He 89c65b6535 Merge tag 'v4.3.14-rc.4' into merge-main-v4.3-into-v4.4 2022-04-16 11:28:07 +08:00
Xinyu Liu 79b43e2ae0
Merge pull request #7636 from HJianBo/bump-vsn-for-v4.3
Pre-release v4.3.14-rc.4: Bump vsn
2022-04-16 10:51:28 +08:00
JianBo He e986a2cf35 chore: bump vsn 2022-04-16 10:49:32 +08:00
JianBo He ffdf7fb7b6
Merge pull request #7629 from DDDHuang/backup_file_43
fix: backup data filename, uri decode
2022-04-16 10:36:43 +08:00
Xinyu Liu ade2716616
Merge pull request #7635 from terry-xiaoyu/test_resource_failed
fix(rule): test resource failed from all nodes
2022-04-16 02:18:44 +08:00
Shawn 898dc00f58 fix(rule): test resource failed from all nodes 2022-04-16 01:49:01 +08:00
DDDHuang 9cf6b47e95
Merge pull request #7630 from DDDHuang/backup_file_44
fix: backup data filename, uri decode
2022-04-15 17:50:24 +08:00
DDDHuang b28c751856 fix: backup data filename, uri decode 2022-04-15 17:12:04 +08:00
DDDHuang 12874aa688 fix: backup data filename, uri decode 2022-04-15 16:12:40 +08:00
JianBo He 5907424a83
Merge pull request #7470 from JimMoen/update-copyright-year
Update copyright years
2022-04-15 14:40:43 +08:00
Xinyu Liu 9b18bcd3c2
Merge pull request #7619 from HJianBo/merge-main-v4.3-into-v4.4
Pre-release v4.4.3-rc.3: Merge main v4.3 into v4.4
2022-04-14 11:58:30 +08:00
JianBo He c8c52dfc39 Merge remote-tracking branch 'ce/main-v4.3' into merge-main-v4.3-into-v4.4 2022-04-14 11:56:35 +08:00
Xinyu Liu 3519dd167a
Merge pull request #7618 from HJianBo/relv4314
Pre-release v4.3.14-rc.3: Bump vsn
2022-04-14 11:55:49 +08:00
JianBo He d40a146139 chore: bump vsn 2022-04-14 11:54:05 +08:00
JimMoen 8f13a96788 chore: ignore comments and blank lines when app version checking 2022-04-14 11:23:25 +08:00
JimMoen 6168745f90 chore: update copyright 2022-04-14 11:23:25 +08:00
Xinyu Liu 97dd625c38
Merge pull request #7616 from emqx/revert-7596-jwt-acl-nocache
Revert "Add support for JWT authorization"
2022-04-14 11:14:40 +08:00
Xinyu Liu cb1b318312
Merge pull request #7617 from HJianBo/fix-shared-subs
fix(shared-sub): convert group name to binary
2022-04-14 11:08:27 +08:00
JianBo He 7b14e822a6 fix(shared-sub): convert group name to binary 2022-04-14 10:59:29 +08:00
Xinyu Liu a89f6f4b95
Merge pull request #7612 from terry-xiaoyu/post_existing_rules
fix(rules): deny POST /rules with an existing Id
2022-04-14 10:48:22 +08:00
JianBo He 47a5bc3f09
Revert "Add support for JWT authorization" 2022-04-14 10:44:06 +08:00
Shawn ae8f03a188 fix(rules): deny POST /rules with an existing Id 2022-04-13 23:16:29 +08:00
Ilya Averyanov 3544537906
Merge pull request #7596 from savonarola/jwt-acl-nocache
Add support for JWT authorization
2022-04-13 17:21:45 +03:00
Ilya Averyanov d8db671abb feat(emqx_auth_jwt): use JWT for ACL checks 2022-04-13 13:17:27 +03:00
Ilya Averyanov f763775588 chore(emqx_auth_jwt): do not use gen_server call for jwt verification 2022-04-13 13:16:53 +03:00
Xinyu Liu ff1d91a2f3
Merge pull request #7602 from EMQ-YangM/fix_rule-engine
fix: fix behavior of rule-engine when selection field does not exist
2022-04-13 17:41:26 +08:00
Xinyu Liu 4e515a3f83
Merge pull request #7603 from EMQ-YangM/fix_zip_compress
fix: add zip_compress functions
2022-04-13 15:37:02 +08:00
EMQ-YangM 4893cc2c6c fix: update CHANGES-4.3.md 2022-04-13 15:33:35 +08:00
EMQ-YangM 0dc26ba483 fix: create new version 2022-04-13 15:01:47 +08:00
EMQ-YangM 6600de710a fix: fix behavior of rule-engine when selection field does not exist
when the selection field does not exist, it should output field => undefined
2022-04-13 14:55:43 +08:00
EMQ-YangM 1886893fa1 fix: add zip_compress functions 2022-04-13 14:19:32 +08:00
Zaiming (Stone) Shi 69b9be13cc
Merge pull request #7584 from zmstone/0411-allow-space-in-path
fix: make possible to have white spaces in root path
2022-04-13 06:09:27 +01:00
Xinyu Liu a42de63791
Merge pull request #7599 from HJianBo/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-04-13 09:17:32 +08:00
JianBo He fab71ddcfe Merge tag 'v4.3.14-rc.2' into merge-main-v4.3-into-v4.4 2022-04-13 09:13:52 +08:00
Xinyu Liu c4b01fc2ce
Merge pull request #7595 from emqx/per_group_sub_fix
Per group sub fix
2022-04-13 09:12:12 +08:00
Georgy Sychev 8c553da72b fix(shared): group strategies are binaries now 2022-04-13 09:09:54 +08:00
Zaiming (Stone) Shi d8cad2cc6c refactor(bin/emqx_ctl): simplify emqx_ctl
There is no need to duplicate the node name/cookie resolution
in another script, everything is ready in bin/emqx
2022-04-12 23:05:52 +02:00
Zaiming (Stone) Shi 2da27392f7 chore: refine boot script with more readable help info 2022-04-12 23:05:17 +02:00
JianBo He 019076e873
Merge pull request #7594 from lafirest/test/empty_topic_name_case
test(frame): fix empty topic name case not running
2022-04-12 22:30:24 +08:00
JianBo He 9ab533b206
Merge pull request #7592 from DDDHuang/bridge_mqtt_subqos
fix: bridge mqtt config schema, subscriptions with default QoS 0
2022-04-12 18:43:42 +08:00
firest 2c47869426 test(frame): fix empty topic name case not running 2022-04-12 18:40:37 +08:00
JianBo He c28e50b6a7
Merge pull request #7587 from HJianBo/merge-main-v4.3-into-v4.4
Pre-release v4.4.3-rc2: Merge main-v4.3 into main-v4.4
2022-04-12 17:15:32 +08:00
DDDHuang 5b9452979d fix: bridge mqtt config schema, subscriptions with default QoS 0 2022-04-12 16:47:39 +08:00
JianBo He 3f9f53a1e0 chore: bump vsn 2022-04-12 13:48:43 +08:00
JianBo He f8080ed71b Merge tag 'v4.3.14-rc.2' into merge-main-v4.3-into-v4.4 2022-04-12 13:47:11 +08:00
JianBo He 6c12b5f242
Merge pull request #7585 from HJianBo/rel-v4314-rc2
chore: bump vsn to 4.3.14-rc.2
2022-04-12 13:40:02 +08:00
JianBo He b9fed0d8fb
Merge pull request #7575 from HJianBo/upgrade-ehttpc
Upgrade ehttpc to 0.2.0
2022-04-12 13:37:39 +08:00
JianBo He e9ed65de06 chore: bump vsn to 4.3.14-rc.2 2022-04-12 09:39:41 +08:00
Zaiming (Stone) Shi 5e652217c8 fix: make possible to have white spaces in root path 2022-04-12 00:05:26 +02:00
DDDHuang 116c04560d
Merge pull request #7576 from DDDHuang/bad_delete_resource
fix: random id ensure do not delete resource
2022-04-11 19:38:15 +08:00
DDDHuang 73ac4c1ff8 fix: random id ensure do not delete resource 2022-04-11 18:33:20 +08:00
JianBo He 703441c631 chore: update ehttpc to 0.2.0
In ehttpc v0.2.0, we have optimized the implementation for request collection
to reduce resource consumption. see: https://github.com/emqx/ehttpc/pull/31
2022-04-11 18:23:08 +08:00
Xinyu Liu 54d5dbec7c
Merge pull request #7555 from DDDHuang/disable_sni
fix: disable server_name_indication suport
2022-04-11 09:27:06 +08:00
DDDHuang a483f5ffa4 fix: bad appup 2022-04-10 12:57:50 +08:00
DDDHuang 4a692f0c2e fix: config schema sni disable 2022-04-10 12:57:50 +08:00
DDDHuang af4250dcf4 fix: mqtt bridge config schema sni disable spelling 2022-04-10 12:57:50 +08:00
DDDHuang 2464c110af fix: add fix sni change log 2022-04-10 12:57:50 +08:00
DDDHuang 3e9b91e53a fix: disable server_name_indication suport 2022-04-10 12:57:50 +08:00
Zaiming (Stone) Shi 13526d92ef
Merge pull request #7566 from HJianBo/bump-vsn-for-4.4
Release v4.4.3-rc.1: bump vsn
2022-04-08 18:22:34 +01:00
JianBo He 6b636d0786 chore: bump vsn to 4.4.3-rc.1 2022-04-09 01:17:38 +08:00
JianBo He f5732472df
Merge pull request #7563 from HJianBo/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-04-09 01:16:41 +08:00
JianBo He 9feb4dba30 chore: fix duplicated load_module for emqx.appup.src 2022-04-08 20:54:46 +08:00
Zaiming (Stone) Shi 4390c58ebb
Merge pull request #7564 from zmstone/0408-4.3-build-make-centos6-happy
build: make centos6 happy
2022-04-08 13:28:12 +01:00
Zaiming (Stone) Shi d205cb6fc0 build: make centos6 happy 2022-04-08 14:26:03 +02:00
JianBo He e0c3071a49 chore: fix appup.src for exhook 2022-04-08 19:59:24 +08:00
JianBo He 7461484b9e Merge tag 'v4.3.14-rc.1' into merge-main-v4.3-into-v4.4
Version v4.3.14-rc.1
2022-04-08 19:29:30 +08:00
Xinyu Liu beb5b5fada
Merge pull request #7560 from HJianBo/changes
chore: improve changes
2022-04-08 18:38:14 +08:00
JianBo He f7d8f16067 chore: improve changes 2022-04-08 18:23:03 +08:00
Shawn 4c34df4f06 chore: release 4.3.14-rc.1 2022-04-08 18:18:19 +08:00
Xinyu Liu 0a77e1a9b1
Merge pull request #7558 from lafirest/fix/empty_topic_with_alias
fix(frame): fix empty topic check error
2022-04-08 18:07:42 +08:00
zhouzb 471d04c928
Merge pull request #7554 from JimMoen/update-dashboard-4.4
chore: update dashboard for 4.4
2022-04-08 17:32:36 +08:00
firest eec204517f fix(frame): fix empty topic check error 2022-04-08 16:26:07 +08:00
Shawn d155c3adb5 fix: add emqx_app into appup.src 2022-04-08 16:09:10 +08:00
JianBo He 731c3271a6
Merge pull request #7553 from JimMoen/update-dashboard-4.3
chore: update dashboard version
2022-04-08 15:49:17 +08:00
JimMoen 3c67947c82 chore: update dashboard for 4.4 2022-04-08 14:26:35 +08:00
JimMoen 7f5abdfd5b chore: update dashboard version 2022-04-08 14:22:53 +08:00
Xinyu Liu 82657017f9
Merge pull request #7549 from HJianBo/typos-fixes
chore: eliminate some compiling warnings and improve change logs
2022-04-08 14:13:21 +08:00
Xinyu Liu db983e41ce
Merge pull request #7543 from emqx/cp-of_main-v4.3
Merge main-v4.3 to main-v4.4
2022-04-08 14:11:51 +08:00
JianBo He 570d6c5d97
Merge pull request #7541 from JimMoen/fix-helm-deploy
chore: update renamed module in helm deploy file
2022-04-08 14:07:20 +08:00
Xinyu Liu e317043109
Merge pull request #7552 from EMQ-YangM/fix_kafka_resource_update
fix: delete a resource before updating it
2022-04-08 13:46:56 +08:00
JianBo He 016ca6823b chore: disable configure shared_subscription_strategy for a group 2022-04-08 13:32:20 +08:00
JianBo He 6c39fd5696
Merge pull request #7544 from JimMoen/update-eredis-cluster
chore: update eredis_cluster version to 0.7.1
2022-04-08 11:50:07 +08:00
EMQ-YangM 8530ecec4d fix: delete a resource before updating it 2022-04-08 11:46:10 +08:00
Yang Miao 70e29b08e6
Merge pull request #7550 from EMQ-YangM/add_try_catch
fix: discard rpc call failed data
2022-04-08 11:28:01 +08:00
JianBo He 1ff371bdea test(dashboard): avoid to start useless plugins
The #7520 causes the default load_{plugins,modules} file to be used when
starting the slave node. In this case, the slave will automatically start
the emqx-dashbord plugin with the default configuration when it re-join
cluster, which will cause the applications to fail to start.
2022-04-08 11:16:39 +08:00
JianBo He bf1a3fe1eb chore: eliminate some compiling warnings and improve change logs 2022-04-08 11:16:37 +08:00
EMQ-YangM adf7d53ca5 fix: use concat replace flatten 2022-04-08 10:27:28 +08:00
EMQ-YangM 7606f55673 fix: update emqx_rule_engine.appup.src 2022-04-08 10:17:18 +08:00
EMQ-YangM 96b26bf4ce fix: discard rpc call failed data 2022-04-08 10:12:40 +08:00
DDDHuang f80a2e345c
Merge pull request #7545 from DDDHuang/start_mongo_auth
fix: start auth & acl mongo with availability check
2022-04-08 09:42:53 +08:00
JimMoen bee3973a82 test: fix flaky test 2022-04-08 09:32:27 +08:00
Zaiming (Stone) Shi b294bad88e
Merge pull request #7462 from gsychev/bridge_local_forwards
feat(shared_sub): per group strategies and local strategy
2022-04-07 16:30:05 +01:00
Zaiming (Stone) Shi 9694c3277d fix(appup): re-generate emqx.appup.src 2022-04-07 15:17:02 +02:00
JianBo He 2b28b5f8c6
Merge pull request #7524 from JimMoen/exhook-cluster-name
Exhook provide `request_meta` to distinguish `cluster_name`
2022-04-07 19:21:51 +08:00
DDDHuang 3c34cb3b6a fix: start auth & acl mongo with availability check 2022-04-07 18:27:04 +08:00
Zaiming (Stone) Shi a791459e55
Merge pull request #7530 from qzhuyan/dev/william/mnesia-wait-for-table-diagnosis
feat: mnesia wait_for_table diagnosis logging
2022-04-07 11:21:01 +01:00
Xinyu Liu 8f4e390891
Merge branch 'main-v4.4' into cp-of_main-v4.3 2022-04-07 17:53:40 +08:00
Georgy Sychev 0c74227995 feat(shared_sub): per group strategies and local strategy
Adds backward compatible per group strategy for shared subscriptions
Adds local shared subscription strategy
2022-04-07 13:40:02 +04:00
JimMoen 258ff284af chore: update eredis_cluster version to 0.7.1 2022-04-07 17:37:34 +08:00
JimMoen 1910249058 chore: update CHANGES-4.3.md and appup 2022-04-07 17:26:59 +08:00
JimMoen bdea05f022 test(exhook): other cluster_name only handle 'cilent.*' hooks 2022-04-07 17:26:59 +08:00
JimMoen e7f5372fae feat(exhook): add field `meta` for grpc proto 2022-04-07 17:26:59 +08:00
JimMoen 0297dd723e feat(emqx): provide cluster_name api 2022-04-07 17:21:37 +08:00
JimMoen af0c0c8ee1 chore: update renamed module in helm deploy file 2022-04-07 15:32:14 +08:00
William Yang cb6b20c720 feat: mnesia wait_for_table diagnosis logging
bump ekka to 0.8.1.9
2022-04-07 08:40:47 +02:00
Yang Miao 16dc0d6555
Merge pull request #7536 from EMQ-YangM/reset_cluster_metrics
feat: impl reset cluster metrics
2022-04-07 11:31:49 +08:00
Xinyu Liu d420dc483a
Merge pull request #7531 from zmstone/merge-v43-to-v44
Merge v43 to v44
2022-04-07 10:57:19 +08:00
Yang Miao 75486efb11
Merge pull request #7534 from EMQ-YangM/dev/v4.3.14
fix: change rule_speed record type
2022-04-07 10:37:27 +08:00
EMQ-YangM 1c32b08b21 feat: impl reset cluster metrics 2022-04-07 10:32:58 +08:00
EMQ-YangM 0e02e8df9d fix: change rule_speed record type 2022-04-07 09:50:31 +08:00
JianBo He dfea07fd0f Merge remote-tracking branch 'ce/main-v4.3' into merge-v43-to-v44 2022-04-07 09:37:47 +08:00
Zaiming (Stone) Shi d1e773d83c test: fix float point number compare 2022-04-06 21:09:10 +02:00
Thales Macedo Garitezi 5abe0a91dd
Merge pull request #7520 from thalesmg/fix-default-loaded-modules-43
fix: ensure default values for `loaded_{plugins,modules}`
2022-04-06 14:31:57 -03:00
JianBo He 243a30dacb chore: update appup.src for v4.4 2022-04-06 17:03:44 +02:00
Thales Macedo Garitezi d99d531b8f
chore: update changelog 2022-04-06 09:19:19 -03:00
Thales Macedo Garitezi 11c61a7085
fix: silence grep/sed warnings in docker entrypoint 2022-04-06 09:19:19 -03:00
Thales Macedo Garitezi a1705f5653
fix: flaky test 2022-04-06 09:11:09 -03:00
Thales Macedo Garitezi 63146cb148
chore: update appup files and bump emqx_modules app vsn 2022-04-06 09:11:07 -03:00
Thales Macedo Garitezi aa19283ff2
fix: ensure default values for `loaded_{plugins,modules}`
Fixes #7455 .

This tries to populate `loaded_{plugins,modules}` files with default
values before loading them, in case they don't exist.
2022-04-06 09:08:21 -03:00
Zaiming (Stone) Shi bad227c45d chore: re-generate appup files 2022-04-06 13:33:33 +02:00
Zaiming (Stone) Shi f3a7c75871 Merge remote-tracking branch 'origin/main-v4.3' into dev/v4.4.3 2022-04-06 13:24:37 +02:00
JianBo He bbda2e4dfa
Merge pull request #7427 from HJianBo/fix-psk-cipher
Fix psk cipher suites
2022-04-06 16:04:53 +08:00
Xinyu Liu 14cfc0cf31
Merge pull request #7526 from terry-xiaoyu/bump_emqx_4.4.3
chore: bump emqx to 4.4.3
2022-04-06 15:55:29 +08:00
Shawn 905e831edc chore: bump emqx to 4.4.3 2022-04-06 14:22:54 +08:00
JianBo He c603b2c7e3 chore: update appup.src files 2022-04-06 10:44:08 +08:00
JianBo He 18a084017a chore: update CHANGES-4.3.md 2022-04-06 10:44:06 +08:00
JianBo He 43a000b7fd chore: add the otp vsn limitation 2022-04-06 10:43:27 +08:00
JianBo He 759b1dacdf chore(schema): check tls_version if psk_cipher configured 2022-04-06 10:43:27 +08:00
JianBo He 024c7c59b7 chore: unify all psk cipher suites 2022-04-06 10:43:27 +08:00
JianBo He f1ff80fc16 test(psk): test psk file reading and handshake 2022-04-06 10:43:27 +08:00
JianBo He d2684a25c8 chore(psk): update psk_cipher default ciphers 2022-04-06 10:43:27 +08:00
Zaiming (Stone) Shi a35e0adf51
Merge pull request #7518 from zmstone/dashboard_password_reset_after_leaving_cluster
Dashboard password reset after leaving cluster
2022-04-05 23:15:36 +01:00
Zaiming (Stone) Shi c422edd977 test(emqx_dashboard_SUITE): add init/end_per_testcase 2022-04-05 23:41:35 +02:00
Zaiming (Stone) Shi 164209b576 test: use end_per_testcase to restore default admin password 2022-04-05 22:29:43 +02:00
Zaiming (Stone) Shi d219e475fb fix(emqx_dashboard_admin): put changed default user pwd in pt
plugin app envs are all unloaded when the app reboots
2022-04-05 13:59:58 +02:00
Zaiming (Stone) Shi 155befe418 chore: no duplicated reads and some comment/message rewording
Co-authored-by: Dmitrii <99872536+ieQu1@users.noreply.github.com>
2022-04-05 13:31:24 +02:00
Zaiming (Stone) Shi 6cc55f5c34 chore: add back the default password warning 2022-04-05 12:22:04 +02:00
Zaiming (Stone) Shi 0d4822ba78 refactor(emqx_dashboard_admin): simplify default pwd read/write 2022-04-05 11:50:18 +02:00
Georgy Sychev 1a715c8708 feat(emqx_dashboard): subsciption to update password
emqx_dashboard restarted in ekka hook
Closes #3155
2022-04-05 10:40:09 +02:00
Zaiming (Stone) Shi 4b42da53e7
Merge pull request #7498 from zmstone/0401-4.3-docs-fix-cli-example-type-add-forward-not-forwards
docs: fix typos in CLI doc, add-froard not add-forwards
2022-04-04 20:09:35 +01:00
Zaiming (Stone) Shi 12d0176bad
Merge pull request #7508 from zmstone/0402-4.3-fix-certs-file-path-when-not-uploaded
fix(ssl): try to guess cert file paths
2022-04-04 20:03:38 +01:00
Zaiming (Stone) Shi 5b58eaa203 refactor(emqx_rule_engine): return not raise error for known reasons 2022-04-04 19:10:52 +02:00
Zaiming (Stone) Shi 65e2c1390e fix(ssl): try to guess cert file paths
The GUI has "etc/certx/..." hard coded as defaults.
However this relative path only works when it's a zip package
or when running in docker.

The other two possible abs paths are:
1. the upload dir
2. "/etc"
2022-04-04 19:10:52 +02:00
Zaiming (Stone) Shi 8798a5160c fix: ensure install_upgrace.escript always restore cwd 2022-04-04 19:10:52 +02:00
Zaiming (Stone) Shi 5b36ec8cb2
Merge pull request #7510 fix get-distro.sh for windows
chore: fix get-distro.sh for windows
2022-04-04 15:03:21 +01:00
Zaiming (Stone) Shi 4c1cca2769
Merge pull request #7511 from zmstone/0404-4.3-upgrade-dependency-lc-to-0.2.1
chore: upgrade app lc from 0.2.0 to 0.2.1
2022-04-04 13:57:14 +01:00
Zaiming (Stone) Shi d6d232a7dd chore: make get-distro.sh aware of windows 2022-04-04 14:35:11 +02:00
Zaiming (Stone) Shi d7ebd1040c chore: upgrade app lc from 0.2.0 to 0.2.1
0.2.1 contains a minior fix to avoid flag process getting
force killed if beam file force purged
2022-04-04 10:33:21 +02:00
Zaiming (Stone) Shi 84651d5b07 chore: no error when delete rebar.lock using make clean-all command 2022-04-04 09:52:41 +02:00
Zaiming (Stone) Shi d49c8b61e6
Merge pull request #7425 from emqx/dev/v4.3.14
dev/v4.3.14 -> main-v4.3
2022-04-03 18:06:14 +02:00
Zaiming (Stone) Shi 2e7a741022 chore: bump dashboard app version 2022-04-03 08:43:34 +02:00
Xinyu Liu 7b4d3ecb3a
Merge pull request #7504 from EMQ-YangM/update_mongodb_driver
fix: update mongodb driver to fix potential process leak
2022-04-03 11:59:09 +08:00
Zaiming (Stone) Shi 67ce53b5fc fix(appup): re-generated emqx_rule_engine.appup.src 2022-04-02 23:25:36 +02:00
Zaiming (Stone) Shi a54813dd69 fix(appup): re-generate appup from 4.3.13 2022-04-02 23:00:41 +02:00
Zaiming (Stone) Shi 19bf4c3b17 Merge remote-tracking branch 'origin/main-v4.3' into dev/v4.3.14 2022-04-02 22:34:37 +02:00
Yang Miao 851bfcfd76
Merge pull request #7503 from EMQ-YangM/dev/v4.3.14
feat: enhanced rule engine error handling when json parsing error
2022-04-02 17:18:00 +08:00
EMQ-YangM 9d25c58bb1 fix: move mongodb-erlang to top level rebar.config 2022-04-02 16:54:48 +08:00
EMQ-YangM 299c369d80 feat: enhanced rule engine error handling when json parsing error 2022-04-02 16:24:07 +08:00
Xinyu Liu d676f8488e
Merge pull request #7502 from emqx/copy-of-main-v4.3
Merge main-v4.3 to main-v4.4
2022-04-02 11:56:44 +08:00
Xinyu Liu 6d9816142f
Merge branch 'main-v4.4' into copy-of-main-v4.3 2022-04-02 11:55:49 +08:00
Shawn 4a57c10f61 chore: release 4.3.13 2022-04-02 11:41:00 +08:00
zhouzb 3b886035cc
Merge pull request #7501 from tigercl/chore/release-vsn
chore: bump release vsn
2022-04-02 10:31:52 +08:00
zhouzb 3610f931cf chore: bump release vsn 2022-04-02 10:29:32 +08:00
EMQ-YangM c84a4b2b6b fix: update mongodb driver to fix potential process leak 2022-04-02 10:27:44 +08:00
zhouzb 383d2966ef
Merge pull request #7500 from Rory-Z/main-v4.3
ci: push docker image when tag event
2022-04-02 10:26:39 +08:00
zhanghongtong e183ae2499 ci: push docker image when tag event 2022-04-02 10:13:37 +08:00
Zaiming (Stone) Shi 25dc4ab14f docs: fix typos in CLI doc, add-froard not add-forwards 2022-04-01 18:28:25 +02:00
Shawn 3bbc7bf31f chore: release 4.4.2 2022-04-01 18:05:39 +08:00
Shawn 1d2aa1c8c1 chore: release 4.3.13 2022-04-01 17:55:43 +08:00
zhongwencool 5454f0ce04
Merge pull request #7493 from zhongwencool/pin-ehttpc-0.1.15
fix: force delete ehttpc pool.
2022-04-01 17:48:06 +08:00
zhongwencool fa8a222b38 fix: force delete ehttpc pool. 2022-04-01 17:41:12 +08:00
Yang Miao 5d3caf3b1f
Merge pull request #7474 from EMQ-YangM/dev/v4.3.14
feat: impl api PUT /rules/{id}/reset_metrics
2022-04-01 13:25:11 +08:00
Xinyu Liu 941b409bf9
Merge pull request #7490 from emqx/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-04-01 10:45:26 +08:00
JianBo He 134d00e76b Merge tag 'v4.3.13-rc.4' into merge-main-v4.3-into-v4.4
Version v4.3.13-rc.4
2022-04-01 10:37:58 +08:00
Shawn ec0d43bcf7 chore: release 4.3.13-rc.4 2022-04-01 10:01:48 +08:00
Xinyu Liu 42c3639cbb
Merge pull request #7489 from HJianBo/merge-main-v4.3-into-v4.4
Pre-Release v4.4.2-rc.3: Merge main-v4.3 into v4.4
2022-04-01 09:57:59 +08:00
JianBo He 9c1848e440 Merge remote-tracking branch 'ce/main-v4.3' into merge-main-v4.3-into-v4.4 2022-04-01 09:36:38 +08:00
Xinyu Liu b84ef11935
Merge branch 'dev/v4.3.14' into dev/v4.3.14 2022-04-01 09:32:42 +08:00
Xinyu Liu 39a928f85e
Merge pull request #7459 from EMQ-YangM/fix_patter_match_v4.3
fix: use maps:get/3 to avoid crash after match failure
2022-04-01 09:15:59 +08:00
Xinyu Liu 3cc0bb8284
Merge branch 'dev/v4.3.14' into fix_patter_match_v4.3 2022-04-01 09:14:34 +08:00
Xinyu Liu 3bf9089533
Merge pull request #7487 from zmstone/0331-4.4.2-no-upgrade-base-for-debian11
build: no upgrade base for debian11 at version 4.4.2
2022-04-01 08:48:35 +08:00
Xinyu Liu 5290e93ef1
Merge pull request #7488 from emqx/4.3-update-erlang-for-windows
ci: upgrade erlang for windows
2022-04-01 08:48:21 +08:00
Xinyu Liu 79b6b881ec
Merge pull request #7482 from zmstone/4.3-upgrader-node-hidden-connect
fix(relup): upgrader node hidden connect target node
2022-04-01 08:45:06 +08:00
Zaiming (Stone) Shi 5467262b0f Merge remote-tracking branch 'origin/main-v4.3' into dev/v4.3.14 2022-04-01 00:37:59 +02:00
Zaiming (Stone) Shi 8785f87473 ci: upgrade erlang for windows 2022-03-31 23:29:53 +02:00
Zaiming (Stone) Shi 363242fd61 build: no upgrade base for debian11 at version 4.4.2 2022-03-31 22:39:56 +02:00
Zaiming (Stone) Shi cd06edf8c8 fix(relup): upgrader node hidden connect target node 2022-03-31 18:30:20 +02:00
Xinyu Liu 9a6ca6adf5
Merge pull request #7481 from HJianBo/merge-main-v4.3-into-v4.4
Pre-release v4.4.2-rc.2: Merge v4.3.13-rc.3 into main-v4.4
2022-03-31 22:18:28 +08:00
zhongwencool 6e544606ef
Merge pull request #7469 from zhongwencool/remove-st-from-catch
chore: remove useless stacktrace from catch.
2022-03-31 22:16:00 +08:00
JianBo He 5fa30b2d51 chore: bump vsn to 4.4.2-rc.2 2022-03-31 21:55:57 +08:00
JianBo He 610bfb7613 Merge tag 'v4.3.13-rc.3' into merge-main-v4.3-into-v4.4
Version v4.3.13-rc.3
2022-03-31 21:55:43 +08:00
Xinyu Liu 494eb3413c
Merge pull request #7475 from zmstone/main-v4.4
[4.4] update to builder images to 4.4-8
2022-03-31 18:49:25 +08:00
EMQ-YangM ea17dd776c fix: update CHANGES-4.3.md 2022-03-31 18:21:40 +08:00
EMQ-YangM 326634c287 feat: impl api PUT /rules/{id}/reset_metrics 2022-03-31 18:00:57 +08:00
Xinyu Liu 34f1f697ff
Merge pull request #7476 from terry-xiaoyu/release_4.3.13-rc.3
chore: release 4.3.13-rc.3
2022-03-31 17:57:59 +08:00
Shawn c037c2cf6c chore: release 4.3.13-rc.3 2022-03-31 17:54:20 +08:00
Xinyu Liu e1dfa3eed2
Merge pull request #7471 from zmstone/fix-script-reset-before-clean
chore(appup): fix update-appup.sh
2022-03-31 17:51:23 +08:00
Zaiming (Stone) Shi 815c96e37b
Merge pull request #7468 from zmstone/merge-v43-to-v44
Merge v43 to v44
2022-03-31 11:48:17 +02:00
Zaiming (Stone) Shi 4438b9e59d docs: update 4.4 change log to cover changes made for centos 7 2022-03-31 11:26:33 +02:00
Zaiming (Stone) Shi bbe6209539
Merge pull request #7472 from zmstone/docs-update-4.3-changelog
docs: Update CHANGES-4.3.md to cover changes made in build env
2022-03-31 10:43:39 +02:00
Zaiming (Stone) Shi b9c02bff1e ci: delete yum install openssl11 in test 2022-03-31 10:39:30 +02:00
Zaiming (Stone) Shi 9cd63c87fc docs: Update CHANGES-4.3.md to cover changes made in build env 2022-03-31 10:25:57 +02:00
Zaiming (Stone) Shi 88c30e3a4f ci: bump to latest emqx-builder image 4.4-8 2022-03-31 10:14:01 +02:00
Zaiming (Stone) Shi 38447ff187 chore(appup): fix update-appup.sh
git reset before clean
2022-03-31 10:10:12 +02:00
Zaiming (Stone) Shi 0ac979361e fix(appup): re-generate emqx.appup.src 2022-03-31 10:06:32 +02:00
zhongwencool fe6af95f88 chore: remove useless stacktrace from catch. 2022-03-31 16:01:20 +08:00
Zaiming (Stone) Shi 48a65981af Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2022-03-31 09:28:58 +02:00
EMQ-YangM 510e4d31e4 fix: load_module emqx_rule_events 2022-03-31 13:48:12 +08:00
JianBo He 1a302b1914
Merge pull request #7460 from lafirest/fix/empty_topic_4.3.14
fix(frame): forbidden empty topic in strict mode
2022-03-31 11:48:56 +08:00
firest ea8ddcef60 fix: fix spell error in CHANGES-4.3.md 2022-03-31 10:34:06 +08:00
DDDHuang e801f5b3a2
Merge pull request #7453 from DDDHuang/re_source_test_4314
fix(rule): connection test when creating a resource
2022-03-30 15:21:48 +08:00
firest 22beba8ebd chore: update changes-4.3.md 2022-03-30 11:12:33 +08:00
firest bf68735664 fix(frame): forbidden empty topic in strict mode 2022-03-30 10:42:56 +08:00
EMQ-YangM cead8c9056 fix: use masp:get/3 to avoid crash after match failure 2022-03-30 09:44:06 +08:00
DDDHuang 6ab0934674 fix(rule): connection test when creating a resource 2022-03-30 09:23:51 +08:00
zhongwencool 3303b987a1
Merge pull request #7447 from zhongwencool/export-test-function
test: Export test function
2022-03-29 22:56:41 +08:00
zhongwencool 16b8fc6edc fix: emqx.appup.src 2022-03-29 21:39:44 +08:00
Xinyu Liu c3d3a5a464
Merge pull request #7450 from emqx/revert-7392-re_source_test
fix(revert): connection test when creating a resource
2022-03-29 19:17:55 +08:00
DDDHuang 47e807b2ac
Revert "fix(rule): connection test when creating a resource" 2022-03-29 19:16:06 +08:00
DDDHuang 0684b4f716
Merge pull request #7392 from DDDHuang/re_source_test
fix(rule): connection test when creating a resource
2022-03-29 19:09:10 +08:00
zhongwencool 8c6cd2e92f
Merge pull request #7443 from zhongwencool/export-test-case-v4.3.14
Export test function for CT v4.3.14
2022-03-29 18:02:30 +08:00
DDDHuang d297e883c2 fix: appup 2022-03-29 17:37:00 +08:00
zhongwencool 4ee586a738 fix: appup.src 2022-03-29 17:12:35 +08:00
zhongwencool 06adcb9126 Merge branch 'dev/v4.3.14' into export-test-case-v4.3.14 2022-03-29 15:55:24 +08:00
zhongwencool b47aef63a1 fix: emqx.appup.src 2022-03-29 15:16:57 +08:00
zhongwencool 517f8a7c9b chore: add validator schema function 2022-03-29 14:53:03 +08:00
zhongwencool f9a85614d4 chore: export test function for ee's hot-conf 2022-03-29 14:52:35 +08:00
DDDHuang 46cfcf662e fix(rule): safe apply & test resource in cluster 2022-03-29 13:37:32 +08:00
DDDHuang 63616c5e93 Merge branch 'main-v4.3' of https://github.com/emqx/emqx into re_source_test 2022-03-29 09:07:58 +08:00
Zaiming (Stone) Shi bb240e8f91 Merge remote-tracking branch 'origin/main-v4.3' into dev/v4.3.14 2022-03-28 17:40:54 +02:00
Zaiming (Stone) Shi 4991dcbe3b
Merge pull request #7426 from zmstone/chore-fix-appup-update-script
chore: fix appup update script
2022-03-28 17:39:55 +02:00
Zaiming (Stone) Shi 59fae1714b chore: use shorter path 2022-03-28 14:10:33 +02:00
JianBo He 22573ff294
Merge pull request #7408 from JimMoen/exhook-priority
Support exhook customize hook priority
2022-03-28 18:29:25 +08:00
Zaiming (Stone) Shi 6ca0e63599 chore: fix appup update script
so it can handle switch between tags
2022-03-28 09:58:03 +02:00
JimMoen a168f08850 chore: update CHANGES-4.3.md 2022-03-28 15:54:38 +08:00
JimMoen b17fd40091 chore(exhook): update appup.src, add field when updating module 2022-03-28 15:54:38 +08:00
JimMoen 1a57d0d2ca test(exhook): customized hooks priority 2022-03-28 15:54:38 +08:00
JimMoen b7f10b67a8 feat(exhook): support customize hook_priority 2022-03-28 15:54:38 +08:00
Yang Miao c0da7bcee0
Merge pull request #7407 from EMQ-YangM/add_client_check_acl_complete
feat: add rule events: 'client.connack', 'client.check_acl_complete'
2022-03-28 10:31:27 +08:00
Chris Hicks d255be2d51
Merge pull request #7424 from mononym/EMQX-3885-e-4-3-9-support-new-mongo-db-bjson-date
feat: Add mongo_date function to support saving timestamp as MongoDB …
2022-03-25 17:50:49 +01:00
Chris a1a37bcbee feat: Add mongo_date function to support saving timestamp as MongoDB Date object 2022-03-25 17:43:32 +01:00
EMQ-YangM 059fc6e3c7 feat(emqx_rule_events): add field 'is_cache' 2022-03-25 18:05:25 +08:00
EMQ-YangM 44f4dfa498 fix(CHANGES): update CHANGES-4.4.md 2022-03-25 13:40:29 +08:00
EMQ-YangM 3eab6b436b fix(appup): load_module emqx_access_control 2022-03-25 11:27:28 +08:00
EMQ-YangM 0ffb66ee7f fix(CHANGES): update CHANGES-4.4.md 2022-03-25 11:12:55 +08:00
EMQ-YangM e0d142c625 feat: add client.check_acl_complete event 2022-03-25 11:08:30 +08:00
JimMoen 38c515908f feat(hook): put emqx_hook with more fields 2022-03-25 09:58:13 +08:00
JimMoen 09b9015c51 chore: rm rebar.lock when make target `clean-all` 2022-03-25 09:58:13 +08:00
zhouzb 1d6b7bbeae
Merge pull request #7404 from zmstone/ci-4.4-exclude-base-vsn-before-4.4.2-for-debian11 2022-03-25 08:29:54 +08:00
Zaiming (Stone) Shi 489dbec76b ci: exclude 4.4.0 and 4.4.1 for debian11 2022-03-24 20:42:51 +01:00
Zaiming (Stone) Shi 7e2be899fb
Merge pull request #7403 from zmstone/merge-v43-to-v44
Merge v43 to v44
2022-03-24 19:57:13 +01:00
Zaiming (Stone) Shi df8a018fc3
Merge pull request #7402 from zmstone/chore-delete-warning-message
chore: delete warning message for session upgrade/downgrade
2022-03-24 16:23:03 +01:00
Zaiming (Stone) Shi 4cf3cf7134 Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2022-03-24 16:05:28 +01:00
Zaiming (Stone) Shi d3bcc201d6
Merge pull request #7401 from zmstone/ci-add-build-base-option-to-appup-update-script
chore: update-appup.sh always rebuild baseline
2022-03-24 15:58:25 +01:00
Zaiming (Stone) Shi b8afa16b53 chore: fix shellcheck 2022-03-24 12:28:34 +01:00
Zaiming (Stone) Shi 2d97b1bb89 chore: delete warning message for session upgrade/downgrade 2022-03-24 12:26:09 +01:00
Zaiming (Stone) Shi 59b8fd6ff8
Merge pull request #7383 from zmstone/minor-fixes
Minor fixes 4.4
2022-03-24 11:26:05 +01:00
Zaiming (Stone) Shi 3944888a19 chore: update-appup.sh always rebuild baseline
Reasons
* OTP version might be different in developer's env and build env
* For some tags, we do not build release. e.g. rel-v4.4.X
2022-03-24 11:23:47 +01:00
JianBo He d1503731a1
Merge pull request #7395 from HJianBo/bump-vsn-for-4.4
Pre-release v4.4.2: Bump vsn and update dashboard vsn
2022-03-24 17:11:52 +08:00
JianBo He 242035139e
Merge pull request #7394 from HJianBo/update-dashboard-vsn
Pre-release v4.3.13: Update dashboard vsn
2022-03-24 17:11:33 +08:00
EMQ-YangM 326b01968b fix(appup): load_module emqx_rule_events 2022-03-24 16:52:01 +08:00
Zaiming (Stone) Shi a39cc47a45
Merge pull request #7380 from zmstone/test-fix-data-import-case-failure
test: fix data import test failure
2022-03-24 08:26:33 +01:00
EMQ-YangM 3410e20fbe feat(emqx_rule_engine_events): add client_connack event 2022-03-24 14:58:41 +08:00
JianBo He 65e11bcb01 chore: bump vsn for 4.4.2-rc.1 2022-03-24 14:26:52 +08:00
JianBo He 61d3ed31e8 chore: bump vsn to 4.3.13-rc.2 2022-03-24 14:23:19 +08:00
JianBo He 5e42a67c8d chore: update dashboard vsn 2022-03-24 14:22:19 +08:00
JianBo He 37d1ba88e4
Merge pull request #7389 from HJianBo/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-03-24 11:14:40 +08:00
DDDHuang c3237b6281 fix(rule): connection test when creating a resource 2022-03-24 10:39:54 +08:00
JianBo He 6e08ede0b0 chore: update appup.src files by update-appup.sh 2022-03-24 07:38:42 +08:00
JianBo He 94efb190c6 Merge remote-tracking branch 'ce/main-v4.3' into merge-main-v4.3-into-v4.4 2022-03-24 07:08:06 +08:00
Zaiming (Stone) Shi ada29de3d5 fix(appup): add changed modules 2022-03-23 15:58:07 +01:00
Zaiming (Stone) Shi 7e01a52457 fix: typo in function name 2022-03-23 15:56:51 +01:00
Zaiming (Stone) Shi b99627b866 chore(emqx_auth_mongo_sup): port changes from ee back to ce 2022-03-23 15:50:36 +01:00
Zaiming (Stone) Shi 56683328ec docs: delete '4.3' from 4.4 config file comment 2022-03-23 15:49:58 +01:00
JianBo He 0a63de9277
Merge pull request #7378 from HJianBo/refine_webhook_appups
Pre-release v4.3.13: Fix some app.src and appup.src files
2022-03-23 21:28:54 +08:00
Zaiming (Stone) Shi 1c448d6016 test: use try catch instaed of sopan a process 2022-03-23 13:51:13 +01:00
Zaiming (Stone) Shi 3868fb088c chore: bump emqx_web_hook to 4.3.10 2022-03-23 13:35:05 +01:00
Zaiming (Stone) Shi 929ca787f4 test: fix data import test failure 2022-03-23 13:12:57 +01:00
JianBo He b76372e621 chore: remove duplicated emqx_rule_funcs in appup.src 2022-03-23 19:29:58 +08:00
JianBo He 5492ab2cc9 chore(bridge-mqtt): use `VSN` placeholder instead of vsn number 2022-03-23 18:37:40 +08:00
JianBo He a4d2aa1dd4 chore: correct the app.src & appup.src 2022-03-23 18:37:40 +08:00
JianBo He 0309302c42
Merge pull request #7376 from lafirest/fix/flaky_test
fix(mod_subscription): fix test case error
2022-03-23 18:37:24 +08:00
Xinyu Liu 0a98086329
Merge pull request #7379 from terry-xiaoyu/update_changes2
fix(doc): update CHANGES-4.3.md for #7374
2022-03-23 18:31:49 +08:00
Shawn ac8bb41ea8 fix(doc): update CHANGES-4.3.md for #7374 2022-03-23 18:31:09 +08:00
Xinyu Liu 0348707aca
Merge pull request #7374 from terry-xiaoyu/resource_get_status_timeout
fix(rule): get the cached status when calling emqx_rule_engine:get_resource_status/1
2022-03-23 18:00:07 +08:00
Xinyu Liu 0d55b9242d
Merge branch 'main-v4.3' into resource_get_status_timeout 2022-03-23 17:59:59 +08:00
Xinyu Liu c9ed3cb657
Merge pull request #7367 from zhongwencool/fix-bad-authorization-500-crash
fix: bad authorization format crash with 500
2022-03-23 17:58:19 +08:00
firest a2085555e9 fix(mod_subscription): fix test case error 2022-03-23 17:37:06 +08:00
Shawn e8c7388aa4 chore: update appup file for emqx_rule_engine 2022-03-23 16:21:27 +08:00
zhongwencool b993595c6d fix: add emqx_rule_funcs to appup.src 2022-03-23 15:42:53 +08:00
zhongwencool 99dfd8504c fix: bad authorization format crash with 500 2022-03-23 15:34:23 +08:00
Shawn 5275e6a30f fix(rule): get the cached status when calling emqx_rule_engine:get_resource_status/1 2022-03-23 15:33:50 +08:00
Zaiming (Stone) Shi fcc7252497
Merge pull request #7373 from zmstone/ci/add-debian11
build: add debian11
2022-03-23 07:59:14 +01:00
Zaiming (Stone) Shi 4c4604d397 build: add debian11 2022-03-23 07:56:20 +01:00
zhongwencool db5944e169
Merge pull request #7347 from zhongwencool/trace-disable
fix: make all traces stopped when disable emqx_trace_module
2022-03-23 14:26:45 +08:00
lafirest ce2e4f51ac
Merge pull request #7353 from lafirest/fix/auto_sub_empty_topic_4.3
fix(auto_subscribe): make log if the topic is empty when auto subscribe
2022-03-23 11:20:19 +08:00
zhongwencool ea91533912 fix: delete multiply defined module(emqx_relup) in emqx.appup.src 2022-03-23 11:18:46 +08:00
firest b12b72df99 chore: update changes-4.3.md 2022-03-23 10:55:19 +08:00
zhongwencool d2abc2fcd0 fix: revert emqx_trace in emqx.appup.src 2022-03-23 10:31:03 +08:00
zhongwencool 5a042645e2 fix: make all traces stopped when disable emqx_trace_module 2022-03-23 10:31:01 +08:00
JianBo He d4a9add920
Merge pull request #7370 from zmstone/main-v4.4
merge v4.3 to v4.4
2022-03-23 09:46:11 +08:00
Zaiming (Stone) Shi a5d1dbaf66 docs: sync 4.3.13 changes to 4.4.2 2022-03-22 21:26:38 +01:00
Zaiming (Stone) Shi 42d94b478f fix: update app vsn and update appup 2022-03-22 21:08:20 +01:00
Zaiming (Stone) Shi 8415abb05a Merge remote-tracking branch 'origin/main-v4.4' into main-v4.4 2022-03-22 21:01:15 +01:00
Zaiming (Stone) Shi 481f0bfa88
Merge pull request #7368 from zmstone/ci-update-to-latest-builder-images
ci: update to latest builder image
2022-03-22 21:00:31 +01:00
Zaiming (Stone) Shi 692e2c79a2 chore: update appups after merge 2022-03-22 20:58:34 +01:00
Zaiming (Stone) Shi 6ea8d2f270 Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2022-03-22 20:54:22 +01:00
Zaiming (Stone) Shi ed9266b6c0 ci: update to latest builder image 2022-03-22 12:05:55 +01:00
Yang Miao d4fdbb3020
Merge pull request #7364 from EMQ-YangM/feat_add_zip_gzip
feat(emqx_rule_funcs): add functions gzip, gunzip, zip, unzip
2022-03-22 18:44:37 +08:00
firest c43f179204 fix(mod_subscription): improve the log information 2022-03-22 18:09:06 +08:00
Rory Z 479d0bf5a4
Merge pull request #7210 from Rory-Z/fix/fix-helm-upgrade-error
fix(helm): delete needless labels for support helm upgrade
2022-03-22 15:20:21 +08:00
EMQ-YangM 62eff94249 feat(emqx_rule_funcs): add functions gzip, gunzip, zip, unzip 2022-03-22 15:16:31 +08:00
firest 4fe9275103 chore(modules): update appup file 2022-03-22 10:08:52 +08:00
firest c2b1571134 fix(auto_subscribe): make log if the topic is empty when auto subscribe 2022-03-21 18:32:42 +08:00
JianBo He e4b5001a57
Merge pull request #7309 from HJianBo/send_disconnect_pkt_while_kicked
fix(channel): send DISCONNECT packet if connection has been kicked
2022-03-21 11:56:18 +08:00
JianBo He 706c7725f9 test: update test/emqx_channel_SUITE.erl
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2022-03-21 10:56:55 +08:00
JianBo He 604c384660 fix(channel): send will_msg if client has been kicked 2022-03-21 10:56:55 +08:00
JianBo He 75239c1388 chore: update changes-4.3.md 2022-03-21 10:56:54 +08:00
JianBo He 8d3e953eef fix(channel): send DISCONNECT packet if connection has been kicked
fix #7241
2022-03-21 10:56:37 +08:00
zhongwencool bce4ca2fbd
Merge pull request #7345 from zhongwencool/subscribe-crash-with-bad-qos
fix: subscribe api crash with bad qos.
2022-03-21 10:40:09 +08:00
zhongwencool 2be97a24dd fix: subscribe api crash with bad qos. 2022-03-21 09:19:28 +08:00
DDDHuang 479507b96a
Merge pull request #7344 from DDDHuang/up_jmeter_43x
fix(ci): update jmeter to 5.4.3
2022-03-20 23:44:52 +08:00
Zaiming (Stone) Shi 145b3a363c
Merge pull request #7340 from zmstone/fix-session-record-backward-compatibility
fix(session): compatible to 4.3 takeover
2022-03-20 07:22:16 +01:00
DDDHuang ece789b58e fix(ci): update jmeter to 5.4.3 2022-03-20 13:07:43 +08:00
Zaiming (Stone) Shi 552e7d175a
Merge pull request #7342 from zmstone/chore-fix-update-appup.sh-for-bash-3.2
chore: fix update-appup.sh for bash 3.2
2022-03-19 09:41:08 +01:00
Zaiming Shi 13086e7259 chore: fix update-appup.sh for bash 3.2 2022-03-19 08:42:52 +01:00
Zaiming (Stone) Shi d56650e78b test: fix session downgrade/upgrade in tests 2022-03-18 17:57:17 +01:00
Zaiming (Stone) Shi 21ed258d58 fix(session): compatible to 4.3 takeover 2022-03-18 12:23:13 +01:00
Xinyu Liu 3a89a6a1fe
Merge pull request #7336 from terry-xiaoyu/float_precision_10
fix(rules): enlarge precisions of floats to maximum 17 decimal places.
2022-03-18 18:28:58 +08:00
Shawn 5823751d7d chore: bump emqx_rule_engine to 4.3.9 2022-03-18 18:28:30 +08:00
Shawn 81ae2be760 fix(rules): enlarge precisions of floats to maximum 17 decimal places.
When printing floats to strings, we have to define a small decimal
limits to avoid print a too long and "inaccurate" float number:

```
2> float_to_binary(0.3).
<<"2.99999999999999988898e-01">>
```

This fix sets precision of floats to 17 digits after the decimal point.

This precision is larger than precision of most `double` data type used by
databases(14 digits for mysql and 15 digits for pgsql).
2022-03-18 15:42:01 +08:00
JianBo He 72e37dd144
Merge pull request #7300 from HJianBo/mqtt-sn-resume-subs
feat(mqttsn): introduce subs_resume option
2022-03-17 17:51:41 +08:00
zhongwencool b8afd2760c
Merge pull request #7318 from zhongwencool/fix-bad-str
fix: Add name string legitimacy check.
2022-03-17 17:49:25 +08:00
lafirest 2133f8c4a3
Merge pull request #7320 from lafirest/fix/delayed_terminate
Fix/delayed terminate
2022-03-17 10:05:31 +08:00
JianBo He b09b6ca6d2
Merge branch 'main-v4.3' into mqtt-sn-resume-subs 2022-03-17 09:39:21 +08:00
William Yang e8bbfc3806
Merge pull request #7303 from qzhuyan/dev/william/add-olp
feat: add load control app
2022-03-16 15:36:53 +01:00
zhongwencool f0a81d593d fix: dashboard ct failed 2022-03-16 16:48:03 +08:00
zhongwencool 8cf97a93af fix: urldecode appid and username. 2022-03-16 16:33:03 +08:00
DDDHuang 0d7ad25804
Merge pull request #7281 from DDDHuang/backup_json
fix: check backup file type & legal json
2022-03-16 16:16:06 +08:00
firest 3e6249a8b7 fix: bump emqx_modules version 2022-03-16 15:28:44 +08:00
zhongwencool bfadcebb9c chore: remind the user to delete bad appid/username. 2022-03-16 15:23:10 +08:00
firest 186ff243ed fix(delayed): cancel stats timer when terminate 2022-03-16 14:57:17 +08:00
zhongwencool f70d777623 chore: update appup 2022-03-16 11:19:25 +08:00
zhongwencool 0555bce47e chore: add more doc for dashboard.default_user 2022-03-16 10:54:09 +08:00
zhongwencool 6b91a80712 chore: update changelog-4.3 2022-03-16 10:47:18 +08:00
zhongwencool b44512cdab fix: Add string legitimacy check. 2022-03-16 10:31:41 +08:00
DDDHuang 95cc5a19c8 fix: bad list & bad SUITE 2022-03-16 10:07:13 +08:00
William Yang 81ed61b001 feat: add load control app 2022-03-15 14:02:42 +01:00
DDDHuang 02e7f3bfe0 feat: backup data support old versions dir 2022-03-15 15:05:48 +08:00
zhongwencool dd86ece33e
Merge pull request #7308 from zhongwencool/set-keepalive-via-body
feat: Support set keepalive via queryString & Body HTTP API.
2022-03-15 14:30:42 +08:00
JianBo He a3d8981635 refactor(mqttsn): assign subs_resume to mqtt-sn client process state 2022-03-15 11:28:40 +08:00
JianBo He af65310ce7 chore(script): update_appup.escript support the update cmd
We often use the advanced directive `update` when hot upgrading
gen_server, gen_statem, and other such processes, and it will be
parsed as:
```
{suspend,[Mod]},
{load,{Mod,brutal_purge,brutal_purge}},
{code_change,up,[{Mod,[Extra]}]},
{resume,[Mod]},
```
So, we should treat the update instruction as having completed the
upgrade of this module.
2022-03-15 10:51:30 +08:00
JianBo He 3823ab8693 fix: typos in emqx_sn.appup.src 2022-03-15 10:51:30 +08:00
JianBo He f8b7b9415d chore(mqttsn): update appup.src 2022-03-15 10:51:30 +08:00
JianBo He fcf1178f3b chore: update CHANGES-4.3.md 2022-03-15 10:51:29 +08:00
JianBo He d4c1b3acc6 test(mqttsn): more tests for topic register and subs_resume 2022-03-15 10:51:05 +08:00
JianBo He 3201d11212 feat(mqttsn): introduce subs_resume option
As the mqtt-sn v1.2 spec metioned, the gateway will be able to sync the
subscriptions topic-name registry to client when the client resume it's
session

port from: https://github.com/emqx/emqx-sn/pull/195
2022-03-15 10:51:05 +08:00
zhongwencool 4adc914372 feat: Support set keepalive via queryString & Body HTTP API. 2022-03-15 10:40:01 +08:00
Chris Hicks eb5d9fa501
Merge pull request #7298 from mononym/fix-mongodb-timeout-crash
fix: prevent crash when mongodb connection times out
2022-03-14 17:01:09 +01:00
Chris 440523138b fix: prevent crash when mongodb connection times out 2022-03-14 15:09:49 +01:00
Zaiming (Stone) Shi c4f609eb42
Merge pull request #7295 from zmstone/fix-ensure-bash-for-systemd-service
chore: ensure bash wraper in emqx.service, restart wait 60 seconds
2022-03-14 13:28:35 +01:00
Chris Hicks 32fac8b67b
Merge pull request #7299 from mononym/fix-typo-in-log-message
fix: typo in log message
2022-03-14 12:55:04 +01:00
Chris 55eddfa16c fix: typo in log message 2022-03-14 10:18:18 +01:00
DDDHuang 1ec0377a69 fix: api file path with filename:join(List) & app up 2022-03-14 16:11:07 +08:00
Zaiming (Stone) Shi 223642e62b chore: ensure bash wraper in emqx.service, restart wait 60 seconds 2022-03-14 08:08:04 +01:00
DDDHuang 2da3333879 fix: check backup file type & legal json 2022-03-14 14:16:34 +08:00
JianBo He 59bae0a27a
Merge pull request #7274 from zhongwencool/dashboard-login-warning
chore: Prompt user how to change the dashboard default password when emqx start
2022-03-11 12:41:56 +08:00
Zaiming (Stone) Shi d58bfed751 Merge tag 'v4.4.1' into main-v4.4 2022-03-10 16:50:32 +01:00
zhongwencool f82550ddc6 chore: Prompt user how to change the dashboard default password when emqx start 2022-03-10 23:01:58 +08:00
JianBo He ecc2f069f6
Merge pull request #7261 from JimMoen/mqtt-frame-utf8-check
feat(frame): utf-8 string check in `strict_mode`
2022-03-10 13:21:14 +08:00
JimMoen 892600f43f docs: update CHANGES-4.3.md 2022-03-10 13:13:07 +08:00
JimMoen 8ea84e4a01 chore(appup): update appup.src 2022-03-10 12:12:42 +08:00
JimMoen dce513df0e test(frame): malformed utf-8 packet 2022-03-10 11:39:44 +08:00
JimMoen c0b688b51f feat(frame): utf-8 string check in `strict_mode` 2022-03-10 11:23:44 +08:00
Rory Z 96695bcec5
Merge pull request #7245 from Rory-Z/build/update-helm
build(helm): add preStop command for container
2022-03-10 09:20:38 +08:00
Chris Hicks 2a4aa5a8b5
Merge pull request #7249 from mononym/fix-mongodb-deadloop
fix: update mongodb client to include deadloop fix
2022-03-09 11:49:23 +01:00
Zaiming (Stone) Shi cedeff4dab build(appup): fix module delete instructions
when there is a application_restart instruction, there is no
need to add module delete instructions
2022-03-09 11:18:02 +01:00
Chris ca5637b4a3 fix: update mongodb client to include deadloop fix 2022-03-09 10:57:29 +01:00
Zaiming (Stone) Shi de990b98f1
Merge pull request #7243 from zmstone/merge-v43-to-v44
Merge v43 to v44
2022-03-09 06:48:36 +01:00
zhanghongtong 8057282d7d build(helm): add preStop command for container
update probe for container
2022-03-09 11:26:03 +08:00
Zaiming (Stone) Shi 27617539f1 fix(appup): adjust update-appup.sh for 4.4. 2022-03-08 19:31:21 +01:00
Zaiming (Stone) Shi 571456b3c4 Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2022-03-08 18:59:38 +01:00
Zaiming (Stone) Shi 04fa1980c0
Merge pull request #7229 from zmstone/build-fix-update_appup
build(update_appup): refactor appup update scripts
2022-03-08 15:20:44 +01:00
Zaiming (Stone) Shi d8e29f19cb refactor(appup): always generate appup from script 2022-03-08 13:24:54 +01:00
Zaiming (Stone) Shi 85d87a768a
Merge pull request #7230 from lafirest/fix/flakey_test
test(slow_subs): fix the flaky case, relax the range check
2022-03-08 11:04:12 +01:00
Xinyu Liu 9fbc211fd0
Merge pull request #7196 from DDDHuang/usort_plugins
fix(plugins): usort plugin list
2022-03-08 11:03:00 +08:00
lafirest 03374cdf14 test(slow_subs): fix the flaky case, relax the range check 2022-03-07 17:54:13 +08:00
Zaiming (Stone) Shi f8004fdd26
Merge pull request #7221 from zmstone/build-exclude-gpb-in-appup-update
build(appup): exclude gpb from appup checks
2022-03-07 06:47:00 +01:00
Zaiming (Stone) Shi e34b110e84
Merge pull request #7219 from zmstone/merge-v4.3-to-v4.4
Merge v4.3 to v4.4
2022-03-07 06:46:05 +01:00
DDDHuang fbd70b02bc fix: override plugins list 2022-03-07 10:32:49 +08:00
DDDHuang 7884238073
fix(doc): better change log
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-03-07 09:53:19 +08:00
Zaiming (Stone) Shi 111b93b4ea fix(update-appup): pass in --repo option even when download bin package
the repo url is NOT used to clone the source,
but used to determin the sub-dir name when extracting the zip package
2022-03-05 17:24:49 +01:00
Zaiming (Stone) Shi 1ae46cc22a build(appup): exclude gpb from appup checks 2022-03-05 16:49:58 +01:00
Zaiming (Stone) Shi 8df4fb98af
Merge pull request #7220 from zmstone/fix-appup-update-for-ee
build: fix update-appup for ee
2022-03-05 12:03:42 +01:00
Zaiming (Stone) Shi 0a6e2d596b build: fix update-appup for ee 2022-03-05 11:49:44 +01:00
Zaiming (Stone) Shi 521f47ff80 build: add 4.4 dashboard download 2022-03-05 10:46:56 +01:00
Zaiming (Stone) Shi 87a2155fb5 Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2022-03-05 10:40:03 +01:00
Zaiming (Stone) Shi 67c6206718
Merge pull request #7218 from zmstone/fix-unclosed-action-issue-credit-mohammadiahmad
fix(helm): fix unclosed action issue
2022-03-05 10:38:53 +01:00
Zaiming (Stone) Shi b4d5b722fd
Merge pull request #7217 from zmstone/ci-simplify-dashboard-download
ci: simplify dashboard download
2022-03-05 10:37:50 +01:00
ahmad.mohammadi 27be2197c0 fix(helm): fix unclosed action issue 2022-03-05 10:05:16 +01:00
Zaiming (Stone) Shi 7ba3d32bac ci: remove git-token file since EE dashboard is opensource now 2022-03-05 09:44:12 +01:00
Zaiming (Stone) Shi c6660084f8 build: one place for dashboard version 2022-03-05 09:44:12 +01:00
Zaiming (Stone) Shi 30bb929df6
Merge pull request #7214 from Rory-Z/merge-4.3-to-4.4
Merge 4.3 to 4.4
2022-03-04 16:07:54 +01:00
zhanghongtong a27ff13ceb ci(release): update container image 2022-03-04 21:08:29 +08:00
Zaiming (Stone) Shi 2f5982e6e2
Merge pull request #7209 from zmstone/chore-refine-boot-message
chore: refine boot message on missing dynlibs
2022-03-04 13:53:06 +01:00
Zaiming (Stone) Shi 1a02e60640
docs: fix message typo in bin/emqx 2022-03-04 13:52:11 +01:00
zhanghongtong cb969b5493 Merge branch 'main-v4.4' of https://github.com/emqx/emqx into merge-4.3-to-4.4 2022-03-04 20:51:38 +08:00
Zaiming (Stone) Shi 560be9a23a
Merge pull request #7212 from zmstone/fix-appup-update-handle-add-module
fix(appup_update): handle add module
2022-03-04 13:31:02 +01:00
Zaiming (Stone) Shi 3b22efeb9c build(update_appup): handle add_module instruction 2022-03-04 12:30:46 +01:00
zhanghongtong b45bbf676c fix(helm): delete needless labels for support helm upgrade 2022-03-04 18:06:12 +08:00
Zaiming (Stone) Shi b25873a1a1
Merge pull request #7194 from HJianBo/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-03-04 10:20:36 +01:00
Zaiming (Stone) Shi a0de86f327 chore: refine boot message on missing dynlibs 2022-03-04 09:31:33 +01:00
DDDHuang 278fa96bc1 fix(plugins): usort plugin list 2022-03-04 10:46:09 +08:00
Rory Z d0b5b262fe
Merge pull request #7115 from Rory-Z/ci/update-build
ci(cross build): splitting cross builds and upload assets
2022-03-04 09:20:15 +08:00
JianBo He dbacfb2bb4 test(mgmt): ensure application loaded 2022-03-03 22:02:27 +08:00
JianBo He c5a6b47390 build(ci): fix package name 2022-03-03 11:57:17 +08:00
JianBo He a94dc87c34 chore: add missed appup instructions 2022-03-03 11:20:50 +08:00
JianBo He f0be91b7fd Merge remote-tracking branch 'ce/main-v4.3' into merge-main-v4.3-into-v4.4 2022-03-03 11:13:45 +08:00
Zaiming (Stone) Shi c6ee8097da
Merge pull request #7189 from zmstone/fix-build-arch-resolution
Fix build arch resolution
2022-03-02 21:04:29 +01:00
Zaiming (Stone) Shi 558748dab2 build(update_appup): only download package if not exist 2022-03-02 19:38:25 +01:00
Zaiming (Stone) Shi b0900fe25a build(update-appup): fix ARCH resolution 2022-03-02 19:37:11 +01:00
Zaiming (Stone) Shi 89809e84f9
Merge pull request #7172 from zmstone/chore-add-appup-update-script
chore: add appup update script
2022-03-02 18:46:24 +01:00
Xinyu Liu f58004eb2b
Merge pull request #7147 from emqx/inject_relup_instructions_v4.4
Inject relup instructions v4.4
2022-03-02 12:46:12 +08:00
Shawn 8be8f538a1 fix(relup): verify emqx_relup call in upgrade and downgrade clauses 2022-03-02 11:56:44 +08:00
Shawn 77e3c1d3ac feat(relup): support providing 'Extra' parameter from appup.src 2022-03-02 10:48:10 +08:00
Zaiming (Stone) Shi 8029670741 ci: add appup update check to ci 2022-03-01 17:04:09 +01:00
Zaiming (Stone) Shi ef382bf34c chore: add --make-command to update_appup script args 2022-03-01 17:04:05 +01:00
Zaiming (Stone) Shi 0996b79d96 chore: add a script to simplify appup update 2022-03-01 17:02:29 +01:00
Zaiming (Stone) Shi 52ff180e55 chore: pin esockd 5.8.5 2022-03-01 17:02:29 +01:00
Shawn 41afbd2b13 refactor(relup): don't collect relvsn -> appvsn mappings 2022-03-01 23:10:11 +08:00
Zaiming (Stone) Shi 1588a1012e
Merge pull request #7163 from zmstone/ci-delete-duplicated-sha256-file-creation
ci: delete duplicated sha256 file creation
2022-03-01 12:00:11 +01:00
Zaiming (Stone) Shi cca9e52c9a chore(appup): add missing appup instructions 2022-03-01 11:41:52 +01:00
Zaiming (Stone) Shi 02aa665e54 chore: bump version to prepare the next release 2022-03-01 11:41:52 +01:00
Xinyu Liu 0c2a7e1a7c
Merge pull request #7165 from terry-xiaoyu/improve_install_upgrade_escript
fix(relup): release upgrade failed if release dir is removed
2022-03-01 17:41:16 +08:00
Zaiming (Stone) Shi b9f0e3a351
Merge pull request #7150 from qzhuyan/main-v4.3
fix(helm): fix configmap.env template
2022-03-01 10:29:24 +01:00
Shawn 7698ad7c4b chore(relup): print more info after release upgrade complete 2022-03-01 17:15:19 +08:00
Shawn 769e79e2cd chore(relup): also inject emqx_app automatically 2022-03-01 16:19:58 +08:00
Dmitrii e5d5e2ca97
Merge pull request #7164 from ieQu1/fix-log-message
fix(auth_mnesia): Fix error message
2022-03-01 08:42:16 +01:00
zhongwencool 55aac202aa
Merge pull request #7137 from zhongwencool/get-node-info-rpc-crash
fix: rpc get node info maybe crash when emqx_sys process is not start yet.
2022-03-01 15:08:25 +08:00
zhongwencool 2c47d2c391 chore: update changelog-4.3 2022-03-01 14:19:37 +08:00
zhongwencool b1816a6647 fix: add uptime/1 for CT test. 2022-03-01 14:19:37 +08:00
zhongwencool ed41a66c6e fix: rpc get node info maybe crash when emqx_sys process is not start yet. 2022-03-01 14:19:35 +08:00
Shawn a7791b6c58 fix(relup): download to 4.4.0 failed with error bad_lib_vsn 2022-03-01 11:33:49 +08:00
Shawn 71100427dd fix(relup): release upgrade failed if release dir is removed
If the target vsn is in `unpacked` state, but the release dir
`releases/<vsn>` is removed, then installing the target vsn
again will fail with error `{error,enoent}`.

In this case we should extract the tar ball again and then continue
to install the release.
2022-03-01 10:13:17 +08:00
Zaiming (Stone) Shi fe597cd3f9 ci: delete ci step which creates sha256sum
the latest build commands create sha256 sum right after the build
e.g. command `make emqx-zip` creates two files:
- emqx-<version>.zip
- emqx-<version>.zip.sha256
2022-02-28 18:55:05 +01:00
Zaiming (Stone) Shi a4523995d2 build: git clone silent 2022-02-28 18:52:16 +01:00
ieQu1 06db325b5f fix(auth_mnesia): Fix error message 2022-02-28 18:11:55 +01:00
Shawn bcd56d3db2 Merge branch 'main-v4.4' into inject_relup_instructions_v4.4 2022-02-28 19:13:55 +08:00
Shawn f25b8801b4 fix(build): also make SYSTEM configurable by env variable 2022-02-28 19:07:38 +08:00
Shawn b7d07d7a96 fix(appup): remove the post relup scripts from emqx_dashboard.appup.src
The instructions have been move into module `emqx_relup`.
2022-02-28 10:11:20 +08:00
Zaiming (Stone) Shi f9836e6d36
Merge pull request #7152 from zmstone/chore-skip-downloading-upgrade-base-package-for-windows
chore: skip downloading upgrade base images for windows
2022-02-27 15:30:09 +01:00
Zaiming (Stone) Shi bbbb0edca1 chore: skip downloading upgrade base images for windows
because we do not support relup for windows for now
2022-02-27 14:56:46 +01:00
Zaiming (Stone) Shi e7f39d4cfe
Merge pull request #7149 from zmstone/merge-4.3-to-4.4
Merge 4.3 to 4.4
2022-02-27 13:33:23 +01:00
Shawn 28bd2fcfa4 fix(relup): release upgrade failed with {bad_lib_vsn,emqx,"4.4.2"} 2022-02-27 20:04:21 +08:00
Shawn 17440b2b53 fix(relup): add module emqx_relup 2022-02-27 10:25:57 +08:00
Shawn 2365d1e983 fix(relup): inject relup only for the current rel vsn 2022-02-27 10:11:02 +08:00
William Yang 0c2ba9fe50 fix(helm): fix configmap.env template
fix: #7070
2022-02-26 21:30:32 +01:00
Zaiming (Stone) Shi 8654600ea2 fix(update_appup): use curl command instead of wget 2022-02-26 17:00:47 +01:00
Zaiming (Stone) Shi cc8168ba23 chore(appup): commit script updated emqx.app.src 2022-02-26 16:45:55 +01:00
Zaiming (Stone) Shi 0931a426cd chore(update_appup.escript): make it work with dirty src dirs 2022-02-26 16:44:11 +01:00
Shawn 692d1e2a33 fix(relup): OTP_VSN: unbound variable 2022-02-26 21:31:09 +08:00
Shawn 91c46de4aa fix(relup): inject relup instructions to the end of relup file 2022-02-26 21:10:20 +08:00
Zaiming (Stone) Shi c157a16907 Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2022-02-26 01:05:06 +01:00
gsychev 3af36378dd
Merge pull request #7014 from gsychev/bridge_config_topic_node_template_43
Bridge config topic node template
2022-02-25 11:56:23 +00:00
gsychev 19fcd6a4f6
Merge branch 'main-v4.3' into bridge_config_topic_node_template_43 2022-02-25 10:05:36 +00:00
Zaiming (Stone) Shi a147f82b7c
Merge pull request #7135 from thalesmg/fix-sys-mon-portinfo-43
fix(sys_mon): guard before calling `erlang:port_info` [4.3]
2022-02-25 10:52:56 +01:00
Thales Macedo Garitezi cf1cc7e9db
chore(appup): update appup files 2022-02-24 17:14:47 -03:00
Thales Macedo Garitezi 6b93127ecb
fix(sys_mon): guard before calling `erlang:port_info`
Port of #7108 .

Sometimes, the `emqx_sys_mon:procinfo/1` might be called with
something that is not a port, like `[]`.  Not sure on the conditions
for this to happen.

```
2022-02-18T20:05:02.671592+00:00 [error] Generic server emqx_sys_mon terminating. Reason: {badarg,[{erlang,port_info,[[]],[{error_info,#{module => erl_erts_errors}}]},{emqx_sys_mon,portinfo,1,[{file,"/emqx/apps/emqx/src/emqx_sys_mon.erl"},{line,205}]},{emqx_sys_mon,'-handle_info/2-fun-5-',2,[{file,"/emqx/apps/emqx/src/emqx_sys_mon.erl"},{line,150}]},{emqx_sys_mon,suppress,3,[{file,"/emqx/apps/emqx/src/emqx_sys_mon.erl"},{line,184}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,695}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,771}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]}. Last message: {monitor,<0.7796.0>,busy_dist_port,[]}. State: #{events => [{busy_dist_port,#Port<0.127>}],timer => #Ref<0.2758388682.1853620226.133920>}.
```
2022-02-24 16:28:35 -03:00
JianBo He 456fcd6a54
Merge pull request #7124 from HJianBo/force-kill-takover-failure-proc
refactor(cm): rename takeover -> request_stepdown
2022-02-24 17:46:09 +08:00
JianBo He f121f9616e chore: rename testcase name 2022-02-24 17:26:17 +08:00
JianBo He b2093409b6
Merge pull request #6970 from HJianBo/fix-no-register-msg-replaying
Fix the MQTT-SN message replay when the topic is not registered to the client
2022-02-24 16:14:27 +08:00
Xinyu Liu 75b322cc2a
Merge pull request #7121 from terry-xiaoyu/fix_rel_upgrade_failed_on_eexists
fix(relup): release upgrade failed on symlink already exists
2022-02-24 16:10:10 +08:00
Shawn 815096063a chore: update the change logs 2022-02-24 16:09:23 +08:00
Shawn 63fbf8d9f8 fix(CI): add cases for relup to downgrade to old versions 2022-02-24 15:24:06 +08:00
JianBo He d622eb848f refactor(cm): rename takeover -> request_stepdown
see: https://github.com/emqx/emqx/pull/7026#pullrequestreview-891954135
2022-02-24 14:43:46 +08:00
JianBo He b22e341c67
Merge pull request #7026 from HJianBo/force-kill-takover-failure-proc
Force kill takover failure proc
2022-02-24 14:12:12 +08:00
Shawn 7dbb5b1032 fix(CI): don't guarantee not to lose a single message during relup 2022-02-24 12:52:57 +08:00
JianBo He d943cc2f1c chore(exproto): update appup.src 2022-02-24 11:51:00 +08:00
JianBo He 7236206373 fix(exproto): handle discard call 2022-02-24 11:51:00 +08:00
JianBo He bf565efc99 chore: update CHANGES-4.3.md 2022-02-24 11:51:00 +08:00
JianBo He 4673ca43a0 chore(emqx): update appup.src 2022-02-24 11:51:00 +08:00
JianBo He bfd0fd9019 refactor(cm): rename call_or_kill to takeover 2022-02-24 11:50:57 +08:00
JianBo He 2c512c2097 docs: update CHANGES-4.3.md 2022-02-24 11:30:15 +08:00
JianBo He 76d0835e4f chore(mqttsn): update appup.src 2022-02-24 11:30:12 +08:00
JianBo He e9031ea4c1 fix(mqttsn): cache and replay the invaild-topic-id delivery 2022-02-24 11:28:04 +08:00
JianBo He 96a86061c2 refactor(sn): pretty frame print formation 2022-02-24 11:28:04 +08:00
JianBo He 66807f17df test(cm): cover {takeover, 'begin'/'end'} action 2022-02-24 09:53:17 +08:00
JianBo He 6dd0b49dd2 feat(cm): force shutdown of processe that cannot answer takeover event
Related PR: #6030
2022-02-24 09:53:17 +08:00
William Yang c9ff263e59
Merge pull request #7117 from qzhuyan/bugfix/william/sys-mem-false-alarm
bugfix: sys mem false alarm
2022-02-23 15:17:28 +01:00
zhouzb 6c9fd5e5a8
Merge pull request #7122 from Rory-Z/dev/v4.4.1
ci(cross build): fix syntax error
2022-02-23 20:49:00 +08:00
zhanghongtong 2796113c20 ci(cross build): fix syntax error 2022-02-23 20:03:57 +08:00
zhouzb b7819639a6
Merge pull request #7120 from Rory-Z/dev/v4.4.1
ci(cross build): fix syntax error
2022-02-23 19:34:44 +08:00
Shawn 442a1290a8 fix(relup): release upgrade failed on symlink already exists 2022-02-23 19:14:59 +08:00
William Yang 2c4fc6f6f7 docs(changelog): system mem false alarm 2022-02-23 11:47:19 +01:00
zhanghongtong 7d52bc3d3a ci(cross build): fix syntax error 2022-02-23 18:29:49 +08:00
zhouzb 3b0e427ee1
Merge pull request #7118 from Rory-Z/dev/v4.4.1
ci(cross build): splitting cross builds and upload assets
2022-02-23 18:25:38 +08:00
zhanghongtong 9d50d5e99d ci(cross build): splitting cross builds and upload assets 2022-02-23 17:15:35 +08:00
William Yang 372ea29d96 fix: upgrade code, system mem false alarm 2022-02-23 09:38:54 +01:00
William Yang 841d6d5036 fix: system mem false alarm 2022-02-23 09:14:28 +01:00
zhanghongtong b6e57b1789 ci(cross build): splitting cross builds and upload assets 2022-02-23 15:27:32 +08:00
JianBo He ddf2022542
Merge pull request #6983 from HJianBo/fix-exproto-online-clients-v4.3
Improve ExProto client management
2022-02-23 10:59:19 +08:00
Zaiming (Stone) Shi 42f7110a2d
Merge pull request #7107 from zmstone/fix-update-webhook-app-vsn
fix: bump emqx_web_hook app version
2022-02-22 23:41:24 +01:00
Zaiming (Stone) Shi 1fa27b28e4 fix: bump emqx_web_hook app version 2022-02-22 16:15:15 +01:00
Zaiming (Stone) Shi c1513d6faf
Merge pull request #7101 from zmstone/chore-rename-more-descriptive-info-emqx
chore: rename more descriptive EQM X to EMQX
2022-02-22 14:20:09 +01:00
Zaiming (Stone) Shi f87d262fbc
Merge pull request #7102 from zmstone/fix-docker-no-volume-for-etc
fix(docker): allow config changes in docker rebuild
2022-02-22 13:59:12 +01:00
lafirest 9ef760aff9
Merge pull request #7078 from lafirest/fix/api
fix(emqx_mgmt_http): add slow subs api into emqx_mgmt_http api list
2022-02-22 20:52:30 +08:00
Zaiming (Stone) Shi b4836a01fd fix(docker): allow config changes in docker rebuild 2022-02-22 12:42:13 +01:00
Zaiming (Stone) Shi 43c900bb5a chore: rename more descriptive EQM X to EMQX 2022-02-22 11:16:38 +01:00
Zaiming (Stone) Shi c843903f3a
Merge pull request #7095 from HJianBo/merge-main-v4.3-into-v4.4
Merge main v4.3 into v4.4
2022-02-22 11:08:33 +01:00
Zaiming (Stone) Shi 4473a832bc build: fix macos -> macos* so matches macos10 and macos11 2022-02-22 09:43:06 +01:00
Zaiming (Stone) Shi fb7944391d build: fix shellcheck 2022-02-22 09:40:32 +01:00
JianBo He 7adc5fb158
Merge branch 'main-v4.3' into fix-exproto-online-clients-v4.3 2022-02-22 15:46:27 +08:00
JianBo He 18feec9030 chore(ci): fix the download filename 2022-02-22 13:43:46 +08:00
JianBo He 3be4f30f8c
Merge pull request #7096 from JimMoen/fix-stomp-conn_props
Fix stomp conn props
2022-02-22 13:33:35 +08:00
JianBo He 6b720286c6 chore: fix bad sytanx for emqx.appup.src 2022-02-22 11:55:20 +08:00
JimMoen d98d7e77c8 chore: update CHANGES.md 2022-02-22 11:47:04 +08:00
JianBo He 521bdd20b4 Merge remote-tracking branch 'ce/main-v4.3' into merge-main-v4.3-into-v4.4 2022-02-22 11:43:46 +08:00
JimMoen 3cc2f0e2d3 fix(stomp): `conn_props` should be map 2022-02-22 11:31:14 +08:00
JianBo He 9300d6636d docs: update CHANGES-4.3.md 2022-02-22 10:30:53 +08:00
JianBo He a2d8405f99 chore: update appup.src 2022-02-22 10:30:52 +08:00
JianBo He b802bcb6fc refactor(exproto): pre-register the anonymous client 2022-02-22 10:23:16 +08:00
Zaiming (Stone) Shi 50b2efe2b0
Merge pull request #7084 from zmstone/otp-24-for-windows
Otp 24 for windows
2022-02-21 18:49:24 +01:00
JimMoen f42c04d6fc
Merge pull request #7085 from JimMoen/fix-server-keepalive
fix(frame): `server_keepalive` only for MQTT v5.0
2022-02-21 22:25:31 +08:00
Zaiming (Stone) Shi 99ef6fbb2a docs: update CHANGES-4.4 2022-02-21 15:09:52 +01:00
Zaiming (Stone) Shi 3c22878d54 ci: update windows ci to use erlef action and add windows to slim build 2022-02-21 15:09:32 +01:00
Zaiming (Stone) Shi 5e3543e282
Merge pull request #7073 from zmstone/fix-find-command-for-4.3-and-4.4
build: fix find command for windows
2022-02-21 12:23:42 +01:00
Zaiming (Stone) Shi 89e2cdb5a4 docs: update windows.md to use otp 24 2022-02-21 11:55:19 +01:00
JimMoen 31b006a0d1 fix(frame): `server_keepalive` only for MQTT v5.0 2022-02-21 18:46:53 +08:00
Zaiming (Stone) Shi e18fef1ba8
Merge pull request #7083 from zmstone/prepare-for-v4.4.1-release
Prepare for v4.4.1 release
2022-02-21 11:45:16 +01:00
Zaiming (Stone) Shi 8226ed2b49 chore: update CHANGES-4.4 2022-02-21 11:36:49 +01:00
Zaiming (Stone) Shi e13f2101f2 chore: prepare for v4.4.1 release 2022-02-21 11:34:23 +01:00
Ilya Averyanov 9648cd92e9
Merge pull request #7066 from savonarola/no-elvis-4.3
chore(codestyle): remove Elvis
2022-02-21 11:29:40 +03:00
Zaiming (Stone) Shi 107e447de4 build: fix find command for windows
windows has its own find command
2022-02-21 09:17:45 +01:00
Zaiming (Stone) Shi ab3148da58
Merge pull request #7077 from emqx/fix-windows-build
build: fix windows build
2022-02-21 09:14:48 +01:00
Zaiming (Stone) Shi 14575fed63 chore: prepare for release v4.4.1-rc.1 2022-02-21 08:13:53 +01:00
lafirest 9abbe4eafc chore(emqx_management): bump app version 2022-02-21 14:56:15 +08:00
lafirest 62ced62aac fix(emqx_mgmt_http): add slow subs api into emqx_mgmt_http api list 2022-02-21 14:33:36 +08:00
Zaiming (Stone) Shi 3a5a2047e9 build: fix windows build 2022-02-21 00:53:56 +01:00
Zaiming (Stone) Shi 60c3df5dee
Merge pull request #7076 from zmstone/chore-4.3-ensure-remsh-node-name-for-upgrader
chore: ensure remsh node name prefix for upgrader
2022-02-20 21:31:39 +01:00
Zaiming (Stone) Shi 2325e8cfb3 chore: ensure remsh node name prefix for upgrader
for remsh prefixed nodes, ekka pick a random port to listen on
instead of following the conventional port mapping rule:
ekka listens on 4370 for emqx or emqx0 and 4371 for
emqx1 and so on
2022-02-20 19:57:56 +01:00
Ilya Averyanov 557c52dd8a chore(codestyle): remove Elvis 2022-02-18 20:35:19 +03:00
Shawn 3bd961ca73 fix(CI): remove e|v from downloading urls of emqx packages 2022-02-18 23:05:35 +08:00
Shawn 3690d1951e chore: add more debug info for relup-base-packages.sh 2022-02-18 22:41:03 +08:00
zhouzb e12065f361
Merge pull request #7060 from HJianBo/main-v4.4
chore: bump version
2022-02-18 19:15:53 +08:00
JianBo He 82285980a7 chore: bump version 2022-02-18 19:14:30 +08:00
lafirest f886cd705c
Merge pull request #7058 from lafirest/fix/hook_remove_error
fix(emqx_slow_subs): fix upgrade action error
2022-02-18 16:44:51 +08:00
DDDHuang c3cb04c229
Merge pull request #7041 from DDDHuang/mb_doc
fix(doc): code spelling
2022-02-18 16:38:21 +08:00
lafirest 1a1415a996 fix(emqx_slow_subs): fix upgrade action error 2022-02-18 16:27:22 +08:00
lafirest 513942a2d8
Merge pull request #7056 from lafirest/fix/upgrade
fix(emqx_slow_subs): add upgrade action
2022-02-18 15:11:38 +08:00
lafirest 8a75b53052 fix(emqx_slow_subs): add upgrade/downgrade action 2022-02-18 14:32:45 +08:00
lafirest 296f48268e
Merge pull request #7055 from lafirest/fix/changes
fix(docs): add slow subs change log
2022-02-18 12:18:10 +08:00
lafirest 0ba6262d06 fix(docs): update slow subs change log 2022-02-18 11:10:57 +08:00
tigercl 4773e6f038
Merge pull request #7053 from HJianBo/update-dashboard-vsn
chore: update dashboard vsn
2022-02-18 09:53:51 +08:00
lafirest 24bd7371b7 fix(docs): add slow subs change log 2022-02-18 09:51:48 +08:00
JianBo He c13f32b2a5 chore: update dashboard vsn 2022-02-18 09:50:33 +08:00
JianBo He b27ac84625
Merge pull request #7045 from HJianBo/not-stop-application
chore(webhook): refine appup.src
2022-02-18 09:21:07 +08:00
Zaiming (Stone) Shi 4b3b2d076a
Merge pull request #7050 from zhongwencool/add-log-trace-changelog
fix(doc): add log trace changelog for 4.4.0
2022-02-17 16:35:31 +01:00
zhongwencool b044eda31f
fix(doc): Update CHANGES-4.4.md
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-02-17 23:10:13 +08:00
zhongwencool bfa0a741a2 fix(doc): add log trace changelog for 4.4.0 2022-02-17 22:41:10 +08:00
Georgy Sychev 0bd080c063 feat(emqx_bridge_mqtt): ${node} in topic config
Adds ${node} interpolation in topic option of configuration
Just like the clientid already works

Closes: #6431

feat(emqx_bridge_mqtt): bumped versions the right way

chore(appup): appups for mqtt bridge

feat(mqtt_bridge): test for bridge config

And also bumped one small version

chore(mqtt_bridge): updated CHANGES-4.3.md

fix(mqtt_bridge): conditional export

chore(mqtt_bridge): appup
2022-02-17 16:05:34 +03:00
Zaiming (Stone) Shi 1b5071410d
Merge pull request #7046 from zmstone/docs-add-otp
docs(CHANGES-4.4): add changes of pckage name format
2022-02-17 11:43:41 +01:00
Zaiming (Stone) Shi 0a66d40e39 chore: prepare for 4.4.0-rc.2 release 2022-02-17 11:21:22 +01:00
Zaiming (Stone) Shi cc1734490f chore: trigger a version check before pushing a tag 2022-02-17 11:20:19 +01:00
Xinyu Liu f55419f2a5
Merge pull request #7047 from EMQ-YangM/main-v4.4
fix(emqx_rule_metrics):  add a function for code hot upgrade
2022-02-17 18:18:39 +08:00
EMQ-YangM af8bc8ee32 fix(emqx_rule_metrics): add a function for code hot upgrade 2022-02-17 18:15:19 +08:00
Zaiming (Stone) Shi a96c1284c6 docs(CHANGES-4.4): add changes of pckage name format 2022-02-17 11:00:49 +01:00
JianBo He fde634ac27 chore(webhook): refine appup.src 2022-02-17 17:48:58 +08:00
Xinyu Liu 09c5114d42
Merge pull request #7042 from Rory-Z/ci/fix-cross-build-fail
ci(cross build): fix build raspbian failed on armhf
2022-02-17 16:52:17 +08:00
zhanghongtong ee7acdfc33 ci(cross build): fix build raspbian failed on armhf 2022-02-17 15:52:36 +08:00
Xinyu Liu 1b5986a5e1
Merge pull request #7044 from terry-xiaoyu/fix_windows_build
fix(build): change header of shell script to "#!/usr/bin/env bash"
2022-02-17 15:33:34 +08:00
Shawn 037b9e440c fix(build): change header of shell script to "#!/usr/bin/env bash" 2022-02-17 15:21:17 +08:00
DDDHuang 42c70cd2a5 fix(doc): code spelling 2022-02-17 14:06:17 +08:00
JianBo He 922ffc1d1c
Merge pull request #7030 from HJianBo/force-appup-for-dashboard 2022-02-17 13:39:41 +08:00
Zaiming (Stone) Shi 8f9b351da8
Merge pull request #7031 from zmstone/chore-rename-var-name-to-avoid-confusion
4.3 fix upgrade base package download
2022-02-17 06:05:14 +01:00
Rory Z 545abe2d52
Merge pull request #7006 from Rory-Z/ci/update-target-event
ci(build_packages): add target event
2022-02-17 09:33:17 +08:00
JianBo He 480130c1d8 chore(dashboard): bump version 2022-02-17 09:23:40 +08:00
Zaiming (Stone) Shi 62dd815807 chore(scripts): make shellcheck happy 2022-02-16 16:16:35 +01:00
Zaiming (Stone) Shi 538f843f14 fix(relup-base-packages.sh): download per release edition 2022-02-16 16:16:10 +01:00
Zaiming (Stone) Shi f7135433be chore(relup-base-vsns.sh): rename PROFILE to EDITION
to avoid confusion with rebar profile
2022-02-16 14:10:43 +01:00
JianBo He 4775ea353d chore: update scripts/apps-version-check.sh
Co-authored-by: k32 <10274441+k32@users.noreply.github.com>
2022-02-16 19:41:17 +08:00
JianBo He e7ce4ed215 chore: force check for version upgrade of emqx_dashboard
same with: https://github.com/emqx/emqx/pull/5879
2022-02-16 18:38:55 +08:00
Rory Z 149fe7bcdf
Merge pull request #7010 from Rory-Z/build/add-new-script
build(relup): add new script for download relup base packages
2022-02-16 15:57:25 +08:00
zhanghongtong 2acdc64b9d style(script): rename variable name 2022-02-16 14:52:31 +08:00
JianBo He 7a7b0c8442
Merge pull request #7024 from HJianBo/fix-bad-appup.src
chore(emqx): fix mutiply defined module in emqx.appup.src
2022-02-16 14:37:27 +08:00
Zaiming (Stone) Shi 2c3ad3cb2d
Merge pull request #7019 from zmstone/docs-remove-space-from-product-name
docs: remove space from product name
2022-02-16 07:18:39 +01:00
JianBo He a42927f173 chore(emqx): fix mutiply defined module in emqx.appup.src 2022-02-16 13:46:38 +08:00
Zaiming (Stone) Shi d2840a8aa1 docs: change EMQ X to EMQX in more descriptive info 2022-02-15 22:18:25 +01:00
Zaiming (Stone) Shi a5f6e94467 docs: EMQ X -> EMQX 2022-02-15 22:12:46 +01:00
Zaiming (Stone) Shi c766087812
Merge pull request #7016 from zmstone/docs-delete-space-in-EMQX-product-name
docs(README): EMQ X -> EMQX
2022-02-15 19:05:42 +01:00
Zaiming (Stone) Shi e09e5673eb docs(README): EMQ X -> EMQX 2022-02-15 16:15:25 +01:00
zhanghongtong 091398d863 build(relup): add new script for download relup base packages 2022-02-15 17:57:31 +08:00
JianBo He cb5fe77706
Merge pull request #7009 from HJianBo/fix-lwm2m-api-node-badmatch
fix(lwm2m): fix querying lwm2m client list on the another node
2022-02-15 14:58:18 +08:00
JianBo He 9fb53cb47d docs: update CHANGES-4.3.md 2022-02-15 11:59:46 +08:00
JianBo He 74aa209207 chore(lwm2m): update app.src & appup.src 2022-02-15 11:59:43 +08:00
JianBo He 425546864d fix(lwm2m): fix querying lwm2m client list on the another node 2022-02-15 11:23:44 +08:00
zhanghongtong 88769bc23b ci(build_packages): cancel repeating actions 2022-02-15 10:15:25 +08:00
zhanghongtong c1f77da3b9 ci(build_packages): add target event 2022-02-15 10:11:34 +08:00
JianBo He 9840b8da59
Merge pull request #7005 from zmstone/merge-v4.3.12-into-main-v4.4
Merge tag v4.3.12 into main-v4.4
2022-02-15 09:22:36 +08:00
Zaiming (Stone) Shi 22ae8985c6 chore: compare to rel-* versions for appup 2022-02-14 22:18:53 +01:00
Thales Macedo Garitezi e1592c41d0
Merge pull request #6979 from thalesmg/bugfix-find-alias-clause
fix(channel): wrong case clause when alias is inexistent
2022-02-14 15:24:54 -03:00
Thales Macedo Garitezi 3f31df2297
docs: add comment explaining application and release vsn discrepancy 2022-02-14 13:18:53 -03:00
Thales Macedo Garitezi b6e9043c49
chore(changelog): update changelog 2022-02-14 13:18:51 -03:00
Thales Macedo Garitezi acf3b8cbe9
chore(emqx): update appup 2022-02-14 13:18:07 -03:00
Thales Macedo Garitezi 8302cac329
fix(channel): wrong case clause when alias is inexistent
Fixes #6978 .
2022-02-14 13:18:07 -03:00
Zaiming (Stone) Shi 206b7ac4a9
Merge pull request #6996 from zmstone/feat-add-cli-to-clean-pem-cache
feat: add cli to clean pem cache
2022-02-14 16:22:13 +01:00
Zaiming (Stone) Shi 91180595d0 refactor(cli): simplify ACL cache CLI logging 2022-02-14 14:52:34 +01:00
Zaiming (Stone) Shi f6ca64c76d feat: add pem cache CLI 2022-02-14 14:52:34 +01:00
JianBo He a88dd4aaa5 Merge tag 'v4.3.12' into main-v4.4 2022-02-14 19:37:59 +08:00
Zaiming (Stone) Shi f1b10ec2b0
Merge pull request #6927 from Rory-Z/ci/push-multiarch-image-for-aws
ci(build_packages): push muilt arch image for aws ecr
2022-02-14 12:26:56 +01:00
Zaiming (Stone) Shi 9696663a77
Merge pull request #6998 from zmstone/chore-package-name-from-rhel-to-el
build: rename distro from 'rhel' to 'el'
2022-02-14 10:47:00 +01:00
Zaiming (Stone) Shi 9f897a650a build: rename distro from 'rhel' to 'el' 2022-02-14 09:28:29 +01:00
zhanghongtong 7a45ad8900 chore: fix a few typos 2022-02-13 20:50:35 +08:00
Zaiming (Stone) Shi 2a5de6a872
Merge pull request #6995 from zmstone/ci-exclude-instead-of-include
ci: use exclude instead of include for build matrix
2022-02-13 07:18:29 +01:00
zhanghongtong e9238c6ca3 ci: use exclude instead of include for build matrix 2022-02-13 12:51:53 +08:00
Zaiming (Stone) Shi dfb591cac7 ci: use exclude instead of include for build matrix
include is unconditional, as a result, it brins in emqx profile
to enterprise repo
2022-02-12 14:32:54 +01:00
Zaiming (Stone) Shi 5171d3811c ci: revert to openssl digest for sha256 sum on mac 2022-02-12 12:24:48 +01:00
Zaiming (Stone) Shi 9ff0899b75
Merge pull request #6994 from emqx/fix-sha256sum-on-windows
ci: fix sha256sum in windows
2022-02-12 11:04:23 +01:00
Zaiming (Stone) Shi 857e9aee52 ci: fix sha256sum in windows
for some reason Get-FileHash (or maybe later piped tools) produced
non-text content
2022-02-12 10:48:28 +01:00
Zaiming (Stone) Shi 71a9489cfe
Merge pull request #6993 from zmstone/ci-fix-action-typo
ci: fix action typo repository -> registry
2022-02-11 21:41:54 +01:00
Zaiming (Stone) Shi 257f6cc589 ci: fix action typo repository -> registry 2022-02-11 21:24:40 +01:00
Zaiming (Stone) Shi 17fa49738f
Merge pull request #6991 from emqx/test-debian10-ci
wait longer for emqx stop in relup test
2022-02-11 17:21:46 +01:00
Zaiming (Stone) Shi 2df43f8b5f ci: add more time to allow stop 2022-02-11 16:19:02 +01:00
Zaiming (Stone) Shi a42403e046 ci: quite unzip 2022-02-11 15:56:25 +01:00
Zaiming (Stone) Shi 28508e23ec ci: dump logs when failed to stop 2022-02-11 15:20:15 +01:00
DDDHuang 5985b7cb09
Merge pull request #6985 from DDDHuang/ws_client_metrics44
feat(ws): more client metrics
2022-02-11 13:43:25 +08:00
DDDHuang e9f1af8098 feat(ws): appup remove old 2022-02-11 11:16:31 +08:00
DDDHuang c6bafd5131 feat(ws): appup 2022-02-11 11:04:14 +08:00
DDDHuang 0bb01210ae feat(ws): more client metrics 2022-02-11 10:50:46 +08:00
Zaiming (Stone) Shi 089c1d516a
Merge pull request #6974 from zmstone/merge-v4.3-to-v4.4
Merge v4.3 to v4.4
2022-02-10 21:18:45 +01:00
Shawn 992e7e66cf
Merge pull request #6957 from thalesmg/fix-ctl-print-43
fix(ctl): fix formatting when printing messages without arguments (4.3)
2022-02-10 22:09:06 +08:00
Thales Macedo Garitezi fdef292ef7
fix(appup): rm redundant `load_module` instruction after `update` 2022-02-10 09:31:36 -03:00
Shawn 646ef25d96
Merge branch 'main-v4.3' into fix-ctl-print-43 2022-02-10 19:13:29 +08:00
JianBo He d7c432f57c
Merge pull request #6928 from Rory-Z/ci/push-multiarch-image-for-aws-ecr
ci(build_packages): push muilt arch image for aws ecr
2022-02-10 18:58:20 +08:00
Zaiming (Stone) Shi 5d856041c7 docs: update CHANGES-4.4 to prepare for 4.4.0 release cut
removed bug fixes because 4.4.0 is the first release of 4.4
all bug fixes are forward merged from 4.3
2022-02-10 11:41:13 +01:00
Shawn b09a38d53f chore: update release to 4.3.12 2022-02-10 18:30:22 +08:00
Zaiming (Stone) Shi 1392fa0b1d Merge remote-tracking branch 'origin/main-v4.3' into merge-v4.3-to-v4.4 2022-02-10 11:25:17 +01:00
JianBo He 175d6969d4
Merge pull request #6963 from HJianBo/fix_stomp_unexpected_linefeed
fix(stomp): fix unexpected_linefeed error if the packet truncated on …
2022-02-10 17:41:51 +08:00
Shawn 40594f9713
Merge pull request #6968 from terry-xiaoyu/ekka_0.8.1.8
update changes doc for printable message id
2022-02-10 15:31:18 +08:00
Shawn 475f0be959 docs(CHANGES): update changes doc for #6961 2022-02-10 15:30:34 +08:00
JianBo He cdfeb46951 test(mqttsn): remove unused vars 2022-02-10 15:30:10 +08:00
JianBo He 289904bbcf fix(stomp): fix unexpected_linefeed error if the packet truncated on headers 2022-02-10 14:48:45 +08:00
Zaiming (Stone) Shi 3fb5e19cc9
Merge pull request #6959 from zmstone/upgrade-to-ekka-0.8.1.8
[4.3] Upgrade to ekka 0.8.1.8
2022-02-10 07:12:35 +01:00
Shawn 967b2e4a74
Merge pull request #6965 from terry-xiaoyu/log_printable_mqtt_msg_id2
fix: emqx_message:format/1 failed on undefined message id
2022-02-10 12:45:08 +08:00
Shawn 8cf268dffb fix: emqx_message:format/1 failed on undefined message id 2022-02-10 12:43:39 +08:00
Shawn 3e962bf5ba
Merge pull request #6962 from terry-xiaoyu/log_printable_mqtt_msg_id2
fix(appup): update appup file for module emqx_message
2022-02-10 11:12:59 +08:00
Shawn 038136fc83 fix(appup): update appup file for module emqx_message 2022-02-10 11:04:25 +08:00
Shawn 0a2fa7c17c
Merge pull request #6961 from terry-xiaoyu/log_printable_mqtt_msg_id
fix(log): format the message id to hexstring before printing
2022-02-10 10:40:55 +08:00
JimMoen 130b455752
Merge pull request #6960 from JimMoen/update-dashboard
chore(dashboard): update dashboard version
2022-02-10 10:37:40 +08:00
JimMoen 5b71ca6ad5 chore(dashboard): update dashboard version 2022-02-10 10:00:37 +08:00
Shawn 3b5b4b99ed fix(log): format the message id to hexstring before printing 2022-02-10 09:47:33 +08:00
zhanghongtong fd9b787e9d ci(build_packages): push muilt arch image for aws ecr
done #6870
2022-02-10 09:38:23 +08:00
zhanghongtong ec0843633c chore: change step name to match the actual commands 2022-02-10 09:36:16 +08:00
zhanghongtong c316cc464f ci(build_packages): push muilt arch image for aws ecr 2022-02-10 09:34:15 +08:00
Shawn 647bcce760
Merge pull request #6955 from emqx/build-rename-centos-to-rhel
build: rename centos to rhel
2022-02-10 09:33:06 +08:00
Zaiming (Stone) Shi 12fbcc1330 chore: upgrade to ekka 0.8.1.8
print client status before killing due to holding lock for too long
2022-02-09 22:54:57 +01:00
Zaiming (Stone) Shi fd75756d5c ci: update to emqx-builder 4.4-5 (rockylinux) 2022-02-09 22:49:08 +01:00
Zaiming (Stone) Shi 4f6876b6e9 ci: package slim-build on rockylinux 2022-02-09 22:16:39 +01:00
Zaiming (Stone) Shi d863609f43 build: use rockylinux and 'rhel' for package names 2022-02-09 22:13:00 +01:00
Thales Macedo Garitezi e053700441
style: please elvis checks 2022-02-09 11:02:05 -03:00
Thales Macedo Garitezi 5e223ac64f
chore(appup): update appup files 2022-02-09 09:54:39 -03:00
Thales Macedo Garitezi b968d4c416
fix(ctl): fix formatting when printing messages without arguments (4.3)
Without passing an empty argument list to `emqx_ctl:print`, formatting
instructions like `~n` are being printed literally.

```
Ignore.~nJoin the cluster successfully.~nCluster status: #{running_nodes =>
                      ['emqx@emqx-0.int.thalesmg','emqx@emqx-1.int.thalesmg',
                       'emqx@emqx-2.int.thalesmg','emqx@emqx-3.int.thalesmg',
                       'emqx@emqx-4.int.thalesmg'],
                  stopped_nodes => []}
```
2022-02-09 09:36:27 -03:00
lafirest 674752dcb3
Merge pull request #6937 from lafirest/fix/trap_exit
fix(emqx_slow_subs): trap the exit message
2022-02-09 09:43:18 +08:00
Zaiming (Stone) Shi 5e7d40fd23
Merge pull request #6941 from savonarola/rebar3-vs-make-4.4
[4.4] Rebar3 vs make
2022-02-08 15:24:36 +01:00
Ilya Averyanov c1d2be3bff Merge branch 'main-v4.3' into rebar3-vs-make-4.4
* main-v4.3:
  chore(ci): use make apps/emqx_auth_ldap-ct instead of rebar command
2022-02-08 14:48:19 +03:00
Ilya Averyanov ca5c34ba96
Merge pull request #6932 from savonarola/rebar3-vs-make-4.3
chore(ci): use make apps/emqx_auth_ldap-ct instead of rebar command
2022-02-08 14:38:20 +03:00
lafirest 252514bfe0 fix(emqx_slow_subs): trap the exit message 2022-02-08 18:28:00 +08:00
zhongwencool 4a6ddce43c
Merge pull request #6926 from zhongwencool/trace-crash
fix(trace): don't return 500 when emqx_mod_trace not started.
2022-02-08 15:45:27 +08:00
zhongwencool bcb15f2a95 fix(trace): don't return 500 when emqx_mod_trace not started. 2022-02-08 14:56:02 +08:00
zhongwencool 59ff3090f4
Merge pull request #6935 from zhongwencool/sync-v4.3-to-v4.4
Sync v4.3 to v4.4
2022-02-08 14:53:07 +08:00
zhanghongtong cc56ad272f fix(helm): remove the default environment variables from the template 2022-02-08 14:06:39 +08:00
zhanghongtong 352635f227 fix(helm): fix deploy error 2022-02-08 10:40:16 +08:00
zhongwencool 617402ed09 Merge branch 'main-v4.4' into sync-v4.3-to-v4.4 2022-02-08 09:59:21 +08:00
Ilya Averyanov 1480efde19 chore(ci): use make apps/emqx_auth_ldap-ct instead of rebar command 2022-02-07 21:55:30 +03:00
Zaiming (Stone) Shi a18f3bc971
Merge pull request #6860 from fernando-almeida/main-v4.3
Updated Helm chart to support new features and updated README
2022-02-07 17:30:36 +01:00
Zaiming (Stone) Shi e613843ce8
Merge pull request #6930 from zhongwencool/ci-pin-pytest
ci(pytest): pin pytest version at 6.2.5.
2022-02-07 17:14:51 +01:00
zhongwencool 51ed6abcd6 ci(pytest): pin pytest version at 6.2.5. 2022-02-07 17:23:13 +08:00
k32 8ed0daf5be
Merge pull request #6911 from k32/rpc-client-driver
fix(emqx_schema): Allow to set gen_rpc.default_client_driver
2022-02-02 13:19:44 +01:00
k32 ed98773ca7 fix(emqx_schema): Allow to set gen_rpc.default_client_driver 2022-02-02 12:42:26 +01:00
zhongwencool 3036f02963
Merge pull request #6893 from zhongwencool/watemark-limit-check
fix(watermark): hight watermark should greater than low watermark.
2022-01-28 19:06:44 +08:00
Shawn b5aeba86cd
Merge pull request #6894 from terry-xiaoyu/relup_test_failed
fix(CI): build packages failed on release upgrade testing - again
2022-01-28 18:00:00 +08:00
Shawn 633c5c16de fix(CI): build packages failed on release upgrade testing - again 2022-01-28 17:59:13 +08:00
zhongwencool 579905b92a fix(watermark): hight watermark should greater than low watermark. 2022-01-28 17:58:11 +08:00
Shawn 3fd978522d
Merge pull request #6891 from terry-xiaoyu/relup_test_failed
fix(CI): build packages failed on release upgrade testing
2022-01-28 17:14:09 +08:00
Shawn a4f873f7cd fix(CI): build packages failed on release upgrade testing 2022-01-28 17:07:16 +08:00
Shawn 7e26ae4f92
Merge pull request #6889 from HJianBo/fix-modules-appup
fix(modules): update the appup.src
2022-01-28 16:02:03 +08:00
JianBo He 1d7a1fde8a fix(modules): update the appup.src 2022-01-28 15:43:32 +08:00
Shawn 31a68f4627 fix(appup): No such module: emqx_mod_sup 2022-01-28 14:33:18 +08:00
Shawn 0500c475cf fix(appup): Multiply defined module: emqx_slow_subs 2022-01-28 12:22:29 +08:00
Shawn d15fd95ad4 fix(appup): Multiply defined module: emqx_session 2022-01-28 11:54:10 +08:00
Shawn 11a9f6232c
Merge pull request #6884 from emqx/copy_of_main-v4.3
Sync code from main-v4.3 to main-v4.4
2022-01-27 19:39:59 +08:00
Shawn 791b22f151
Merge branch 'main-v4.4' into copy_of_main-v4.3 2022-01-27 18:46:49 +08:00
Shawn 6319c3402f fix(appup): Multiply defined module: emqx_metrics
make emqx-zip failed:

```
===> Error generating relup:
          Multiply defined module: emqx_metrics
```
2022-01-27 18:01:17 +08:00
Zaiming (Stone) Shi 570bc5023b
Merge pull request #6879 from zmstone/fix-stop-command-defunct-detection
fix: stop command should detect defunct pid
2022-01-27 08:25:06 +01:00
zhongwencool ef82287634
Merge pull request #6883 from zhongwencool/fix-watermark-4.3
fix(alarm): watermark replace >= =< with > <
2022-01-27 14:32:16 +08:00
zhongwencool e2dec09b0d fix(alarm): watermark replace >= =< with > < 2022-01-27 11:59:48 +08:00
JianBo He 4cdd529b5a
Merge pull request #6866 from HJianBo/remove_connected_at_feild
fix(webhook): remove the connected_at field for client.connect
2022-01-27 10:41:53 +08:00
JianBo He 34c489da40
Merge pull request #6868 from HJianBo/fix-stomp-frame-parser
Fix the sticky tcp stream parsing
2022-01-27 10:40:37 +08:00
Shawn a66bfeaa25
Merge pull request #6871 from terry-xiaoyu/rebar3_download
fix(ci): add some debug print for downloading rebar3
2022-01-27 09:57:48 +08:00
Zaiming (Stone) Shi 72c909051b fix: stop command should detect defunct pid 2022-01-26 23:48:31 +01:00
Zaiming (Stone) Shi 61e9fd5f04
Merge pull request #6875 from zmstone/ci-find-upgrade-base-with-script
ci: find relup base version using script scripts/relup-base-vsns.sh
2022-01-26 20:52:09 +01:00
Zaiming (Stone) Shi e5d196569c ci: find relup base version using script scripts/relup-base-vsns.sh 2022-01-26 18:26:43 +01:00
Zaiming (Stone) Shi f65cd003c0
Merge pull request #6872 from zmstone/update-windows-build-instructions
Update windows build instructions
2022-01-26 13:33:32 +01:00
Zaiming (Stone) Shi 99712d3521 ci: debug windows build 2022-01-26 12:08:32 +01:00
Shawn 301d6bf794 fix(ci): add some debug print for downloading rebar3 2022-01-26 18:55:17 +08:00
Fernando Almeida b91dc1c13d fix(helm-chart): revised software name to match conventioned name
fix(helm-chart): added missing new-line from resource templates
2022-01-26 09:01:25 +00:00
zhongwencool d9e7868d64
Merge pull request #6865 from zhongwencool/sys-mem-alarm
fix(appup): add emqx.erl to appup.src
2022-01-26 16:40:22 +08:00
JianBo He 18ed00e57e test(stomp): add testcase for sticky tcp strem 2022-01-26 15:49:51 +08:00
JianBo He fd88f484d2 fix(stomp): fix the sticky tcp stream parsing 2022-01-26 15:41:14 +08:00
JianBo He 85652aa373 fix(webhook): remove the connected_at field for client.connect 2022-01-26 15:01:36 +08:00
zhongwencool 9d633507f5 fix(appup): add emqx.erl to appup.src 2022-01-26 14:32:00 +08:00
zhongwencool 209eff5552
Merge pull request #6859 from zmstone/merge-v4.3-to-v4.4
Merge v4.3 to v4.4
2022-01-26 11:34:57 +08:00
Fernando Almeida 73c452c64d fix(helm-chart): replace envFromSecret with more broad extraEnvFrom
fix(helm-chart): refactored Stateful set for readability.
fix(helm-chart): added missing extra* variables to StatefulSet and README.
fix(helm-chart): added sensible defaults for extra* settings.
2022-01-25 23:43:35 +00:00
Fernando Almeida 86887e8559 fix(helm-chart): fix indentation bug in env configmap 2022-01-25 23:43:35 +00:00
Fernando Almeida 36b5982630 feat(helm-chart): fix value in WSS example 2022-01-25 23:43:35 +00:00
Fernando Almeida 43624d6407 feat(helm-chart): revised emqx env ConfigMap to allow specifying settings also using the namespaced dot notation
feat(helm-chart): updated README to include description of previous change and fix value in WSS example
2022-01-25 23:43:35 +00:00
Fernando Almeida a24e765351 feat(helm-chart): added support for shared ingress annotations
feat(helm-chart): revised README to include image.tag setting
2022-01-25 23:43:35 +00:00
Fernando Almeida 6bb2fa666d feat(helm-chart): added explicit example for enable Websocket SSL. 2022-01-25 23:43:35 +00:00
Fernando Almeida 6a5dc485e2 feat(helm-chart): split configs into multiple files for readability
feat(helm-chart): added conditional volumes in StatefulSet
feat(helm-chart): revised checksum logic to include all config
2022-01-25 23:43:35 +00:00
Fernando Almeida ec902871cf feat(helm-chart): split ingress into separate files for readability
feat(helm-chart): fix ingress to allow custom user path as need (eg. mgmt)
feat(helm-chart): revised README to include missing contents
2022-01-25 23:43:35 +00:00
Zaiming (Stone) Shi 1fe91221ac docs: remove powershell from Windows build doc
Had trouble to make it work
2022-01-25 23:18:13 +01:00
Zaiming (Stone) Shi 16a5eb4493 Merge remote-tracking branch 'origin/main-v4.3' into merge-v4.3-to-v4.4 2022-01-25 22:29:01 +01:00
Zaiming (Stone) Shi 268b1ded50
Merge pull request #6857 from zmstone/ci-fix-base-version-match-pattern
ci: fix base version match pattern
2022-01-25 22:26:05 +01:00
Zaiming (Stone) Shi 95f950ae00 ci: fix relup base version match pattern 2022-01-25 19:04:55 +01:00
zhongwencool 27392bcf1e
Merge pull request #6846 from zhongwencool/sys-mem-alarm
fix: sys_mem alarm is not triggered after reboot.
2022-01-25 18:46:45 +08:00
tigercl 55751b5854
Merge pull request #6850 from DDDHuang/rename_mestics
fix(metrics): client metrics key name
2022-01-25 17:56:49 +08:00
DDDHuang 43e528b2ba fix(cli): emqx_auth_mnesia_cli function spec 2022-01-25 17:11:22 +08:00
DDDHuang 2eae1088ac fix(metrics): client metrics key name 2022-01-25 17:11:22 +08:00
lafirest 34dcd13097
Merge pull request #6851 from lafirest/fix/esockd_version
fix(emqx_limiter): update esockd version
2022-01-25 17:10:09 +08:00
lafirest 669552bd58 fix(emqx_limiter): update esockd version 2022-01-25 17:07:05 +08:00
zhongwencool 78f294cda2 fix: sys_mem alarm is not triggered after reboot. 2022-01-25 16:12:17 +08:00
tigercl 2eb12ada97
Merge pull request #6849 from JimMoen/update-dashboard
chore(dashboard): update dashboard version for v4.4.0
2022-01-25 14:47:49 +08:00
JimMoen cc7770be45 chore(dashboard): update dashboard version for v4.4.0 2022-01-25 14:06:09 +08:00
Shawn 1661c203e4
Merge pull request #6843 from terry-xiaoyu/rebar3_relup_otp24
fix(build): relup for otp24 failed
2022-01-25 11:37:30 +08:00
Shawn 362147924d fix(build): only use rebar3 3.18.0-emqx-1 for OTP 24 2022-01-25 11:02:39 +08:00
lafirest 7e012b7b90
Merge pull request #6844 from lafirest/fix/slow_subs_index
fix(emqx_slow_subs): fix index update error
2022-01-24 20:07:36 +08:00
lafirest 1f718fbb94 fix(emqx_slow_subs): fix index update error 2022-01-24 18:16:29 +08:00
Shawn d422e6e700 fix(build): relup for otp24 failed
The defination of `#application{}` record in systools.hrl is changed in OTP 24.
So we need a rebar3 binary compiled with OTP 24.
2022-01-24 18:04:40 +08:00
JianBo He 549e36c681
Merge pull request #6842 from JimMoen/update-dashboard
chore(dashboard): update dashboard version
2022-01-24 17:45:17 +08:00
JimMoen 0f1e85a8ad chore(dashboard): update dashboard version 2022-01-24 17:41:42 +08:00
lafirest 0fadc85c15
Merge pull request #6841 from lafirest/fix/slow_subs_qos2
fix(emqx_slow_subs): fix qos2 pattern matching error
2022-01-24 17:35:25 +08:00
JianBo He ceeeaf37e1
Merge pull request #6819 from HJianBo/merge-main-v4.3-into-v4.4
[Conflicts Resolved] Sync main-v4.3 into main-v4.4
2022-01-24 17:04:04 +08:00
lafirest 954e85bb73 fix(emqx_slow_subs): fix qos2 pattern matching error 2022-01-24 17:03:37 +08:00
JianBo He e5fab4df25 Merge remote-tracking branch 'ce/main-v4.3' into merge-main-v4.3-into-v4.4 2022-01-24 15:25:01 +08:00
JianBo He 680339ff14
Merge pull request #6840 from zhongwencool/auth-default-user-warnring
fix(auth_mnesia): don't force update default user.
2022-01-24 15:24:13 +08:00
JianBo He f1c8495db7 Merge remote-tracking branch 'ce/main-v4.3' into merge-main-v4.3-into-v4.4 2022-01-24 15:04:24 +08:00
zhongwencool efa3e32ee5 fix(auth_mnesia): don't force update default user. 2022-01-24 13:58:37 +08:00
JianBo He 7c31de7c55
Merge pull request #6839 from JimMoen/chore-mgmt-app-vsn
chore(app_vsn): revert management app.src repetitive increased
2022-01-24 12:08:52 +08:00
JianBo He 0dee156185
Merge pull request #6838 from EMQ-YangM/main-v4.3
fix(emqx_rule_engine_metrics): fix code_change vsn value
2022-01-24 11:39:33 +08:00
JimMoen 287b48d49a chore(app_vsn): revert management app.src repetitive increased 2022-01-24 11:38:25 +08:00
EMQ-YangM 03d240c59e fix(emqx_rule_engine_metrics): fix code_change vsn value 2022-01-24 11:14:31 +08:00
JianBo He e7b6ba509b Merge remote-tracking branch 'ce/main-v4.3' into merge-main-v4.3-into-v4.4 2022-01-24 09:29:20 +08:00
Zaiming (Stone) Shi fcb3ba6cc8
Merge pull request #6828 from JimMoen/fix-typo
ci: fix a typo in fvt_tests
2022-01-21 15:14:51 +01:00
JimMoen cb6f7cb496 ci: fix a typo in fvt_tests 2022-01-21 19:53:49 +08:00
JianBo He 3cf1fb2519
Merge pull request #6827 from lafirest/fix/slow_subs
fix(emqx_slow_subs): add default for stats_type
2022-01-21 17:19:00 +08:00
JianBo He b635d56aec Merge branch 'main-v4.3' into merge-main-v4.3-into-v4.4 2022-01-21 16:27:56 +08:00
firest 5ec3b6aef7 fix(emqx_slow_subs): add default for stats_type 2022-01-21 16:25:06 +08:00
JianBo He b19441df70
Merge pull request #6822 from HJianBo/more-fields-for-webhook
Ensure connected_at field for connect/connack/disconnected event
2022-01-21 16:09:04 +08:00
JianBo He 3b4ddd6f51 chore: bump emqx_modules vsn 2022-01-21 15:05:13 +08:00
JianBo He 8f517cebf7
Merge branch 'main-v4.3' into more-fields-for-webhook 2022-01-21 15:01:38 +08:00
JianBo He c5f9bfc305
Merge pull request #6811 from HJianBo/acl-metrics-fixes
refactor(metrics): more clear for acl metrics
2022-01-21 15:00:56 +08:00
JianBo He 4af01bb601
Merge pull request #6814 from zhongwencool/subscribe-api-meta
fix(api): sub api return meta
2022-01-21 14:57:21 +08:00
JianBo He 09002c4cd2 revert: revert #6797 due to the acl metrics refactor 2022-01-21 14:24:03 +08:00
JianBo He f86c1316e7 chore(auth): bump version & update appup.src 2022-01-21 14:24:03 +08:00
JianBo He f0a3b7754e refactor: remove the acl metrics for all auth plugins 2022-01-21 14:24:03 +08:00
JianBo He 14538e5f6d chore(emqx): update appup.src 2022-01-21 14:24:01 +08:00
JianBo He 77609ebd96 chore: bump vsn and update appup.src 2022-01-21 13:52:07 +08:00
JianBo He ad996afe47 chore: ensure connected_at field for connect/connack/disconnected event 2022-01-21 13:52:05 +08:00
JianBo He d535d44845 revert: revert #6797 due to the acl metrics refactor 2022-01-21 11:32:10 +08:00
JianBo He c56be7dcd7 refactor(metrics): more clear for acl metrics
For clarity in the meaning of metrics, we put `client.acl.allow`,
`client.acl.deny` into emqx_metrics and increased after a acl checking
returned.
2022-01-21 11:21:25 +08:00
zhongwencool 140a1c0276 chore(api): add api_sub http api test 2022-01-21 10:56:41 +08:00
JianBo He 508e50af63 Merge branch 'main-v4.3' into merge-main-v4.3-into-v4.4 2022-01-21 10:44:38 +08:00
zhongwencool f36791bab9 fix(api): sub api return meta 2022-01-20 18:40:25 +08:00
JianBo He 64a1466af5
Merge pull request #6810 from HJianBo/fix-slow-subs-appvsn
fix(plugin-lib): bump vsn to 4.4.1
2022-01-20 17:33:10 +08:00
JianBo He 461f856239 fix(plugin-lib): bump vsn to 4.4.1 2022-01-20 14:10:33 +08:00
zhongwencool 964a77510d
Merge pull request #6797 from zhongwencool/internal-acl-metrics
feat(acl): internal acl should support metrics[client.acl.ignore/allow/deny]
2022-01-20 10:36:59 +08:00
Shawn 668aa0ac12
Merge pull request #6800 from terry-xiaoyu/rule_empty_ids
fix(rule): deny POST rules or resources with empty ids
2022-01-19 19:58:54 +08:00
Shawn 2d00373e49 fix(appup): update appup file for emqx_rule_engine_api 2022-01-19 19:51:25 +08:00
zhongwencool 4317845482 fix(test): test case failed by unload 2022-01-19 19:48:07 +08:00
Shawn 70c6ac4e0d fix(rule): deny POST rules or resources with empty ids 2022-01-19 19:22:25 +08:00
zhongwencool 6378cd1f9a chore(version): bump emqx_modules to 4.3.4 2022-01-19 18:05:51 +08:00
lafirest 48b7cc34b6
Merge pull request #6792 from lafirest/fix/slow_subs_api
fix(emqx_slow_subs_api): return error when the module is not enable
2022-01-19 18:01:05 +08:00
zhongwencool e1274e1117 feat(acl): internal acl should support metrics(client.acl.ignore/allow/deny). 2022-01-19 18:00:54 +08:00
lafirest d02529b1d5 fix(emqx_slow_subs_api): fix test case error 2022-01-19 16:56:31 +08:00
lafirest 14636a745e fix(emqx_slow_subs_api): return error when the module is not enable 2022-01-19 16:11:11 +08:00
William Yang ab7d6def9d
Merge pull request #6782 from qzhuyan/backport/william/ci-macbuild-reduce-build-cache-size-4.3
ci(mac): cache otp install only
2022-01-19 09:01:15 +01:00
lafirest e82c73988b
Merge pull request #6790 from lafirest/fix/slow_subs
fix(emqx_slow_subs): add ClientInfo into the args of the delivery.com…
2022-01-19 15:54:44 +08:00
lafirest 46f86204c0 fix(emqx_slow_subs): add ClientInfo into the args of the delivery.completed hook 2022-01-19 14:02:30 +08:00
zhongwencool 3549d145a9
Merge pull request #6775 from zhongwencool/sync-from-4.3-to-4.4
Sync from 4.3 to 4.4
2022-01-19 12:48:32 +08:00
zhongwencool 50606a7eab fix(data_import): support v4.4 2022-01-19 11:55:39 +08:00
zhongwencool 24f8c353dc Merge branch 'main-v4.4' into sync-from-4.3-to-4.4 2022-01-19 11:24:57 +08:00
zhongwencool 30e07307e9
Merge pull request #6785 from zhongwencool/auth-acl-data-import
fix(auth_mnesia): import auth acls data according to different data format
2022-01-19 11:07:33 +08:00
lafirest ac7b73466d
Merge pull request #6685 from lafirest/refactor/slow_subs
refactor(emqx_slow_subs): refactor slow subs
2022-01-19 10:45:21 +08:00
zhongwencool 506be21aa2 fix(auth_mnesia): bump up emqx_mgmt to 4.3.10 2022-01-19 10:36:12 +08:00
lafirest 6414f7e55a fix(emqx_slow_subs): add compatibility for old code 2022-01-19 09:50:31 +08:00
lafirest 696acbfc5c fix(emqx_slow_subs): change on_publish_completed to on_delivery_completed 2022-01-19 09:50:31 +08:00
lafirest 0a85e71e09 fix(appup): add slow subs into appup file 2022-01-19 09:50:31 +08:00
lafirest 44fe882f14 refactor(emqx_slow_subs): refactor slow subs 2022-01-19 09:50:31 +08:00
lafirest 0486fb96be
Merge pull request #6778 from lafirest/fix/limiter
feat(emqx_limiter): add support for update overall limiter
2022-01-19 09:45:48 +08:00
DDDHuang 8901a85398
Merge pull request #6771 from DDDHuang/client_metrics
fix: client metrics count with qos
2022-01-19 09:27:30 +08:00
zhongwencool 19fc143f41 fix(auth_mnesia): import auth acls data according to different data format 2022-01-19 00:12:30 +08:00
William Yang 1170d9b3c3
Merge pull request #6781 from qzhuyan/backport/william/ci-macbuild-reduce-build-cache-size-4.4
ci(mac): cache otp install only
2022-01-18 11:51:48 +01:00
William Yang afa4c7d341 ci(mac): cache otp install only
only cache otp installation instead of the entire kerl dir to save cache spaces
2022-01-18 11:49:53 +01:00
DDDHuang 040d04c9fb fix(test): for paho qos3 2022-01-18 18:46:03 +08:00
William Yang deaea12aca ci(mac): cache otp install only
only cache otp installation instead of the entire kerl dir to save cache spaces
2022-01-18 11:19:32 +01:00
lafirest deada0ea44 chore(appup): update appup file and esockd version 2022-01-18 16:26:01 +08:00
lafirest eb003e3305 feat(emqx_limiter): add support for update overall limiter 2022-01-18 14:06:26 +08:00
Shawn 6aacdb7a20
Merge pull request #6768 from terry-xiaoyu/fix_make_relup_failed
fix(build): make emqx-zip failed on making relup file
2022-01-18 10:53:59 +08:00
DDDHuang 578199ad3a fix: client metrics count with qos 2022-01-18 10:38:06 +08:00
Shawn 1e3429986a fix(ci): download previous zip packages failed 2022-01-18 10:19:02 +08:00
Shawn f4c9738b99 fix(build): make emqx-zip failed on making relup file 2022-01-18 09:49:50 +08:00
DDDHuang 9385d9473d
Merge pull request #6764 from DDDHuang/client_metrics
feat: client metrics with message dropped & timeout
2022-01-17 17:52:05 +08:00
DDDHuang 6278951d57 fix: code style 2022-01-17 15:43:59 +08:00
DDDHuang 5397d80680 feat(metrics): session metrics & api format 2022-01-17 15:15:00 +08:00
DDDHuang 1ce77de080 feat(metrics): client metrics 2022-01-17 14:51:46 +08:00
Shawn 4178e0e34d
Merge pull request #6755 from terry-xiaoyu/copy-of-main-v4.3
Merge v4.3 to v4.4
2022-01-14 16:34:32 +08:00
Shawn 1daf2e4fc9
fix(appup): add emqx_alarm into appup file 2022-01-14 15:57:50 +08:00
Shawn 2da30465de fix(merge): solve conflicts when merge 4.4 to 4.3 2022-01-14 15:45:33 +08:00
zhongwencool 51e62468ed
Merge pull request #6717 from zhongwencool/auth-mnesia-default-import
fix(auth): force update default mqtt_user when password or hash_type changed.
2022-01-14 15:35:10 +08:00
zhongwencool 5481723513 chore(docs): update changes-4.3.md 2022-01-14 14:55:31 +08:00
zhongwencool 4ba43d3aea fix(auth): move log outside of transaction 2022-01-14 11:38:28 +08:00
Shawn cffbe46f0b
Merge pull request #6748 from terry-xiaoyu/fix_restore_action_metrics_in_cluster
fix(rule): restore the metrics for actions in cluster
2022-01-14 11:34:08 +08:00
zhongwencool 729ab6f60d
Merge branch 'main-v4.3' into auth-mnesia-default-import 2022-01-14 11:29:41 +08:00
zhongwencool ab18020eea
Merge pull request #6736 from zhongwencool/support-license-alarm-type
chore(alarm): support license alarm type
2022-01-14 11:19:48 +08:00
zhongwencool 9a17bcfcc9 chore(appup): update eqmx.appup.src 2022-01-14 11:03:27 +08:00
Shawn eec566fe40 fix(rule): restore the metrics for actions in cluster 2022-01-14 10:33:32 +08:00
Shawn 0af912f8a9
Merge pull request #6734 from terry-xiaoyu/hook_delivery_drop
New Hook: delivery drop
2022-01-14 09:39:32 +08:00
JianBo He bd9669c73f
Merge pull request #6735 from HJianBo/fix-app-vsn-sync
chore: fix the app vsn and appup.src
2022-01-14 09:13:57 +08:00
zhongwencool e96c9ada52 chore(test): fix typo error 2022-01-14 00:43:27 +08:00
zhongwencool 7c0d70cfde feat(license): license expriy early alarm. 2022-01-14 00:31:56 +08:00
Shawn 4abcab8d52 fix(appup): update appup files for emqx,emqx_sn,rule_engine 2022-01-13 18:37:22 +08:00
Zaiming (Stone) Shi dac0e824c8 build: fix package version regexp match pattern 2022-01-13 18:37:22 +08:00
JianBo He a46ea363f6 chore: rename CHANGES.md to CHANGES-4.3.md 2022-01-13 18:37:22 +08:00
Zaiming (Stone) Shi adbb067a91 ci: skip dialyzer race_condition checks
backported from 5.0
race_condition check is very RAM demanding
2022-01-13 18:37:22 +08:00
zhongwencool c6a571c207 chore(alarm): support license alarm type 2022-01-13 17:41:16 +08:00
JianBo He b3862fb283 chore: fix the app vsn and appup.src 2022-01-13 17:30:20 +08:00
JianBo He 0157ef830e
Merge pull request #6731 from HJianBo/main-v4.4-merged-main-v4.3
Sync main-v4.3 into main-v4.4
2022-01-13 16:55:06 +08:00
Shawn a63799742f fix(channel): update testcases for emqx_channel 2022-01-13 16:10:03 +08:00
JianBo He 0e118dd16d Merge remote-tracking branch 'ce/main-v4.3' into main-v4.4-merged-main-v4.3 2022-01-13 16:05:00 +08:00
Shawn a6408cee4f fix(session): update testcases for emqx_session 2022-01-13 15:28:18 +08:00
zhongwencool 27f5e765b5 fix(export): emqx_auth_mnesia import failed after 4.3.x 2022-01-13 13:53:37 +08:00
Shawn 9f7f5070b2 fix(channel): update the calls to emqx_session APIs 2022-01-13 13:33:27 +08:00
Zaiming (Stone) Shi 720c730baf
Merge pull request #6724 from zmstone/build-fix-version-regexp-pattern
build: fix package version regexp match pattern
2022-01-12 23:23:51 +01:00
Zaiming (Stone) Shi cfc3c076bb build: fix package version regexp match pattern 2022-01-12 21:50:50 +01:00
Zaiming (Stone) Shi 41ed507f63
Merge pull request #6719 from HJianBo/rename-changes.md
chore: rename CHANGES.md to CHANGES-4.3.md
2022-01-12 13:39:14 +01:00
Zaiming (Stone) Shi a29d04e919
Merge pull request #6720 from zmstone/ci-fix-test-script
ci: fix a typo in tests.sh
2022-01-12 13:38:50 +01:00
Zaiming (Stone) Shi 5fc3105afc
Merge pull request #6721 from zmstone/ci-skip-dialyzer-race-condition-check
ci: skip dialyzer race_condition checks
2022-01-12 13:38:33 +01:00
Shawn 217acc0154 feat(rule): add new event 'delivery_dropped' 2022-01-12 20:11:08 +08:00
zhongwencool 85d568be60 chore(test): clean up auth_mnesia_SUITE:t_boot config 2022-01-12 19:03:44 +08:00
Zaiming (Stone) Shi d7b0e753da ci: skip dialyzer race_condition checks
backported from 5.0
race_condition check is very RAM demanding
2022-01-12 11:57:02 +01:00
Zaiming (Stone) Shi 80eed7f2d7 ci: fix a typo in tests.sh
NOTE: this typo did not cause anything other than a false message
about a missing file.
2022-01-12 11:54:03 +01:00
JianBo He 6de114f822 chore: rename CHANGES.md to CHANGES-4.3.md 2022-01-12 18:49:18 +08:00
Zaiming (Stone) Shi 1733dd9d13
Merge pull request #6694 from HJianBo/main-v4.4-merged-main-v4.3
Sync main-v4.3 into main-v4.4
2022-01-12 11:44:56 +01:00
Shawn 9434c0fa6c feat(hook): new emqx hook 'delivery.dropped' 2022-01-12 18:34:20 +08:00
zhongwencool 88060c0f9b chore(auth): bump emqx_auth_mnesia version:4.3.5 2022-01-12 17:34:32 +08:00
zhongwencool 5521b7fa71 fix(auth): force update default mqtt_user when password or hashtype changed. 2022-01-12 17:26:27 +08:00
Shawn 449854fa11
Merge pull request #6647 from EMQ-YangM/main4.3
feat(rule_metrics): add more metrics to the rule engine
2022-01-12 14:52:46 +08:00
EMQ-YangM da8cd5d103 fix(rule_engine_metrics): fxi string:to_integer pattern match error 2022-01-11 22:09:38 -08:00
EMQ-YangM de58c8e7bc refactor(rule_engine_metrics): refactor code_change 2022-01-11 22:09:38 -08:00
EMQ-YangM 7605fa5e64 fix(rule_engine_metric): remove unused metrics 'overall_metrics' 2022-01-11 22:09:38 -08:00
JianBo He 492f4dceff Merge remote-tracking branch 'ce/main-v4.3' into main-v4.4-merged-main-v4.3 2022-01-12 13:59:07 +08:00
JianBo He c52db52cf8
Merge pull request #6709 from JimMoen/fix-mgmt-appup
chore(appup): app version updated after last tag
2022-01-12 11:18:20 +08:00
JianBo He ccd645b574
Merge pull request #6695 from HJianBo/fix-stomp-frame-tailed-byte
Fix stomp frame tailed byte
2022-01-12 11:17:00 +08:00
JimMoen 556a81a80e chore(appup): app version updated after last tag 2022-01-12 10:09:51 +08:00
JimMoen 92f1b5b01a
Merge pull request #6699 from JimMoen/fix-sub-info
fix(mgmt): fix subscription info format
2022-01-11 18:26:43 +08:00
JimMoen 47ba72729f chore(appup): update appup.src 2022-01-11 16:23:25 +08:00
JimMoen f2cfde7421 fix(mgmt): fix subscription info format 2022-01-11 15:54:37 +08:00
JianBo He 9efab7d5df chore(stomp): update appup & app.src 2022-01-11 14:49:40 +08:00
JianBo He 9aa178b51d fix(stomp): fix parsing rear frame split byte crash
fix: https://github.com/emqx/emqx/issues/6693
2022-01-11 14:49:20 +08:00
JianBo He 5424588a72 chore: remove unwanted appup commands that came with merge 2022-01-11 11:13:37 +08:00
JianBo He b297388c20 Merge branch 'main-v4.3' into merge-main-v4.3-into-v4.4 2022-01-11 10:03:28 +08:00
JimMoen 43442577ae
Merge pull request #6494 from JimMoen/fix-os-info
fix(telemetry): use required fields, rolling distro use PRETTY_NAME
2022-01-10 17:32:16 +08:00
JimMoen 2fba756aea chore(telemetry): update appup.src 2022-01-10 17:01:20 +08:00
JimMoen 5c29c20426 fix(telemetry): use required fields, rolling distro use PRETTY_NAME 2022-01-10 17:01:20 +08:00
Shawn 82c6eaa3aa
Merge branch 'main-v4.3' into main4.3 2022-01-10 12:31:12 +08:00
Shawn 2ee683d2f9
Merge pull request #6670 from terry-xiaoyu/restore_action_metrics
fix(rule): restore metrics for actions
2022-01-10 12:24:41 +08:00
EMQ-YangM 3956eaddd7 fix(rule_engine_metrics): add more rulge_engine version to emqx_rule_engine.appup.src 2022-01-09 19:27:49 -08:00
Shawn fbeba39f0d fix(rule): compare to null variables should return false 2022-01-06 20:36:01 +08:00
Shawn b7bcb37eab fix(rule): restore metrics for actions 2022-01-06 20:18:05 +08:00
EMQ-YangM be81c65eda feat(rule_engine_metics): add hot upgrade feat 2022-01-06 00:47:17 -08:00
EMQ-YangM 2074dd63f9 test(rule_engine_metrics): add more test 2022-01-05 21:11:52 -08:00
EMQ-YangM 1211c658fc fix(emqx_rule_engine): change vsn to 4.3.7 2022-01-05 19:18:16 -08:00
EMQ-YangM fae49ad228 fix(rule_engine_metrics): remove more space 2022-01-05 19:03:28 -08:00
EMQ-YangM d7a3ade200 fix(rule_engine_matrics): remove more space 2022-01-05 19:00:59 -08:00
EMQ-YangM 2608798826 fix(rule_engine_metrics): fix RuleID reference 2022-01-05 18:56:34 -08:00
EMQ-YangM c214af2ac0 fix(rule_engine_metics): centralized statistics exception 2022-01-05 18:51:28 -08:00
Zaiming (Stone) Shi 558db58b5d
Merge pull request #6643 from Rory-Z/ci/do-not-static-check-for-4.4
ci(static checks): do not run static check
2022-01-05 17:25:39 +01:00
Zaiming (Stone) Shi c761b1aa3c
Merge pull request #6644 from Rory-Z/ci/do-not-static-check-for-4.3
ci(static checks): do not run static check
2022-01-05 17:25:16 +01:00
JianBo He be12e179f5
Merge pull request #6639 from HJianBo/fix-client-fuzzy-matching
fix(mgmt): fix substring matching alg
2022-01-05 18:14:14 +08:00
EMQ-YangM e5993c9f72 refactor(rule_engine_metrics): remove function 'message()' 2022-01-05 02:08:40 -08:00
EMQ-YangM c2870b3322 test(rule_engint_metrics): add test for 'FOREACH' 2022-01-05 01:57:18 -08:00
EMQ-YangM 88913a9144 test(rule_engine_metrics): add test 't_metrics' 2022-01-05 01:20:53 -08:00
JianBo He d6f56cbcbe fix(mgmt): convert timestamp to milliseconds 2022-01-05 16:38:27 +08:00
JianBo He 9cf03bb18a fix(mgmt): fix substring matching alg 2022-01-05 16:38:22 +08:00
EMQ-YangM a5a8aa3b6d feat(rule_metrics): add more metrics to the rule engine 2022-01-05 00:20:06 -08:00
Rory Z a9f37f139d
Merge pull request #6638 from Rory-Z/ci/fix-push-error
ci(build_packages): only push emqx broker to aws ecr
2022-01-05 15:47:46 +08:00
zhanghongtong ced2a4a117 ci(static checks): do not run static check 2022-01-05 11:13:26 +08:00
zhanghongtong cf57b77f03 ci(static checks): do not run static check 2022-01-05 11:09:45 +08:00
Rory Z 6f74a6431c
Merge pull request #6625 from Rory-Z/chore/fix-spelling-errors-for-4.4
chore(helm): fix spell errors
2022-01-05 10:38:41 +08:00
Rory Z c672d8e7a4
Merge pull request #6627 from Rory-Z/chore/use-enterprise-dockerfile
ci(build_packages): if it's enterprise, use Dockerfile.enterprise
2022-01-05 10:37:23 +08:00
zhanghongtong 0b12a7e3a2 ci(build_packages): only push emqx broker to aws ecr 2022-01-05 10:12:27 +08:00
Zaiming (Stone) Shi 8f32361311
Merge pull request #6635 from zmstone/build-test-rpm-install-with-yum
ci: test rpm install with yum
2022-01-04 21:08:56 +01:00
Zaiming (Stone) Shi 03c8d35480 ci: test rpm install with yum 2022-01-04 17:40:00 +01:00
Rory Z 6b02d93b73
Merge pull request #6630 from emqx/ci/fix-its-error
ci(its): fix error
2022-01-04 22:04:34 +08:00
zhanghongtong 6a5c37dab7 ci(its): fix error 2022-01-04 21:03:46 +08:00
Rory Z afc0fcd0b6
Merge pull request #6628 from Rory-Z/chore/ignore-ldap-error
chore(cts): ignore ldap error
2022-01-04 18:21:56 +08:00
Rory Z ba7b93083e
Merge pull request #6614 from Rory-Z/chore/fix-spelling-errors
chore(helm): fix spell errors
2022-01-04 17:59:04 +08:00
zhanghongtong 387af5295c chore(cts): ignore ldap error 2022-01-04 17:56:58 +08:00
Rory Z 7cd80c25fa
Merge pull request #6620 from Rory-Z/chore/fix-docker-build-error
Chore/fix docker build error
2022-01-04 17:50:44 +08:00
Rory Z 7759d94d6b
Merge pull request #6524 from Rory-Z/ci/fix-upload-error
ci(build_packages): fix upload error for mac
2022-01-04 17:32:37 +08:00
zhanghongtong 8e88f8b9f9 ci(build_packages): if it's enterprise, use Dockerfile.enterprise
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2022-01-04 16:45:16 +08:00
zhanghongtong 514634e541 ci(build_packages): if it's enterprise, use Dockerfile.enterprise 2022-01-04 16:32:32 +08:00
zhanghongtong 93abd69db1 chore(helm): fix spell errors 2022-01-04 16:19:20 +08:00
zhanghongtong 6d0b6d2896 chore: delete needless docker.mk 2022-01-04 15:00:15 +08:00
zhanghongtong 1627ef78e7 ci(build_packages): update docker build
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2022-01-04 14:27:39 +08:00
Rory Z c4b6b4d55e
Merge pull request #6615 from Rory-Z/ci/update-bui
ci(build_packages): delete needless steps
2022-01-04 11:20:54 +08:00
zhanghongtong 90a2ebfb02 build(docker): update docker build 2022-01-04 11:16:35 +08:00
zhanghongtong 02d347d4ea ci(build_packages): delete needless steps 2022-01-04 10:49:00 +08:00
tigercl 38a46e1af3
Merge pull request #6519 from Rory-Z/ci/update-cts-4.3
ci(cts): use makefile target instead of the rebar command
2022-01-04 10:40:34 +08:00
zhanghongtong 9662eebae8 chore(helm): fix spell errors 2022-01-04 10:08:02 +08:00
Zaiming (Stone) Shi 9ab9a6ebad
Merge pull request #6596 from zmstone/ci-test-specific-package
build: ci tests.sh test specific package
2021-12-31 22:13:48 +01:00
Zaiming (Stone) Shi d69ba4b775 ci: refactor tests package test script
Check suffix directly, and fix indentation
2021-12-31 15:35:31 +01:00
Zaiming (Stone) Shi feecaa6c98 build: ci tests.sh test specific package 2021-12-31 15:35:31 +01:00
JimMoen bec742b1be
Merge pull request #6505 from JimMoen/v4.x-fix-node-info-format
fix(mgmt): fix node info format for specific node
2021-12-31 13:39:43 +08:00
tigercl b85ed8cc64
Merge pull request #6574 from zmstone/add-scripts-buildx
fix(bin/emqx): add boot wait time to 150 seconds
2021-12-30 09:32:39 +08:00
Zaiming (Stone) Shi bc79e136ff docs: update CHANGES-4.4 2021-12-30 01:00:56 +01:00
Zaiming (Stone) Shi 8f92d286e3 fix(bin/emqx): bump WAIT_FOR_ERLANG default to 150 seconds 2021-12-30 01:00:56 +01:00
Zaiming (Stone) Shi a21dade927 build: add scripts/buildx 2021-12-30 01:00:56 +01:00
k32 2240c3e790
Merge pull request #6573 from k32/fix-retainer-topic-printing
fix(retainer): Fix topic printing
2021-12-29 19:22:20 +01:00
k32 5addf91873 fix(retainer): Fix topic printing
Fixes: #6559
2021-12-29 18:27:47 +01:00
Thales Macedo Garitezi 5a6225d397
Merge pull request #6480 from emqx/improve-update-appup-43
chore(update_appup): Improve `update_appup.escript`
2021-12-28 09:54:52 -03:00
Zaiming (Stone) Shi 4a7b1bb7d8
Merge pull request #6551 from zmstone/fix-portable-shebang
fix: portable shebang
2021-12-28 11:04:22 +01:00
tigercl a7538ca7fb
Merge pull request #6546 from terry-xiaoyu/ci_emqx_start_failed
CI emqx start failed
2021-12-28 09:40:04 +08:00
Zaiming (Stone) Shi 967dc7d55e fix: portable shebang 2021-12-27 15:40:25 +01:00
Shawn 26c0f2c96e fix(CI): show outputs of erlang console if ./bin/emqx start failed 2021-12-27 17:26:54 +08:00
JianBo He 98b9eb9fe1
Merge pull request #6489 from HJianBo/fix-receive-maximum
fix: disconnect the client due to exceed receive-maximum packets
2021-12-23 14:02:59 +08:00
JianBo He 02dc216173 chore: update appup.src 2021-12-23 08:48:24 +08:00
JianBo He cb8a3725b4 fix: disconnect the client due to exceed receive-maximum packets
As described in the 5.0 specification, we should disconnect clients that
exceed the receive-maximum limit.

> If it receives more than Receive Maximum QoS 1 and QoS 2 PUBLISH packets
where it has not sent a PUBACK or PUBCOMP in response, **the Server uses a
DISCONNECT packet with Reason Code 0x9**

fix: #6447
2021-12-23 08:48:24 +08:00
zhanghongtong 499c1ab2f4 ci(build_packages): fix upload error for mac 2021-12-23 00:02:42 +08:00
tigercl f10e5d78e4
Merge pull request #6522 from Rory-Z/ci/delete-needless-steps
Ci/delete needless steps
2021-12-22 21:46:51 +08:00
zhanghongtong 1136b16281 ci(build_packages): fix docker tag error 2021-12-22 21:11:19 +08:00
zhanghongtong 67f4bba694 ci(build_packages): delete needless packages 2021-12-22 20:26:06 +08:00
tigercl 9b632c034f
Merge pull request #6516 from Rory-Z/ci/fix-env-error
ci(cts): fix env error
2021-12-22 16:52:23 +08:00
zhanghongtong 5fbd999ef8 ci(cts): fix env error 2021-12-22 16:48:42 +08:00
zhanghongtong a560174ad9 ci(cts): use makefile target instead of the rebar command 2021-12-22 16:46:58 +08:00
zhanghongtong 15f40889c6 ci(cts): fix env error 2021-12-22 16:01:58 +08:00
Shawn 1af13e10a9
Merge pull request #6514 from terry-xiaoyu/fix_ldap_ct
fix(test): revert the changes on ldap ct
2021-12-22 12:05:11 +08:00
Shawn e15eadde72 fix(test): revert the changes on ldap ct 2021-12-22 12:00:45 +08:00
tigercl 9179542816
Merge pull request #6511 from Rory-Z/ci/update-cts
ci(cts): fix spell error
2021-12-22 10:32:40 +08:00
zhanghongtong f5ec6b730c ci(cts): fix spell error 2021-12-22 10:22:56 +08:00
tigercl 15949f06ca
Merge pull request #6510 from Rory-Z/ci/update-cts
ci(cts): use makefile target instead of the rebar command
2021-12-22 10:06:37 +08:00
zhanghongtong c1480ab52c ci(cts): use makefile target instead of the rebar command 2021-12-22 09:40:09 +08:00
tigercl 8a54bb180a
Merge pull request #6504 from tigercl/chore/bump-release
chore(release): update emqx release version
2021-12-21 17:15:51 +08:00
zhouzb e768c601ab chore(release): update emqx release version 2021-12-21 17:05:22 +08:00
JimMoen 7e9870cc3f chore(mgmt): update appup.src 2021-12-21 01:12:17 -05:00
JimMoen 0ee589ca61 fix(mgmt): fix node info format for specific node 2021-12-21 01:07:01 -05:00
tigercl 9746bd3134
Merge pull request #6499 from tigercl/docs/changes-4.4
docs(change log): add change log for 4.4-beta.1
2021-12-21 13:47:47 +08:00
zhouzb c74dc11c92 docs(change log): add change log for 4.4-beta.1 2021-12-21 13:42:49 +08:00
Thales Macedo Garitezi 62ff6a8b30
chore(update_appup): rm unused value 2021-12-20 13:41:14 -03:00
Thales Macedo Garitezi b2396438a0
chore(update_appup): add expected versions check
For apps inside emqx umbrella, we try to bump only the patch part of
their version numbers, and use only 3-part version
numbers (`Major.Minor.Patch`).  With those assumptions, we may infer
all versions that need to be covered in a given upgrade, and check if
those are covered in regexes.
2021-12-20 13:38:08 -03:00
Thales Macedo Garitezi ce4a193cbb
chore(update_appup): rm unused fn 2021-12-20 13:21:01 -03:00
Thales Macedo Garitezi af3a1326d1
chore(update_appup): bugfix: variable not pinned in lambda 2021-12-20 13:21:01 -03:00
JianBo He b972c2aec1
Merge pull request #6490 from terry-xiaoyu/update_vsn 2021-12-20 22:10:02 +08:00
tigercl 1743c5e8b0
Merge pull request #6488 from terry-xiaoyu/ekka_vsn
update versions of some app
2021-12-20 18:16:52 +08:00
Shawn 23e4e101a4 chore(dashboard): bump lib-ce/emqx_dashboard to 4.3.8 2021-12-20 15:42:16 +08:00
Shawn 799aabdd04 chore(emqx): bump emqx to 4.4.0 2021-12-20 15:12:09 +08:00
Shawn 22814dc161 chore(coap): update gen_coap to v0.4.2 2021-12-20 15:07:29 +08:00
Shawn 88e7c40423 chore(ekka): update ekka vsn to 0.8.1.7 2021-12-20 14:19:45 +08:00
tigercl 2966f4a09b
Merge pull request #6487 from Rory-Z/ci/fix-update-error
ci(release): only push emqx broker image to aws ecr
2021-12-20 10:58:10 +08:00
zhanghongtong f78be5a4be ci(release): only push emqx broker image to aws ecr 2021-12-20 10:25:23 +08:00
Thales Macedo Garitezi fef8a18bfb
chore(update_appup): insert `load_module`s after `application:stop`
If there is already any `application:stop(Application)` call in the
appup instructions, we prefer to add `load_module` instructions after
it, so we can be sure that the load is replaced safely.
2021-12-17 16:53:56 -03:00
Thales Macedo Garitezi 42ca5ab5a9
chore(update_appup): do not force appup render if contents are the same
To avoid losing comments and/or manual indentation in appup files that
are already up to date, we now check whether the contents have the
exact same terms as those we are about to write to an existint .appup
file.
2021-12-17 16:53:56 -03:00
Thales Macedo Garitezi e1e72c144a
chore(update_appup): do not use load_module if restart_application
Since the appup instruction `restart_application` already loads all
modules of a given application, there is no need to introduce those
instructions if a restart is already present.
2021-12-17 16:53:56 -03:00
Thales Macedo Garitezi 3ff6661a58
chore(update_appup): take regexes into account when comparing vsns
This change makes the `update_appup.escript` check whether the new
version of an application (the _current_ one) is already contained in
entries in the _new_ .appup file for that application if such .appup
file contains regexes.

NOTE: this does not cover the case in which we calculate the
difference between _old_ and _new_ appup entries, and those consist of
regexes.  In such case, we would need to check if one regex is
"contained" in the other, which is not currently supported by this
patch.
2021-12-17 16:53:55 -03:00
Zaiming (Stone) Shi ccca1f53fa chore: add details about ekka fix 2021-12-17 19:51:09 +01:00
Zaiming (Stone) Shi 5066be2385
Merge pull request #6477 from zmstone/fix-changes.md-typos
chore: fix CHANGES.md typos
2021-12-17 16:43:00 +01:00
Zaiming (Stone) Shi caa6134e3b chore: fix CHANGES.md typos 2021-12-17 16:42:37 +01:00
tigercl fcca7f84f3
Merge pull request #6476 from zmstone/chore-introduce-CHANGE.md
chore: add CHANGE.md
2021-12-17 23:34:46 +08:00
Zaiming (Stone) Shi 83734612a2 chore: add CHANGE.md 2021-12-17 16:18:23 +01:00
tigercl e443225af6
Merge pull request #6475 from zmstone/fix-emqx-appup
fix(appup): add missing beams to emqx.appup.src
2021-12-17 21:03:46 +08:00
tigercl e756eb99fb
Merge pull request #6474 from tigercl/chore/vsns
chore(vsn): bump ehttpc and ekka version
2021-12-17 20:49:18 +08:00
Zaiming (Stone) Shi c1cbf39552 fix(appup): add missing beams to emqx.appup.src
also re-formated emqx_sn.appup.src
2021-12-17 13:41:25 +01:00
zhouzb dc9631514d chore: ensure version bump for dashboard app 2021-12-17 20:28:54 +08:00
zhouzb 49bfabc4dc chore(vsn): bump ehttpc and ekka version 2021-12-17 19:41:41 +08:00
tigercl de7d510552
Merge pull request #6421 from Rory-Z/chore/bump-otp-version
ci: bump otp version to 24.1.5-3
2021-12-17 18:16:03 +08:00
Shawn 66e848b771 fix(code_port): improve node stop wait loop 2021-12-17 17:42:55 +08:00
tigercl a585536a3b
Merge pull request #6468 from emqx/main-v4.3
Sync v4.3 to v4.4
2021-12-17 13:37:55 +08:00
tigercl 865d999e39
Merge pull request #6466 from emqx/improve_pgsql
chore(autotest): Improve pgsql script and change file path in emqx-fvt warehouse
2021-12-17 11:24:18 +08:00
xiangfangyang-tech 2da7f91c42 chore(autotest): improve jmeter installation mode 2021-12-17 10:50:58 +08:00
xiangfangyang-tech 0e9b608737 chore(autotest): improve pgsql script and change file path in emqx-fvt warehouse 2021-12-17 10:33:33 +08:00
tigercl 462c6efa5a
Merge pull request #6454 from terry-xiaoyu/user_property
fix(rules): add SQL test examples for user properties
2021-12-17 09:19:09 +08:00
Shawn a1a9d002e3 fix(rules): add SQL test examples for user properties 2021-12-16 17:13:34 +08:00
zhongwencool 4af36ed744
Merge pull request #6448 from zhongwencool/log-trace-clientid-utf8
fix: trace not work if clientid is utf8
2021-12-15 15:59:41 +08:00
zhongwencool b592565363 fix: trace not work if client is utf8 2021-12-15 09:53:46 +08:00
zhanghongtong baf8d7d91c ci: bump otp version to 24.1.5-3 2021-12-14 10:45:08 +08:00
zhongwencool b4f9fe90be
Merge pull request #6442 from zhongwencool/v4.4-modules-appup
chore: clean up emqx_modules's appup.src for 4.4.0
2021-12-14 10:24:29 +08:00
zhongwencool ce3006c916 chore: clean up emqx_modules's appup.src for 4.4.0 2021-12-14 10:12:05 +08:00
zhongwencool d362d10d30
Merge pull request #6437 from HJianBo/update_coap_lwm2m_deps
chore: upgrade coap&lwm2m tag for otp24
2021-12-13 22:32:13 +08:00
zhongwencool d50282dba6
Merge pull request #6434 from tigercl/chore/crypto
chore(otp): be compatibility with crypto in otp 24
2021-12-13 22:31:07 +08:00
tigercl afc068a219
Merge pull request #6439 from terry-xiaoyu/otp_24_warnings_ssl
OTP 24 warnings ssl
2021-12-13 21:48:11 +08:00
Shawn e9b8fc8606 fix(OTP): OTP 24 warnings for ssl:ssh_accept/1,2 2021-12-13 20:10:02 +08:00
JimMoen 61eb0e443c
Merge pull request #6438 from JimMoen/sync-from-v4.3 2021-12-13 19:35:38 +08:00
JimMoen d76159d543 Merge remote-tracking branch 'emqx/main-v4.3' into sync-from-v4.3 2021-12-13 18:46:23 +08:00
JianBo He 396d328a70 chore: upgrade coap&lwm2m tag for otp24 2021-12-13 18:29:12 +08:00
zhouzb 9d14604935 chore: bump versions of jwt and pgsql authn to 4.4.0 2021-12-13 16:23:09 +08:00
zhouzb a93c63f168 chore(otp): be compatibility with crypto in otp 24 2021-12-13 16:04:15 +08:00
zhongwencool 5eb4b6c173
Merge pull request #6423 from zhongwencool/fix-create-trace-failed
fix(trace): create trace validate type and filter more strictly
2021-12-11 16:36:25 +08:00
zhongwencool e59c5cc3f3 fix(trace): create trace validate type and filter more strictly 2021-12-11 15:26:15 +08:00
Ilya Averyanov 38aa3d637e
Merge pull request #6425 from savonarola/ranch-compat-4.4
[4.4] fix(wss): update cowboy & ranch for OTP24 compatibility
2021-12-10 23:25:52 +03:00
Ilya Averyanov c410571ee2 fix(wss): update cowboy & ranch for OTP24 compatibility 2021-12-10 20:39:25 +03:00
JimMoen 812d123453
Merge pull request #6416 from JimMoen/log-for-proxy-protocol
feat(frame): better log for proxy_protocol config disabled
2021-12-10 18:37:49 +08:00
JimMoen 24060285c5 chore(appup): update appup.src 2021-12-10 18:08:47 +08:00
JimMoen bad314ae08 chore(gitignore): update gitignore 2021-12-10 18:08:47 +08:00
JimMoen 3ecc79e1bc test(frame): test packet proxy_protocol config disabled 2021-12-10 18:08:47 +08:00
JimMoen b9acf94fd7 feat(frame): better log for proxy_protocol config disabled 2021-12-10 18:08:47 +08:00
tigercl f1c707e4de
Merge pull request #6368 from Spycsh/main-v4.3
chore: fix main-v4.3 support for networking.k8s.io/v1
2021-12-10 18:07:11 +08:00
tigercl 9f90837b39
Merge pull request #6419 from emqx/sync-from-v4.3
Sync from v4.3
2021-12-10 17:59:13 +08:00
JimMoen 9a43125c9b
Merge pull request #6420 from JimMoen/revert-topic-level-default-conf
revert(emqx_conf): zone.external.max_topic_levels
2021-12-10 09:43:14 +08:00
Spycsh 5c497975a6 chore: fix main-v4.3 support for networking.k8s.io/v1 2021-12-09 21:41:55 +01:00
tigercl 832700b0ff
Merge pull request #6418 from tigercl/chore/webhook-appup
chore(webhook): update appup
2021-12-09 20:27:01 +08:00
JimMoen db8131d2a5 revert(emqx_conf): zone.external.max_topic_levels
revert part of changes in 289415b5aa
2021-12-09 20:13:40 +08:00
zhongwencool f3fffb6156
Merge pull request #6417 from zhongwencool/fix-sn-appup-file
fix(emqx_sn): appup.src miss 4.3.2
2021-12-09 18:54:33 +08:00
tigercl 2ed5e01054
Merge branch 'main-v4.4' into sync-from-v4.3 2021-12-09 18:49:38 +08:00
zhouzb b6ffacc062 chore(appup): fix appup for webhook 2021-12-09 18:46:13 +08:00
zhouzb aa04df4d1b chore(webhook): update appup 2021-12-09 18:40:45 +08:00
zhongwencool 7477615324 fix(emqx_sn): appup.src miss 4.3.2 2021-12-09 17:26:57 +08:00
Zaiming (Stone) Shi a81f2ce315
Merge pull request #6414 from tigercl/chore/ehttpc-vsn
perf(http): bump ehttpc version
2021-12-09 09:38:30 +01:00
tigercl 42cfc6c5e6
Merge pull request #6272 from Rory-Z/ci/add-push-ecr-for-4.4
ci: add new steps for push ecr image when release
2021-12-09 16:05:17 +08:00
William Yang f72002949b
Merge pull request #6403 from qzhuyan/backport/william/4.3/systemd-restart-on-failure
Backport/william/4.3/systemd restart on failure
2021-12-09 08:38:39 +01:00
zhouzb 63a6ac2f5f perf(http): bump ehttpc version 2021-12-09 15:26:41 +08:00
Thales Macedo Garitezi d2b2a4ea99
Merge pull request #6404 from emqx/bugfix-live-chan-count
fix(live_conn): fix live connection count on race condition

When multiple clients try to connect concurrently using the same
client ID, they all call `emqx_channel:ensure_connected`, increasing
the live connection count, but only one will successfully acquire the
lock for that client ID.  This means that all other clients that
increased the live connection count will not get to call neither
`emqx_channel:ensure_disconnected` nor be monitored for `DOWN`
messages, effectively causing a count leak.

By moving the increment to `emqx_cm:register_channel`, which is only
called inside the lock, we can remove this leakage.

Also, during the handling of `DOWN` messages, we now iterate over all
channel PIDs returned by `eqmx_misc:drain_down`, since it could be
that one or more PIDs are not contained in the `pmon` state.
2021-12-08 15:10:24 -03:00
Thales Macedo Garitezi d435f1211e
fix(live_conn): fix live connection count on race condition
When multiple clients try to connect concurrently using the same
client ID, they all call `emqx_channel:ensure_connected`, increasing
the live connection count, but only one will successfully acquire the
lock for that client ID.  This means that all other clients that
increased the live connection count will not get to call neither
`emqx_channel:ensure_disconnected` nor be monitored for `DOWN`
messages, effectively causing a count leak.

By moving the increment to `emqx_cm:register_channel`, which is only
called inside the lock, we can remove this leakage.

Also, during the handling of `DOWN` messages, we now iterate over all
channel PIDs returned by `eqmx_misc:drain_down`, since it could be
that one or more PIDs are not contained in the `pmon` state.
2021-12-08 10:33:57 -03:00
Tobias Lindahl 756a256137
Merge pull request #6396 from emqx/fix-takeover-race-on-enqueued-messages-v4.3 2021-12-08 11:01:25 +01:00
Zaiming (Stone) Shi c2cc3c78f1
Merge pull request #6395 from zhongwencool/sync-from-4.3
Sync from 4.3
2021-12-08 10:57:55 +01:00
Rory Z cdc70d8ccc
Merge pull request #6271 from Rory-Z/ci/add-push-ecr-for-4.3
ci: add new steps for push ecr image when release
2021-12-08 17:30:44 +08:00
Rory Z 29a9bbe5d5
Merge pull request #6386 from Rory-Z/chore/helm-support-cluster-discovery-by-dns
chore(helm): support cluster discovery by dns
2021-12-08 17:30:18 +08:00
lafirest 99989ecca6
Merge pull request #6400 from lafirest/fix/emqx_slow_subs
fix(emqx_slow_subs): fix threshold related bugs
2021-12-08 15:54:29 +08:00
lafirest e651becd99 fix(emqx_slow_subs): fix threshold related bugs
1. limit the interval between calling hooks
2. improve the code of update threshold
2021-12-08 15:05:39 +08:00
tigercl a92712e429
Merge pull request #6399 from tigercl/fix/webhook-path
fix(webhook): fix the issue that the path field does not support rule engine variables
2021-12-08 14:22:51 +08:00
zhouzb 83981e7c87 fix(webhook): fix the issue that the path field does not support rule engine variables 2021-12-08 11:27:58 +08:00
William Yang ac5307a3a5
Merge pull request #6389 from qzhuyan/backport/william/4.3/systemd-restart-on-failure
Backport/william/4.3/systemd restart on failure
2021-12-07 19:54:43 +01:00
zhongwencool 2c2145dfe6 Merge branch 'main-v4.3' into sync-from-4.3 2021-12-07 23:20:01 +08:00
Tobias Lindahl 2348e612fa fix(emqx_channel): fix race condition in session takeover
Sessions must not enqueue messages when another process is taking over
the client id, since it already passed on the message queue in the
session state.

Without this fix, messages arriving after `{takeover, 'begin'} to a
channel with no connection (i.e., a persistent session) would be lost.
2021-12-07 16:05:49 +01:00
zhongwencool 9965288947
Merge pull request #6391 from zhongwencool/trace-bug-fix
fix: trace handler start time not correct
2021-12-07 22:58:55 +08:00
William Yang bcbb0822cf build(deb): fix postrm for checking systemd 2021-12-07 13:30:08 +01:00
zhongwencool be6160f5bd fix: trace handler start time not correct 2021-12-07 20:24:56 +08:00
William Yang 55893dbf5c ci(deb): remove systemV test 2021-12-07 12:49:40 +01:00
William Yang 517aa39542 build(deb): deb pkg enable/disable emqx system 2021-12-07 12:48:51 +01:00
William Yang be8284666a build(deb): remove System V init 2021-12-07 12:43:07 +01:00
William Yang 16e39ffee7 build: rpm and deb use the same systemd service file 2021-12-07 12:42:59 +01:00
William Yang 79f1b8651a build(deb): drop systemV init 2021-12-07 12:42:49 +01:00
William Yang 51f1a48983 fix(systemd-start): /usr/bin/emqx is bash not sh 2021-12-07 12:42:44 +01:00
William Yang eba8c08853 fix(systemd): add restart on failure 2021-12-07 12:42:32 +01:00
JimMoen 72a7f353c6
Merge pull request #6379 from JimMoen/v4.3/fix-vm-mem-info
fix(vm): memory info calc and display
2021-12-07 17:54:39 +08:00
zhanghongtong e7c765aaa3 chore(helm): support cluster discovery by dns 2021-12-07 16:23:19 +08:00
JimMoen dc2c17826e chore(appup): update appup.src 2021-12-07 14:23:40 +08:00
JimMoen 14aa408b5e style: make elvis happy 2021-12-07 14:17:33 +08:00
JimMoen c5e28bd32b fix(vm): add literal_alloc memory calculation 2021-12-07 14:17:33 +08:00
JimMoen ceed9678e3 fix(mgmt): node memory usage info 2021-12-07 14:17:33 +08:00
zhongwencool 26fa06b071
Merge pull request #6380 from zhongwencool/v4.4-trace-bug-fix
fix: trace_name format [A-Za-z0-9-_];retry if trace_file not find
2021-12-07 09:25:13 +08:00
Thales Macedo Garitezi 462955e6bc
Merge pull request #6381 from emqx/bump-ekka-0-8-1-6-v43
chore(ekka): bump ekka to 0.8.1.6

We're doing this to remove some missing change warnings when updating
emqx v4.3.10.  Ekka's appup was updated in emqx/ekka#140 .

<details>
<summary> `update_appup.escript` output after update (running against 4.3.10) </summary>

```
Found the previous appup file: _build/emqx/rel/emqx/lib/ekka-0.8.1.6/ebin/ekka.appup
INFO: Application 'ekka' has been updated: "0.8.1.4" -> "0.8.1.6"
... elided ...
ERROR: Appup file for the external dependency 'ehttpc' is not complete.
       Missing changes: #{down =>
                              [{"0.1.10",
                                [{load_module,ehttpc_pool,brutal_purge,soft_purge,[]},
                                 {load_module,ehttpc,brutal_purge,soft_purge,[]}]},
                               {<<"0\\.1\\.0">>,
                                [{load_module,ehttpc_pool,brutal_purge,soft_purge,[]},
                                 {load_module,ehttpc,brutal_purge,soft_purge,[]}]},
                               {<<"0\\.1\\.[1-7]">>,
                                [{load_module,ehttpc_pool,brutal_purge,soft_purge,[]},
                                 {load_module,ehttpc,brutal_purge,soft_purge,[]}]}],
                          up =>
                              [{"0.1.10",
                                [{load_module,ehttpc_pool,brutal_purge,soft_purge,[]},
                                 {load_module,ehttpc,brutal_purge,soft_purge,[]}]},
                               {<<"0\\.1\\.[0-7]">>,
                                [{load_module,ehttpc_pool,brutal_purge,soft_purge,[]},
                                 {load_module,ehttpc,brutal_purge,soft_purge,[]}]}]}
NOTE: Some changes above might be already covered by regexes.

ERROR: Incomplete appups found. Please inspect the output for more details.
```

</details>
2021-12-06 13:18:03 -03:00
zhongwencool d4dd4a124c fix: trace_name format [A-Za-z0-9-_];waiting status if create time to closed" 2021-12-06 20:51:42 +08:00
Thales Macedo Garitezi 3d308cf5a2
chore(ekka): bump ekka to 0.8.1.6
We're doing this to remove some missing change warnings when updating
emqx v4.3.10.  Ekka's appup was updated in emqx/ekka#140 .
2021-12-06 09:21:13 -03:00
lafirest acb63eeb7c
Merge pull request #6366 from lafirest/feat/dynamic_threshold
feat(emqx_slow_subs): add dyanamic threshold
2021-12-06 17:42:08 +08:00
lafirest 3f49e3186c fix(emqx_slow_subs): add default threshold macro 2021-12-06 17:22:36 +08:00
lafirest 48f8c735ea feat(emqx_slow_subs): add dyanamic threshold 2021-12-03 18:11:07 +08:00
zhongwencool fb1bfcac8e
Merge pull request #6363 from zhongwencool/v4.4-trace-api-crash
fix: trace len > 1 return 500
2021-12-03 11:31:53 +08:00
zhongwencool 28e76e498c fix: trace len > 1 return 500 2021-12-03 10:24:36 +08:00
zhongwencool 9f7db2eacb
Merge pull request #6357 from zhongwencool/4.3-sn-registry
fix: e4.4.0 failed to join e4.3.0 cluster
2021-12-03 09:32:46 +08:00
Zaiming (Stone) Shi f7d6cc12ce
Merge pull request #6358 from HJianBo/change_terminate_log_level_to_debug
chore(conn): change terminated print to debug level
2021-12-02 13:10:58 +01:00
JianBo He ef6f867304 chore(conn): change terminated print to debug level 2021-12-02 18:01:36 +08:00
zhongwencool f14a9d7da6 chore: bump emqx_sn to 4.3.4 2021-12-02 16:46:57 +08:00
zhongwencool 41a547d36d fix: e4.4.0 failed to join e4.3.0 cluster 2021-12-02 16:19:36 +08:00
JianBo He fdacb9040d
Merge pull request #6343 from HJianBo/drop-empty-retain-msg
[4.3][Retainer] Allow to stop publish clear message
2021-12-02 11:16:30 +08:00
Shawn 0cec0cff95
Merge pull request #6323 from terry-xiaoyu/stop_ecpool_failed_v4.3
chore(appup): bump ecpool to 0.5.2
2021-12-01 18:37:21 +08:00
Shawn 0d1b194906
Merge pull request #6286 from terry-xiaoyu/mqtt_bridge_hangs
MQTT bridge hangs with an unreachable IP
2021-12-01 18:33:42 +08:00
JianBo He 10ffe11ba0 chore(retainer): update appup.src 2021-12-01 17:11:40 +08:00
JianBo He e323b66285 test(retainer): testcase for stop_publish_clear_msg 2021-12-01 17:11:40 +08:00
JianBo He 8aaa2e8333 feat(retainer): add option to stop publish clear message 2021-12-01 17:11:38 +08:00
zhongwencool 20a98bee62
Merge pull request #6324 from zhongwencool/create-trace-schema-runtime
fix: create trace schema at runtime
2021-11-30 09:12:48 +08:00
Thales Macedo Garitezi c16d5e4bb5
Merge pull request #6307 from emqx/update-appup-ext-deps-diff
chore(appup): make update_appup.escript output only differences for external dependencies

Currently, the update_appup.escript outputs as an error the full appup
file for external dependencies, even if all the changes are already
contained in the depency.  Here, we make it only output the missing
actions to be inserted, to aid in seeing what are the differences.

<details>
<summary> Output before: </summary>

```
ERROR: Appup file for the external dependency 'ekka' is not complete.
       Missing changes: [{"0.8.1.4",
                          [{load_module,ekka_cluster_dns,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_node_monitor,brutal_purge,
                               soft_purge,[]}]},
                         {"0.8.1.3",
                          [{load_module,ekka_node_monitor,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_autocluster,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_autoheal,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_locker,brutal_purge,soft_purge,
                               []},
                           {load_module,ekka_cluster_dns,brutal_purge,
                               soft_purge,[]}]},
                         {"0.8.1.2",
                          [{load_module,ekka_ring,brutal_purge,soft_purge,[]},
                           {load_module,ekka_cluster_dns,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_node_monitor,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_autocluster,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_autoheal,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_locker,brutal_purge,soft_purge,
                               []},
                           {load_module,ekka_httpc,brutal_purge,soft_purge,
                               []}]},
                         {"0.8.1.1",
                          [{load_module,ekka_cluster_dns,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_ring,brutal_purge,soft_purge,[]},
                           {load_module,ekka_node_monitor,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_httpc,brutal_purge,soft_purge,[]},
                           {load_module,ekka_autocluster,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_autoheal,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_locker,brutal_purge,soft_purge,
                               []}]},
                         {"0.8.1",
                          [{load_module,ekka_cluster_dns,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_ring,brutal_purge,soft_purge,[]},
                           {load_module,ekka_node_monitor,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_autocluster,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_autoheal,brutal_purge,
                               soft_purge,[]},
                           {load_module,ekka_locker,brutal_purge,soft_purge,
                               []},
                           {load_module,ekka_httpc,brutal_purge,soft_purge,[]},
                           {load_module,ekka_mnesia,brutal_purge,soft_purge,
                               []}]}]
ERROR: Appup file for the external dependency 'ehttpc' is not complete.
       Missing changes: [{"0.1.10",
                          [{load_module,ehttpc_pool,brutal_purge,soft_purge,
                               []},
                           {load_module,ehttpc,brutal_purge,soft_purge,[]}]},
                         {<<"0\\.1\\.[0-7]">>,
                          [{load_module,ehttpc_pool,brutal_purge,soft_purge,
                               []},
                           {load_module,ehttpc,brutal_purge,soft_purge,[]},
                           {update,ehttpc,{advanced,[]}}]},
                         {<<"0\\.1\\.([8-9]|(1[0-1]))">>,
                          [{load_module,ehttpc,brutal_purge,soft_purge,[]},
                           {load_module,ehttpc_pool,brutal_purge,soft_purge,
                               []}]},
                         {<<".*">>,[]}]
```

</details>


<details>
<summary> Output after: </summary>

```
ERROR: Appup file for the external dependency 'ekka' is not complete.
       Missing changes: #{down =>
                              [{"0.8.1.4",
                                [{load_module,ekka_cluster_dns,brutal_purge,soft_purge,[]}]}],
                          up => []}
NOTE: Some changes above might be already covered by regexes.ERROR: Appup file for the external dependency 'ehttpc' is not complete.
       Missing changes: #{down =>
                              [{"0.1.10",
                                [{load_module,ehttpc_pool,brutal_purge,soft_purge,[]},
                                 {load_module,ehttpc,brutal_purge,soft_purge,[]}]},
                               {<<"0\\.1\\.0">>,
                                [{load_module,ehttpc_pool,brutal_purge,soft_purge,[]},
                                 {load_module,ehttpc,brutal_purge,soft_purge,[]}]},
                               {<<"0\\.1\\.[1-7]">>,
                                [{load_module,ehttpc_pool,brutal_purge,soft_purge,[]},
                                 {load_module,ehttpc,brutal_purge,soft_purge,[]}]}],
                          up =>
                              [{"0.1.10",
                                [{load_module,ehttpc_pool,brutal_purge,soft_purge,[]},
                                 {load_module,ehttpc,brutal_purge,soft_purge,[]}]},
                               {<<"0\\.1\\.[0-7]">>,
                                [{load_module,ehttpc_pool,brutal_purge,soft_purge,[]},
                                 {load_module,ehttpc,brutal_purge,soft_purge,[]}]}]}
NOTE: Some changes above might be already covered by regexes.
ERROR: Incomplete appups found. Please inspect the output for more details.
```

</details>
2021-11-29 16:38:53 -03:00
zhongwencool 0d218df14d fix: replace ct:sleep/1 by filesync/2 2021-11-29 23:08:56 +08:00
zhongwencool 1b14b79286 fix: create trace schema at runtime 2021-11-29 22:15:31 +08:00
Thales Macedo Garitezi 93caddd448
refactor(review): factor out common functionality 2021-11-29 10:23:54 -03:00
tigercl 25215244be
Merge pull request #6192 from turtleDeng/publish-api-user-properties
feat(publish-api): Publish api support user-properties parameters
2021-11-29 15:00:04 +08:00
Shawn 6eb919ea66 chore(appup): bump ecpool to 0.5.2 2021-11-29 14:20:57 +08:00
lafirest 8dd4d88d5b
fix(emx_slow_updates): fix the error of topk update (#6312) 2021-11-26 14:57:25 +08:00
lafirest fef3fc27cb
refactor(emqx_slow_subs): refactor use moving average (#6287)
* refactor(emqx_slow_subs): refactor use moving average

* fix(emqx_slow_subs): change elapsed to latency, and fix some error

* fix(emqx_slow_subs): fix emqx_mgmt_api.erl indent

* fix(emqx_slow_subs): change api name

* fix(emqx_slow_subs): fix and improve some code

* fix(emqx_slow_subs): move clienid filed from latency_stats to session
2021-11-26 10:42:15 +08:00
Thales Macedo Garitezi 2e93ec0f3d
Merge pull request #6290 from emqx/sys-mon-more-info-43
feat(sys_mon): Add proc_lib:initial_call/1 and current_stacktrace (4.3)

(Same as #6289 )

This adds the information from `proc_lib:initial_call/1` and the
current stacktrace from the process info to `emqx_sys_mon:procinfo/1`
to aid in debugging some warnings with no context such as the
following:

```
2021-11-23T12:33:59.387818+00:00 [warning] info: [{old_heap_block_size,45988046},{heap_block_size,22177879},{mbuf_size,0},{stack_size,40},{old_heap_size,22354134},{heap_size,7106339}], line: 130, mfa: emqx_sys_mon:handle_info/2, msg: large_heap, procinfo: [{pid,<0.2667.0>},{memory,579763664},{total_heap_size,68510672},{heap_size,22177879},{stack_size,40},{min_heap_size,233},{initial_call,{proc_lib,init_p,5}},{current_function,{gen,do_call,4}},{registered_name,[]},{status,running},{message_queue_len,360945},{group_leader,<0.1660.0>},{priority,normal},{trap_exit,false},{reductions,16493271},{last_calls,false},{catchlevel,4},{trace,0},{suspending,[]},{sequential_trace_token,[]},{error_handler,error_handler}]
```
2021-11-25 17:06:16 -03:00
Thales Macedo Garitezi 0932920d36
chore(appup): make update_appup.escript output only differences for
external dependencies

Currently, the update_appup.escript outputs as an error the full appup
file for external dependencies, even if all the changes are already
contained in the depency.  Here, we make it only output the missing
actions to be inserted, to aid in seeing what are the differences.
2021-11-25 15:21:25 -03:00
Thales Macedo Garitezi 5c693beadd
chore(appup): remove `load_module` instructions if `restart_application`
> the restart_application instruction will be translated into module
load instructions by otp release handler.
2021-11-25 12:08:02 -03:00
Thales Macedo Garitezi 64ce2eea1c
chore(appup): run ./scripts/update_appup.escript to bump vsns 2021-11-25 12:08:02 -03:00
Thales Macedo Garitezi 0260db6640
feat(sys_mon): Add proc_lib:initial_call/1 and current_stacktrace (4.3)
(Same as #6289 )

This adds the information from `proc_lib:initial_call/1` and the
current stacktrace from the process info to `emqx_sys_mon:procinfo/1`
to aid in debugging some warnings with no context such as the
following:

```
2021-11-23T12:33:59.387818+00:00 [warning] info: [{old_heap_block_size,45988046},{heap_block_size,22177879},{mbuf_size,0},{stack_size,40},{old_heap_size,22354134},{heap_size,7106339}], line: 130, mfa: emqx_sys_mon:handle_info/2, msg: large_heap, procinfo: [{pid,<0.2667.0>},{memory,579763664},{total_heap_size,68510672},{heap_size,22177879},{stack_size,40},{min_heap_size,233},{initial_call,{proc_lib,init_p,5}},{current_function,{gen,do_call,4}},{registered_name,[]},{status,running},{message_queue_len,360945},{group_leader,<0.1660.0>},{priority,normal},{trap_exit,false},{reductions,16493271},{last_calls,false},{catchlevel,4},{trace,0},{suspending,[]},{sequential_trace_token,[]},{error_handler,error_handler}]
```
2021-11-25 12:08:02 -03:00
JimMoen 18a9c0e177
fix:change default configuration of `max_topic_levels` #6294 2021-11-25 16:16:54 +08:00
JimMoen 289415b5aa fix(conf): change `max_topic_levels` default configuration 2021-11-25 09:52:12 +08:00
Shawn f5ac6fb714 chore(appup): bump emqx_bridge_mqtt to 4.3.3 2021-11-25 09:46:06 +08:00
Thales Macedo Garitezi 15b71c118b
Merge pull request #6291 from emqx/fix-update-appup-script
chore(appup): minor fixes to update_appup.escript

- Fixes clause error on `create_stub/1`.
- Small optimization: do not download the same file multiple times
  with `wget`.
- Fix: remove old file extension (`.app.src`) and preserve dirname 
  when creating stubs for apps.
2021-11-24 17:10:00 -03:00
Thales Macedo Garitezi 29f982385d
chore(appup): remove old file extension and preserve dirname for apps 2021-11-24 15:09:25 -03:00
Thales Macedo Garitezi c950566294
chore(appup): minor fixes to update_appup.escript
- Fixes clause error on `create_stub/1`.
- Small optimization: do not download the same file multiple times
  with `wget`.
2021-11-24 14:22:51 -03:00
Shawn 3b9bb1d66c fix(ecpool): update ecpool to 0.5.2 2021-11-24 18:57:23 +08:00
Shawn a54668e83b fix(mqtt_bridge): the mqtt bridge hangs with an unreachable IP 2021-11-24 17:11:04 +08:00
Zaiming Shi 39e52d583e Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2021-11-23 23:18:43 +01:00
Zaiming (Stone) Shi 2e26b8dfed
Merge pull request #6246 from zmstone/upgrade-otp-to-23.2.7.2-emqx-3
build: upgrade to otp sed 23.2.7.2-emqx-3
2021-11-23 21:38:19 +01:00
Zaiming Shi c4b0008ebd build: delete arch suffix from alpine build-env image tag 2021-11-23 17:06:46 +01:00
zhanghongtong b87ed0666c ci: add new steps for push ecr image when release 2021-11-23 17:54:17 +08:00
zhanghongtong 5a3169b83a ci: add new steps for push ecr image when release 2021-11-23 17:36:27 +08:00
Zaiming (Stone) Shi afd55b31e8
build: define default builder docker image tag (#6245)
prior to this change, the OTP_VSN varaible was taken from
the docker host's OTP version which may differ from the
desired OTP version for the docker builder image.
2021-11-23 09:34:56 +08:00
Zaiming (Stone) Shi 2514f474b0
Sync v4.3 to v4.4 (#6262)
* fix(http): fix duplicate http headers

* chore(appup): add appup.src

* fix(appup): fix multiply defined module in appup

* chore(appup): fix wrong version

* chore(ekka): Bump version to 0.8.1.5

* fix(update_appup): Fix warnings, add support for external repos

* build: use find command's -delete option

* ci: do not sync master branch

* build: ensure openssl11

* build: copy only libcrypto and libtinfo

* fix(trace): handler_id now always return atom

Co-authored-by: zhouzb <zhouzb@emqx.io>
Co-authored-by: k32 <10274441+k32@users.noreply.github.com>
2021-11-23 09:33:20 +08:00
Zaiming (Stone) Shi b6064ce2c0
Merge pull request #6259 from zmstone/build-do-not-pack-glibc
build: copy only libcrypto and libtinfo
2021-11-22 17:20:20 +01:00
Zaiming (Stone) Shi 95e8671c7f
Merge pull request #6261 from zmstone/chore-trace-try-to-use-original-name
refactor(trace): hash non-printable or too long names
2021-11-22 17:16:48 +01:00
Zaiming Shi 0f52824872 refactor(trace): hash non-printable or too long names 2021-11-22 16:59:17 +01:00
Zaiming (Stone) Shi 1c64a9d95d
Merge pull request #6251 from zhongwencool/log-trace-api
feat: add support ip_address trace options
2021-11-22 16:19:53 +01:00
Zaiming Shi 122842a656 build: copy only libcrypto and libtinfo 2021-11-22 15:46:19 +01:00
zhongwencool 30fb9dd7ae fix: name must be printable unicode and len < 256 2021-11-22 22:20:02 +08:00
zhongwencool a91f975dc2
fix: make sure keepalive only 0~65535 (#6232) 2021-11-22 18:08:48 +08:00
zhongwencool d76275d17d feat: add support ip_address trace options 2021-11-22 15:20:24 +08:00
Turtle 62dc72c859 feat(sql_rule): test rule add User-Property information 2021-11-22 11:04:21 +08:00
lafirest 4767b41eb7
fix(emqx_st_statistics): fix initial value error (#6224)
* fix(emqx_st_statistics): fix initial value error
2021-11-21 18:55:43 +08:00
Zaiming Shi 1cb6cdbd76 build: upgrade to otp sed 23.2.7.2-emqx-3
There was a typo fix in ssl app for ecdsa_secp512r1_sha512
to ecdsa_secp521r1_sha512.

Hot-beam upgrade is supported when upgrading from OTP 23.2.7.2-emqx-2
just a 'ssl_cipher' module reload.
2021-11-20 23:28:12 +01:00
Zaiming (Stone) Shi efcdcc555f
Merge pull request #6239 from zmstone/build-ensure-openssl11
build: ensure openssl11
2021-11-20 17:12:07 +01:00
Zaiming (Stone) Shi 7de0891201
Merge pull request #6243 from emqx/ci-port-changes-from-master-branch
ci: port changes made in master branch
2021-11-20 17:11:42 +01:00
Zaiming Shi 099e2a8752 ci: port changes made in master branch 2021-11-19 23:03:06 +01:00
Zaiming (Stone) Shi ef41361753
Merge pull request #6233 from zmstone/ci-do-not-sync-master-branch
ci: do not sync master branch
2021-11-19 13:46:11 +01:00
Zaiming Shi 0b3037a571 build: ensure openssl11 2021-11-19 12:39:59 +01:00
Zaiming Shi f1aaed9276 ci: do not sync master branch 2021-11-19 08:46:53 +01:00
tigercl 35e32acf4a
Merge pull request #6195 from tigercl/fix/multi-http-headers
fix(http): fix duplicate http headers
2021-11-19 11:32:43 +08:00
Zaiming (Stone) Shi 747c609ec8
Merge pull request #6214 from zmstone/build-delete-potentially-broken-symlinks
build: ensure symlinks in _build dir are deleted after fetching deps
2021-11-18 13:35:00 +01:00
k32 df8fe88ac8
Merge pull request #6225 from k32/update-appup-ekka
fix(update_appup): Fix warnings, add support for external repos
2021-11-18 13:32:25 +01:00
Zaiming Shi ef36774189 build: use find command's -delete option 2021-11-18 13:20:53 +01:00
k32 113cfa6422 fix(update_appup): Fix warnings, add support for external repos 2021-11-18 12:31:02 +01:00
k32 b45296680d
Merge pull request #6221 from k32/ekka
chore(ekka): Bump version to 0.8.1.5
2021-11-18 12:28:31 +01:00
k32 5dc2e04e55 chore(ekka): Bump version to 0.8.1.5 2021-11-18 10:24:03 +01:00
zhanghongtong daeac6edf4 chore(release): update emqx release version 2021-11-18 15:26:36 +08:00
zhanghongtong d1cf526f34 ci: fix permission error when check sha256 2021-11-18 14:45:00 +08:00
lafirest 42333882c8
fix(emqx_st_statistics): fix unsafe rank range (#6207)
* fix(emqx_st_statistics): fix unsafe rank range
2021-11-18 14:41:59 +08:00
zhouzb b460172649 chore(appup): fix wrong version 2021-11-18 14:39:46 +08:00
zhanghongtong 093a93a7ec ci: fix not found package when check sha256 2021-11-18 14:27:37 +08:00
zhanghongtong eb0f4a543d ci: fix upload artifact error 2021-11-18 10:35:03 +08:00
Rory Z e5ffe8d7d5
Merge pull request #6216 from emqx/sync-v4.3-to-v4.4
Sync v4.3 to v4.4
2021-11-18 09:37:58 +08:00
Zaiming Shi c07f32f1ce Merge branch 'build-delete-potentially-broken-symlinks' into sync-v4.3-to-v4.4 2021-11-18 00:23:40 +01:00
Zaiming Shi cd4923d5b2 Merge remote-tracking branch 'origin/main-v4.3' into sync-v4.3-to-v4.4 2021-11-18 00:23:32 +01:00
Zaiming Shi 5db4607815 build: ensure symlinks in _build dir are deleted after fetching deps
In CI, the source code is downloaded with make deps-all
zipped and uploaded as an GitHub action artifact to be
downloaded in later steps to build packages

The symlinks are abs paths, meaning it might be broken
when unziped (inside docker containers)

This fix adds a `make clean` step after the deps-all target
and the `clean` target also removes rebar.lock and symlinks
2021-11-17 23:27:10 +01:00
William Yang a0fb78a38d
Merge pull request #6209 from qzhuyan/backport/william/4.3/node_dump-log-dir 2021-11-17 21:36:11 +01:00
Zaiming Shi 2a55a712d1 build: prepare for 4.4-alpha.1 release 2021-11-17 13:58:09 +01:00
William Yang 59656b3c3a fix: source emqx_vars in node_dump tool 2021-11-17 13:19:05 +01:00
William Yang 4f0d86dd57 fix(node_dump): locate log dir for package installation 2021-11-17 13:18:59 +01:00
Zaiming (Stone) Shi 14eea4647b
Merge pull request #6198 from Rory-Z/ci/cancel-otp-vsn-for-docker
ci: cancel otp vsn for docker image tag
2021-11-17 11:07:48 +01:00
Zaiming (Stone) Shi f30e21b4d6
Merge pull request #6188 from zmstone/feat-add-flexible-docker-build
feat(docker): add flexible docker build
2021-11-17 09:24:14 +01:00
Zaiming Shi 35164951e2 feat(docker): add flexible docker build
The defulat docker build (e.g. make emqx-docker) is based on alpine
image and it builds EMQ X from source code.
This is not flexible enough when we want to quickly run some tests
in a docker container.

The new docker build (e.g. make emqx-docker-testing) by default takes
the built zip package, and extract it in a very primitive base image
such as ubuntu:20.04 and centos:8
2021-11-17 08:31:35 +01:00
zhanghongtong 834240a760 ci: cancel otp vsn for docker image tag
add otp vsn for docker labels
2021-11-17 15:30:44 +08:00
zhouzb 3b25df9b47 fix(appup): fix multiply defined module in appup 2021-11-17 15:18:16 +08:00
zhanghongtong af5f93d81a build: show macos version 2021-11-17 14:43:03 +08:00
zhanghongtong 45965a3e71 ci: update emqx-ci-helper version 2021-11-17 14:43:03 +08:00
Zaiming (Stone) Shi 739703ea01
Merge pull request #6186 from zmstone/build-fix-rpm-release-scheme
build: Move otp version number to RPM's release part
2021-11-17 07:42:37 +01:00
zhouzb f948eb927d chore(appup): add appup.src 2021-11-17 14:31:37 +08:00
zhouzb 5e3fe6714e fix(http): fix duplicate http headers 2021-11-17 14:14:12 +08:00
Turtle ca1ece3db0 feat(publish-api): Publish api supports user-properties parameters 2021-11-17 11:17:10 +08:00
tigercl f335edaf6a
Merge pull request #6170 from tigercl/feat/mongo-migration
feat(migration): improve modules migration and add test cases
2021-11-17 09:42:09 +08:00
Zaiming Shi a070708e8d build: Move otp version number to RPM's release part 2021-11-16 19:14:15 +01:00
Zaiming (Stone) Shi 8b0478e663
Merge pull request #6184 from zmstone/chore-parameterise-docker-file
build: parameterise path to Dockerfile
2021-11-16 16:46:09 +01:00
Zaiming Shi ced2429011 fix: bump new feature lib-ce apps to 4.4 2021-11-16 16:08:36 +01:00
Zaiming Shi 4d9854012e build: parameterise path to Dockerfile 2021-11-16 16:08:36 +01:00
Rory Z addf0de4be
Merge pull request #6152 from Rory-Z/chore/rename-packages-name
Chore/rename packages name
2021-11-16 19:17:56 +08:00
Zaiming Shi db802ad04f chore: update toos-versions to pin 23.3.4.9-3 2021-11-16 11:35:13 +01:00
Zaiming Shi 49f164788b Merge remote-tracking branch 'rory/chore/rename-packages-name' into chore/rename-packages-name 2021-11-16 11:35:01 +01:00
zhanghongtong 284d122372 ci: pin otp version to 23.3.4.9-3 and builder version to 4.4-2 2021-11-16 18:33:21 +08:00
zhanghongtong 39c564c072 ci: rename windows packae 2021-11-16 17:56:33 +08:00
zhanghongtong 2251159c4f build: pin otp version to 23.3.4.9-3 and builder version to 4.4-2 2021-11-16 17:56:33 +08:00
Zaiming Shi 88efc6612d Merge remote-tracking branch 'origin/main-v4.4' into chore/rename-packages-name 2021-11-16 09:47:13 +01:00
Zaiming Shi 2dc63cffea fix(emqx_misc): call gen_tcp to decide if ipv6_probe is supported 2021-11-16 08:37:53 +01:00
Zaiming Shi e34055b6ef chore: pin OTP-23.2.7.2-emqx-3 2021-11-16 06:21:12 +01:00
zhanghongtong a178b6cc08 ci: fix make docker error for github action 2021-11-16 11:31:50 +08:00
Zaiming Shi 755dd11b07 build: always pull image before build 2021-11-16 01:28:42 +01:00
Zaiming Shi 3f1fc64a98 build: fix source rpm package name 2021-11-16 01:10:52 +01:00
Zaiming Shi c97c6aefc9 build: rename zip package and rpm deb packages 2021-11-16 00:59:28 +01:00
Zaiming Shi b68f01e7e7 build: do not print 'otp' prefix for otp version 2021-11-15 23:42:19 +01:00
Zaiming Shi d350281270 build: pin ghcr.io/emqx/emqx-builder/4.4-1:23.3.4.9-2-ubuntu20.04 2021-11-15 23:33:23 +01:00
Zaiming Shi f711f78c5c build: pin otp version 23.3.4.9-2 2021-11-15 23:17:21 +01:00
Zaiming Shi a6032d5435 build: update default otp versions 2021-11-15 23:04:31 +01:00
Zaiming (Stone) Shi c36ffc7ccb
Merge pull request #6174 from zmstone/main-v4.4-alpha.1
sync v4.3 to v4.4
2021-11-15 21:32:40 +01:00
Zaiming (Stone) Shi 684e51a865
Merge branch 'main-v4.4' into main-v4.4-alpha.1 2021-11-15 20:11:42 +01:00
Zaiming Shi ca1458d4d7 chore(emqx_rule_engine): bump app vsn to 4.4.0 2021-11-15 15:34:48 +01:00
k32 25f6633aaa
Merge pull request #6169 from k32/gen-rpc-ssl-4
feat(rpc): Bump gen_rpc version
2021-11-15 14:29:52 +01:00
k32 32086f97ec
Merge branch 'main-v4.4' into gen-rpc-ssl-4 2021-11-15 13:47:54 +01:00
Zaiming Shi d05e2ff0b1 Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4-alpha.1 2021-11-15 13:41:51 +01:00
zhouzb 2f279b3607 test(migration): fix code scope 2021-11-15 18:14:51 +08:00
zhouzb fce93c5a17 feat(migration): improve modules migration and add test cases 2021-11-15 17:44:23 +08:00
zhongwencool 96d2615cc8
fix: return error code when trace log not foundd (#6168) 2021-11-15 17:41:22 +08:00
k32 61c68ddb35 feat(rpc): Bump gen_rpc version 2021-11-15 10:27:08 +01:00
Zaiming (Stone) Shi 7dc944a154
Merge pull request #6160 from zmstone/chore-check-version-before-build
build: ensure git tag matches release version
2021-11-15 09:07:37 +01:00
zhongwencool 23e2bd62c5
fix: there should not be multiple layers of directories when download trace zip file (#6165) 2021-11-15 15:53:49 +08:00
zhanghongtong cace53a02b build: update docker build 2021-11-15 14:33:23 +08:00
tigercl 8c119ea6d9
Merge pull request #6149 from Rory-Z/main-v4.4
chore(cluster): add new type for dns auto cluster
2021-11-15 13:48:19 +08:00
tigercl 276db400c2
Merge pull request #6150 from tigercl/feat/mongo-srv
feat(mongo srv): support srv for mongodb authentication
2021-11-15 11:25:17 +08:00
zhongwencool 6bd5fd218e
chore: limit/page to position/bytes (#6161) 2021-11-15 11:02:45 +08:00
lafirest 0357f7ad85
improve(emqx_st_statistics): optimize the parameters of on_publish_done (#6151)
* fix(emqx_st_statistics): optimize the parameters of on_publish_done
2021-11-15 11:00:04 +08:00
lafirest 87a2667e35
fix(emqx_retainer): fix timer message error (#6156)
* fix(emqx_retainer): fix timer message error
2021-11-15 10:57:59 +08:00
zhanghongtong f46084438b chore(cluster): add new type for dns auto cluster
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-11-15 10:46:52 +08:00
zhanghongtong 7e91a47be8 ci: update workflows 2021-11-15 10:45:27 +08:00
zhanghongtong 454f609aa6 build: emqx package name scheme include otp version 2021-11-15 10:45:27 +08:00
zhouzb cb18538957 fix(mong srv): fix wrong configuration 2021-11-15 10:27:56 +08:00
zhouzb 25f504c90a feat(mongo srv): support srv for mongodb authentication 2021-11-15 10:26:38 +08:00
Shawn d305111929
Merge pull request #6076 from HJianBo/enhance-message-hook
feat(exhook): expose headers for on_messages_publish hook
2021-11-15 10:23:16 +08:00
JianBo He f7bdd6defe chore(lwm2m): fix bad appup.src 2021-11-15 09:50:32 +08:00
JianBo He 08cf0326b3 chore(exhook): bump version to 4.4.0 2021-11-15 09:50:32 +08:00
JianBo He 6b40048d29 chore: put the pool_size default value to avoid hot upgrade failure 2021-11-15 09:50:32 +08:00
JianBo He 2be33b33e3 chore: fix elvis warnings 2021-11-15 09:50:32 +08:00
JianBo He f194ae65d2 chore: update appup.src 2021-11-15 09:50:32 +08:00
JianBo He 8dfc8ed96b chore: fill message headers 2021-11-15 09:50:32 +08:00
JianBo He 7d06e48b4b chore: remove needless catch
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2021-11-15 09:50:32 +08:00
JianBo He f2d99017a0 chore(exhook): update appup.src 2021-11-15 09:50:32 +08:00
JianBo He 641f36514f chore: fix elvis warnings 2021-11-15 09:50:32 +08:00
JianBo He 5922521e49 test(props): cover messages headers 2021-11-15 09:50:32 +08:00
JianBo He 44008b9a6d chore: fix compiling warnings 2021-11-15 09:50:32 +08:00
JianBo He c170d076e3 feat(exhook): expose process pool_size for grpc client 2021-11-15 09:50:32 +08:00
JianBo He b756e7d17a chore: upgrade grpc to 0.6.4 2021-11-15 09:50:32 +08:00
JianBo He 012c741592 chore(exhook): update appup.src 2021-11-15 09:50:32 +08:00
JianBo He ef2a5c1dc7 chore(exhook): fix diaylzer warnings 2021-11-15 09:50:32 +08:00
JianBo He 6fb3ff1f9f feat(exhook): expose headers for on_messages_publish hook 2021-11-15 09:50:32 +08:00
Zaiming Shi 0971567cff build: ensure git tag matches release version 2021-11-14 18:23:30 +01:00
lafirest ad4d3fc652
chore(emqx_retainer): refresh the timestamp when dispatch retained message (#6155)
1. refresh the timestamp when dispatch retained message
2. fix some elvis style error
2021-11-12 21:26:44 +08:00
zhongwencool 8bf6668e4c
Set keepalive via http api (#6143)
* feat: set keepalive over http api

* chore: elvis warning

* fix: bump retainer to 4.4.0
2021-11-12 20:11:59 +08:00
Zaiming (Stone) Shi 5f8d9db64b
Merge pull request #6142 from HJianBo/put-message-headers
Fill the message headers
2021-11-12 12:51:48 +01:00
JianBo He 54bb3ddaf2
Merge branch 'main-v4.3' into put-message-headers 2021-11-12 19:25:39 +08:00
Zaiming Shi d512c474be Merge tag 'v4.3.10' into main-v4.3 2021-11-12 11:52:54 +01:00
Zaiming (Stone) Shi 5412cf4c78
Merge pull request #6154 from lafirest/fix/revert_refresh_retained
Revert "fix(emqx_retainer): refresh the timestamp when dispatch retai…
2021-11-12 11:38:38 +01:00
firest e9ce8e7586 fix(emqx_retainer): revert the "refresh the timestamp when dispatch retained message"
This reverts commit 66d0c44e36.
2021-11-12 18:36:26 +08:00
zhongwencool f3de1bdb77
fix: make sure enable boolean() (#6147) 2021-11-12 15:48:30 +08:00
JianBo He d8f37be210 chore(lwm2m): fix bad appup.src 2021-11-12 15:38:49 +08:00
lafirest 66d0c44e36
fix(emqx_retainer): refresh the timestamp when dispatch retained message (#6148) 2021-11-12 14:51:02 +08:00
Shawn e7bbe98a7a fix(ekka): update ekka to 0.8.2 2021-11-12 14:48:58 +08:00
lafirest a4a7cac647
fix(eqmx_st_statistics): add ignore_before_create in config (#6140)
1. allows not to process the message before the session is created
to solve the problem caused by clean session = false
2. fix some elvis errors
2021-11-12 14:00:48 +08:00
tigercl 0003b05247
Merge pull request #6138 from emqx/chore/release
chore(release): update version to 4.3.10
2021-11-12 11:34:45 +08:00
JianBo He 8e4c2c88c3 chore: use PROTO_VER marco 2021-11-12 10:45:26 +08:00
JianBo He 439fb3a403 chore: fix elvis warnings 2021-11-12 10:43:21 +08:00
JianBo He 0c5cb1b9ac chore: update appup.src 2021-11-12 10:43:21 +08:00
JianBo He 4c29c3a5e5 chore: fill message headers 2021-11-12 10:43:21 +08:00
zhouzb 04a4462f1e chore(release): update version to 4.3.10 2021-11-12 10:36:27 +08:00
zhongwencool 7193cd4275
feat(trace): move common trace module to plugin_libs (#6127)
* feat(trace): move common mod to plugin_libs

* fix: elvis warning
2021-11-12 07:33:36 +08:00
lafirest 9d4f2916c2
refactor(emqx_st_statistics): optimize the code directory structure (#6128) 2021-11-11 23:49:54 +08:00
JianBo He edb2793180
Merge pull request #6126 from zmstone/test-fix-flaky-emqx-cm-test
Test fix flaky emqx cm test
2021-11-11 18:20:48 +08:00
Zaiming (Stone) Shi 1d20a8b720
Merge pull request #6116 from zmstone/4.3-chore-ehttpc-pin-0.1.12
chore(ehttpc): pin 0.1.12
2021-11-11 10:47:01 +01:00
Zaiming Shi 21898e1daf chore(emqx_dashboard): bump version after v4.3.10 release 2021-11-11 10:34:29 +01:00
Zaiming Shi 74b6b5214a test(emqx_cm_SUITE): add a gen_server call sync 2021-11-11 10:33:31 +01:00
zhongwencool 835ad52498
feat(trace): http api for trace (#6052)
* feat(trace): add http trace API

* feat: sub/unsub trace topic

* chore(trace): stream log use _page and _limit

* fix: elvis warning

* fix: mod_trace test failed

* fix: http api meta rename _page/_limit to _page/_limit

* fix: clientid string not working

* fix: add emqx_mod_trace to module

* fix(trace): fixed by review suggestions
2021-11-11 14:54:40 +08:00
JianBo He cc7b1aa93e
Merge pull request #6121 from HJianBo/ensure-start-listeners-before-plugin
Ensure starting listeners before plugins loading
2021-11-11 14:52:15 +08:00
JianBo He 86b8d88165 chore(emqx): update appup.src 2021-11-11 11:55:57 +08:00
JianBo He 8f07f26744 fix: ensure starting listeners before plugins 2021-11-11 11:37:54 +08:00
lafirest 1dd18aa07a
fix(emqx_st_statistics): change emqx_st_statistics implementation fro… (#6115)
* fix(emqx_st_statistics): change emqx_st_statistics implementation from plugin to module
2021-11-11 10:16:06 +08:00
Zaiming Shi 98136ff119 chore(ehttpc): pin 0.1.12 2021-11-10 14:41:37 +01:00
zhongwencool 06a1b37992
fix(test): flaky mqtt expiry test case. (#6111) 2021-11-10 15:41:31 +08:00
zhongwencool fa34d8353e
fix(test): flaky mqtt expiry test case. (#6112) 2021-11-10 15:40:46 +08:00
JianBo He a81140fd00
Merge pull request #6110 from HJianBo/force-clear-stomp-listener
fix(emqx_stomp): fix hot-upgrade stopping listener failed
2021-11-10 11:43:51 +08:00
Shawn 133609a040 fix(relup): configs for plugins are missing after relup 2021-11-10 11:10:23 +08:00
lafirest fae815b35c
Feat/slow topic api (#6101)
* feat(emqx_st_statistics): add api
2021-11-10 11:08:06 +08:00
Shawn 388c29344a fix(relup): configs for plugins are missing after relup 2021-11-10 10:25:02 +08:00
JianBo He fefadbcd17 fix(emqx_stomp): fix hot-upgrade stopping listener failed
When the upgrade is executed, all envs of plugins are cleared,
which causes the listener of stomp to stop failing.

This is only a temporary modification to ensure that the upgrade
can be executed successfully.

following fixes: https://github.com/emqx/emqx/pull/6105
2021-11-10 10:02:37 +08:00
lafirest f60f92b95d
Merge pull request #6074 from lafirest/improve/slow_topic
improve(emqx_st_statistics): optimize the implementation of topk
2021-11-09 13:46:44 +08:00
lafirest 354b0bc08e refactor(emqx_st_statistics): optimize the implementation of topk 2021-11-09 11:51:10 +08:00
Shawn 77c82cf189 fix(code_style): some elvis complaints 2021-11-09 10:30:29 +08:00
Shawn 2242bb9376 fix(rule): force max speed to 2 decimal digits of precision 2021-11-09 10:30:29 +08:00
Shawn 00ba4d32f3 fix(syntax): allow single quotes in the FROM clause 2021-11-09 09:31:58 +08:00
JianBo He 00ae24fd6a
Merge pull request #6097 from zmstone/chore-bump-pkg-vsn-to-4.4.0
chore: bump release version to 4.4.0
2021-11-09 09:22:12 +08:00
Zaiming Shi 9ea5c5e58d fix(emqx_mgmt): support v4.4 data export 2021-11-08 23:12:18 +01:00
Zaiming Shi fec83590a6 chore: bump release version to 4.4.0 2021-11-08 21:38:18 +01:00
Zaiming (Stone) Shi 70bc5f21e4
Merge pull request #6095 from zmstone/sync-v4.3-to-v4.4
Sync v4.3 to v4.4
2021-11-08 21:07:10 +01:00
Zaiming Shi 6222e1b0eb Merge remote-tracking branch 'origin/main-v4.3' into sync-v4.3-to-v4.4 2021-11-08 21:01:14 +01:00
Thales Macedo Garitezi 14474a2739
Merge pull request #6056 from emqx/feat-truly-connected-client-count
Track connected client count

In order to correctly display the number of _connected_ clients in our monitor dashboard, we need to track those connections that are actually connected to clients, not considering connections from persistent sessions that are disconnected. Today, the `connections.count` that is displayed in the dashboards considers those disconnected persistent sessions as well.

The new statistics can be found in the [`emqx_management`](https://github.com/emqx/emqx/tree/main-v4.4/apps/emqx_management) plugin, under `/api/v4/stats`, in the keys `live_connections.{max,count}`.
2021-11-08 15:46:49 -03:00
Thales Macedo Garitezi b9270ad719
feat(stats): track live / connected channel count for monitoring
In order to correctly display the number of connected clients in our
monitor dashboard, we need to track those connections that are
actually connected to clients, not considering connections from
persistent sessions that are disconnected.  Today, the
`connections.count` that is displayed in the dashboards considers
those disconnected persistent sessions as well.
2021-11-08 14:45:57 -03:00
Zaiming (Stone) Shi 6b06142562
Merge pull request #6077 from zmstone/sync-exproto-code
Sync exproto code from ee to ce
2021-11-08 16:43:01 +01:00
Zaiming Shi 83ecdb242f fix(appup): delete module load from app restart instruction group 2021-11-08 16:17:54 +01:00
Zaiming Shi ed171b8e60 chore: ensure version bump for dashboard app 2021-11-08 16:17:54 +01:00
Zaiming Shi 4f3790a6f5 style: fix code style for emqx_exproto 2021-11-08 16:17:54 +01:00
Zaiming Shi f1f2e51c99 fix: update appup 2021-11-08 16:17:54 +01:00
Zaiming Shi 412a68ac75 chore: bump version for emqx_proto 2021-11-08 16:17:54 +01:00
Zaiming Shi 325c5e5a97 chore: sync ce code added only to ee back to ce 2021-11-08 16:17:54 +01:00
Zaiming (Stone) Shi 1e47dbf14b
Merge pull request #6089 from k32/emqx-4-bump-version
chore(emqx): Update version and appup file
2021-11-08 16:17:16 +01:00
Zaiming (Stone) Shi e33c0a3b09
Merge pull request #6087 from emqx/patch-v4.3.9
fix(bin/emqx): ensure NAME is set
2021-11-08 16:13:07 +01:00
k32 7d07e8d948 chore(emqx): Update version and appup file 2021-11-08 14:24:37 +01:00
k32 4ebb65e5d5
Merge pull request #6065 from k32/remove-nosuspend
fix(emqx_connection): Introduce backpressure while sending data
2021-11-08 13:39:01 +01:00
Zaiming Shi f5a2421fdb fix(bin/emqx): ensure NAME is set 2021-11-08 13:27:38 +01:00
tigercl 26bc3ca0b4
Merge pull request #6063 from HJianBo/refactor-stomp-gw
fix(stomp): fix bad_return_value
2021-11-05 09:31:45 +08:00
Zaiming (Stone) Shi 5f4c6a23ab
Merge pull request #6069 from zmstone/v4-build-reenable-elvis-check
build: fix elvis check and ensure newline at EOF
2021-11-04 21:50:20 +01:00
Zaiming Shi 37edb03866 build: fix elvis check and ensure newline at EOF 2021-11-04 21:07:45 +01:00
k32 27afecb3ac fix(emqx_connection): Introduce backpressure while sending data
Fixes #5494
2021-11-04 15:25:34 +01:00
tigercl 4c4993fa25
Merge pull request #6062 from terry-xiaoyu/fix_mc_hungs
fix(ekka): add timeout to rpc:multicall/4
2021-11-04 21:59:09 +08:00
JianBo He ef9fe12825 fix(stomp): fix bad_return_value 2021-11-04 21:35:16 +08:00
Shawn a406c4f470 fix(ekka): add timeout to rpc:multicall/4 2021-11-04 16:30:46 +08:00
zhanghongtong d7aec58370 ci(relup): fix old vsn error
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-11-04 11:54:06 +08:00
tigercl e79085c259
Merge pull request #6040 from HJianBo/refactor-stomp-gw
Refactor stomp gw
2021-11-04 10:22:21 +08:00
JianBo He f36abc281a chore(types): add comment for ver type 2021-11-04 09:11:02 +08:00
JianBo He 981f74d458 test(stomp): refine stomp test cases 2021-11-03 21:13:38 +08:00
JianBo He e4e8590a77 fix(stomp): backoff outgoung hear-beat timer interval 2021-11-03 20:37:07 +08:00
lafirest 4b2586fec4
Merge pull request #6048 from lafirest/feat/slow_topics
feat: add slow topics statistics plugin
2021-11-03 17:50:07 +08:00
lafirest f8acb31f89 feat: add slow topics statistics plugin 2021-11-03 17:20:07 +08:00
tigercl 8dfafc464e
Merge pull request #6049 from tigercl/chore/webhook-version
chore(version): skip the version occupied by enterprise
2021-11-03 16:09:46 +08:00
xiangfangyang-tech cee9b39b2d
Merge pull request #6050 from xiangfangyang-tech/improve_autotest_script
Improve autotest script
2021-11-03 16:00:53 +08:00
xiangfangyang-tech 9faab7cc9b chore(autotest): improve git_action script with emqx-fvt tag 2021-11-03 16:00:02 +08:00
xiangfangyang-tech 8fb9d27aa1
Merge pull request #1 from emqx/main-v4.3
Main v4.3
2021-11-03 15:34:08 +08:00
Zaiming Shi aa90177302 Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4 2021-11-03 08:28:14 +01:00
zhouzb e5f30a4d28 chore(version): skip the version occupied by enterprise 2021-11-03 15:26:04 +08:00
JianBo He f7760232e4 fix(stomp): parse heartbeat EOL frame 2021-11-03 14:01:05 +08:00
JianBo He af7b5704ab fix(stomp): counting packets and messages 2021-11-03 14:01:05 +08:00
Zaiming (Stone) Shi 818bde1820
Merge pull request #6044 from zmstone/use-profile-name-as-default-docker-image-tag
Use profile name as default docker image tag
2021-11-03 06:21:34 +01:00
JianBo He 0a7f04caa3 fix(stomp): enrich sub-opts if sub-id/ack absent 2021-11-03 09:19:19 +08:00
Zaiming Shi 2fb8ffa8c2 test: add git credentials for enterprise tests 2021-11-02 23:12:30 +01:00
Zaiming Shi c6c9ba400e test: parameterise emqx image name in automated integration tests 2021-11-02 22:54:52 +01:00
Zaiming Shi 42695a2f9a chore: remove external contributors as maintainers
Big thank you to Raymond M Mouthaan and Huang Rui
2021-11-02 18:25:25 +01:00
Zaiming Shi 1d0c8a4eef fix: use of default profile name as default docker image name 2021-11-02 18:25:25 +01:00
JianBo He 14515e680e fix(stomp): fix stats_timer not working 2021-11-02 21:37:22 +08:00
Turtle f00e254bdf chore(release): update version to 4.3.9 2021-11-02 18:26:57 +08:00
JianBo He 2c4d3d1d24 chore(stomp): fix dialyzer warnings 2021-11-02 17:09:57 +08:00
JianBo He cc6ea6e4dd chore(stomp): remove needless properties 2021-11-02 13:56:31 +08:00
JianBo He fa2e97b1c5 chore(stomp): update appup.src 2021-11-02 13:48:03 +08:00
JianBo He 7734d6969c fix(stomp): support pub/sub operations 2021-11-02 13:31:27 +08:00
JianBo He d2924e82ab fix(stomp): fix kick/discard crash errors 2021-11-02 13:31:27 +08:00
JianBo He ed505ee120 refactor(stomp): compatible hooks system 2021-11-02 13:31:27 +08:00
JianBo He d2b6a95484 fix(stomp): fix anonymous not working 2021-11-02 13:31:27 +08:00
zhouzb 3d9054d25e fix(typo): fix typo in webhook resource 2021-11-02 13:28:46 +08:00
Shawn 0ab1b7c95d fix(mongo): update mongodb to 3.0.10 2021-11-02 09:23:07 +08:00
Zaiming (Stone) Shi 2a3d1fcb78
Merge pull request #6023 from xiangfangyang-tech/main-v4.3
chore(autotest): add mysql&pgsql&http test flow in git_action flow
2021-11-01 16:24:20 +01:00
Zaiming (Stone) Shi fa92e61440
Merge pull request #6031 from HJianBo/ignore-duplicated-sock-error
Ignore log duplicated sock error
2021-11-01 14:36:14 +01:00
JianBo He 763f567f7d chore(appup): update appup.src 2021-11-01 18:35:41 +08:00
JianBo He c9d39b4d35 chore(channel): remove redundant logs
Multiple sock_closed events may be generated,
so we need to allow sock_closed events to be reentrant
2021-11-01 18:17:38 +08:00
Zaiming (Stone) Shi 8526032200
Merge pull request #6012 from Rory-Z/chore/change-ci-helper-version
ci: change emqx-ci-helper version for build workflows
2021-11-01 10:18:49 +01:00
xiangfangyang-tech d28f913b94 chore(autotest): update redis ssl cert file 2021-11-01 16:34:37 +08:00
Zaiming (Stone) Shi 3175d59e7b
Merge pull request #6033 from zmstone/fix-find-missing-dyn-lib-before-boot
best-effort portable for zip packages
2021-11-01 08:08:26 +01:00
Zaiming Shi 9832a2ed00 build: show linux distro in BUILT_ON info 2021-10-31 17:21:47 +01:00
Zaiming Shi ecb6c1c59e build: copy dynamic libs for zip package 2021-10-31 17:21:26 +01:00
Zaiming (Stone) Shi 831f2eda0c
Merge pull request #6030 from zmstone/fix-force-kill-after-kick-or-discard-timeout
fix(session): force kill session for 'kick' and 'discard'
2021-10-31 09:48:04 +01:00
Zaiming Shi fb62487801 fix(emqx/appup): add emqx_cm to appup 2021-10-30 16:39:04 +02:00
Zaiming Shi 765a76fa80 fix(emqx_mgmt_cli): idempontent kick. now it always returns ok 2021-10-30 16:38:36 +02:00
Zaiming Shi 7f4809f61a fix(session): force kill session for 'kick' and 'discard'
Prior to this fix, 'kick' and 'discard' calls may timeout (or
fail for other reason), failures lead to only a log, then
continue to allow the new session to get registered.

As a result, in case a client is stuck, there is no way to
force it to step down, end up with multiple connections (sessions)
for the client ID in dashboard.

After this fix, the stale pids are notified to shutdown
via a gen_server:call, and forced with a exit(Pid, kill) for any
exception happend to the gen_server:call
2021-10-30 16:38:36 +02:00
k32 cfe3efed4a
Merge pull request #6024 from k32/4-4-fix-gen-rpc
fix(emqx_broker): Preserve message order across the cluster
2021-10-29 12:49:25 +02:00
k32 791caba2ed fix(broker): Fix out-of-order message delivery in a cluster
Fixes: #4658
2021-10-29 10:47:56 +02:00
xiangfangyang-tech 2ce592040e
Merge branch 'main-v4.3' into main-v4.3 2021-10-29 15:12:22 +08:00
xiangfangyang-tech afd6fe181c chore(autotest): add git action script for v4.3
chore(autotest): change git site of autemate script

chore(autotest): improve git action script with Stones advises

chore(autotest): improve trigger condition

chore(autotest): add mysql&pgsql&http test flow in git_action script
2021-10-29 15:00:42 +08:00
Zaiming (Stone) Shi b50f0b67d4
Merge pull request #6021 from zmstone/fix-boot-handle-vmarg-flags
fix: boot handle vmarg flags
2021-10-29 08:32:43 +02:00
Zaiming Shi cb3d2fd6c3 chore: refine -heart option document 2021-10-28 21:15:54 +02:00
Zaiming Shi 18fc82855b fix(bin/emqx): handle flags in vm.args
prior to this fix, the flags such as -heart in vm.args file were taken
as KEY="", VALUE="-heart"
as a result, the sed replacement replaces all lines with "-heart"
causing beam to crash at boot
2021-10-28 21:09:06 +02:00
Zaiming (Stone) Shi dd4e307753
Merge pull request #5995 from Spycsh/main-v4.3
chore: add cluster script for local machine
2021-10-28 14:20:07 +02:00
Spycsh ec30fb346a chore: add cluster script for local machine 2021-10-28 12:07:23 +08:00
zhanghongtong ba3e7841e5 ci: change emqx-ci-helper version for build workflows 2021-10-27 17:21:17 +08:00
Ilya Averyanov 49c7eae211
Merge pull request #5885 from savonarola/fix-acl-schema
fix(mnesia_acl): introduce optimized schema and migration process
2021-10-27 10:41:05 +03:00
Ilya Averyanov 6d48bbf34c fix(mnesia_acl): added acl migration test scripts 2021-10-27 09:58:21 +03:00
Ilya Averyanov ba319e1159 fix(mnesia_acl): upgrade snabbkaffe and use ?check_trace 2021-10-27 09:58:21 +03:00
Ilya Averyanov 43ac315444 fix(mnesia_acl): do not use matchspec terms in external APIs 2021-10-27 09:58:21 +03:00
Ilya Averyanov 8341a4d4a7 fix(mnesia_acl): introduce optimized schema and migration process 2021-10-27 09:58:12 +03:00
JianBo He b4c2643291 fix(api-clients): escape the searching string 2021-10-26 10:34:31 +08:00
xiangfangyang-tech 67b543f01e chore(autotest): improve trigger condition 2021-10-25 15:19:05 +08:00
xiangfangyang-tech 3e1abbddd2 chore(autotest): improve git action script with Stones advises 2021-10-25 15:19:05 +08:00
xiangfangyang-tech 48d932af83 chore(autotest): change git site of autemate script 2021-10-25 15:19:05 +08:00
xiangfangyang-tech a198158bfb chore(autotest): add git action script for v4.3 2021-10-25 15:19:05 +08:00
JianBo He 99453df637 fix(api-clients): escape the searching string 2021-10-25 09:40:56 +08:00
Zaiming (Stone) Shi fd34eb1f4e
Merge pull request #5970 from zmstone/fix-lwm2m-psk-ciphers
fix(lwm2m): add support for new cipher suites
2021-10-21 16:56:28 +02:00
Zaiming Shi 224cc0d5c7 fix(lwm2m): bump version in appup and add upgrade instructions 2021-10-21 14:31:59 +02:00
Zaiming Shi 4896c03881 fix(lwm2m): add support for new cipher suites
prior to this change, the schema does not allow newer
cipher suites, and the default ciperhs given in the conf file
is likely not supported by some clients (which only supports dtls v1.2)
2021-10-20 23:10:46 +02:00
Zaiming (Stone) Shi d2f4c55fd7
Merge pull request #5940 from savonarola/mqtt-http-api-validations-fix
fix(mgmt api): allow empty clientid in publish
2021-10-18 12:12:39 +02:00
Ilya Averyanov 3cae4437fa fix(mgmt api): allow empty clientid in publish 2021-10-18 12:10:21 +03:00
Zaiming (Stone) Shi 1984e5b68c
Merge pull request #5927 from zmstone/fix-relup-test-env-overrides
test(relup): fix env overrides
2021-10-16 06:38:52 +02:00
Zaiming (Stone) Shi 51d2fa1359
Merge pull request #5932 from zmstone/chore-scripts-skip-appup-file-app-vsn-check
chore: skip appup file in vsn check script
2021-10-15 12:59:18 +02:00
Zaiming Shi 08c2907d44 chore: skip appup file in vsn check script 2021-10-15 12:10:37 +02:00
Zaiming Shi 9038da0bd2 fix(ws_connection): check origin failure should return 403 not 500 2021-10-15 15:49:26 +08:00
Zaiming Shi 51bc9c83c3 fix: ignore unused var 2021-10-15 15:49:26 +08:00
Zaiming Shi f7d70d05ab chore: pin otp version for 4.3 2021-10-15 15:49:26 +08:00
k32 44d666f62b
Merge pull request #5923 from k32/update-appup-binary
feat(update_appup): Support binary releases (.zip)
2021-10-14 17:14:11 +02:00
Zaiming Shi d2649eea81 test(relup): fix env overrides
these are for 5.0
2021-10-14 15:53:44 +02:00
k32 14aaa4affe fix(update_appup): Fix dependency check 2021-10-14 14:18:09 +02:00
k32 cb5db8059b fix(update_appup): Use a different syntax for substitution 2021-10-14 13:47:04 +02:00
k32 703f52cec7 feat(update_appup): Support binary releases (.zip) 2021-10-13 17:25:29 +02:00
k32 4b098ce3af
Merge pull request #5907 from k32/mechanical-appup-update
chore(appup): Update appup scripts
2021-10-13 09:44:10 +02:00
k32 7e1f3c5882 revert(appup): Revert changes to management and dashboard 2021-10-13 09:19:49 +02:00
k32 b60e33ca41 fix(appup): Always run appup actions for management and dashboard 2021-10-12 19:19:26 +02:00
k32 4643415b0b chore(appup): Update appup scripts 2021-10-12 17:45:10 +02:00
Ilya Averyanov 6dca349435
Merge pull request #5878 from savonarola/fix-emqx-rpc
fix(emqx_rpc): removed unnecessary call wrapper
2021-10-12 11:18:30 +03:00
Ilya Averyanov 85723e4a35 fix(emqx_rpc): removed unnecessary call wrapper 2021-10-11 15:20:31 +03:00
zhanghongtong 75fac32c12 docs(docker): fix invalid links 2021-10-09 09:16:45 +08:00
k32 5ca28749ed
Merge pull request #5886 from k32/dev/bump-ekka-4.3
chore(ekka): Bump version
2021-10-08 13:15:02 +02:00
k32 b88674e876 chore(ekka): Bump version to 0.8.1.3
Fixes: #5367
2021-10-07 19:33:25 +02:00
Zaiming (Stone) Shi 58b5d3709d
Merge pull request #5882 from zmstone/fix-flaky-tests-cm-session-race-condition-4.3
chore: fix flaky test cm_SUITE open session racecondition
2021-10-07 17:26:24 +02:00
k32 230af7990d
Merge pull request #5868 from k32/appup-script-beams
feat(update_appup): Compare beam files
2021-10-07 17:00:02 +02:00
Zaiming Shi 7c1ce8bc70 chore: fix flaky test cm_SUITE open session racecondition 2021-10-07 11:53:53 +02:00
k32 668bcad4e0 fix(update_appup): Add forgotten CLI parameter 2021-10-07 09:59:32 +02:00
k32 20ee42be87 chore(update-appup): s/Pred/Prev/g 2021-10-06 23:45:52 +02:00
k32 29ad2c04da fix: Use application version instead of the release version 2021-10-06 23:45:52 +02:00
k32 ecf4d196eb feat(update_appup): Return error when missing appup.src 2021-10-06 23:45:52 +02:00
k32 89fbf5fea2 feat(update_appup): Add a warning message 2021-10-06 23:45:52 +02:00
k32 ca77749281 feat(update_appup): Add a full description of the algorithm 2021-10-06 23:45:52 +02:00
k32 6bee6279f8 feat(update_appup): Make the script more generic 2021-10-06 23:45:52 +02:00
k32 c50c72b18e fix(update_appup): Fix downgrade module loading 2021-10-06 23:45:52 +02:00
k32 f793883e35 refactor(update_appup): Minor code cleanup 2021-10-06 23:45:52 +02:00
k32 aca6367561 feat(update_appup): Create stubs 2021-10-06 23:45:52 +02:00
k32 4020db8fc1 feat(update_appup): Compare beam files 2021-10-06 23:45:52 +02:00
Zaiming (Stone) Shi c8dda45c55
Merge pull request #5879 from zmstone/chore-always-force-dashboard-vsn-bump
chore: force appup for emqx_dashboard app in each release
2021-10-06 22:55:58 +02:00
Zaiming Shi 1d9f5ea133 chore: force appup for emqx_dashboard app in each release 2021-10-06 22:19:05 +02:00
Zaiming (Stone) Shi 0120f8cf45
Merge pull request #5877 from zmstone/test-fix-flaky-test-case-in-broker-suite
test(emqx_broker): fix flaky tests
2021-10-06 15:22:52 +02:00
Zaiming Shi e012e77ce6 chore(ci): do not colorize JSON in jq output 2021-10-06 14:53:54 +02:00
Zaiming Shi e1a2dc9138 fix(ci): lux report verbose progress 2021-10-06 14:14:21 +02:00
Zaiming Shi 3fa442f4a4 test(emqx_broker): fix flaky tests 2021-10-05 20:55:36 +02:00
Zaiming (Stone) Shi feef02b639
Merge pull request #5874 from zmstone/fix-emqx-app-vsn
chore(emqx.app): bump emqx app to vsn 4.3.10
2021-10-05 14:34:20 +02:00
Ilya Averyanov da2c41702d
Merge pull request #5848 from savonarola/mqtt-http-api-validations
Add validations to management API
2021-10-05 14:26:38 +03:00
Zaiming Shi 7804b39e08 chore(emqx.app): bump emqx app to vsn 4.3.10
app 4.3.9 was release as a part of enterprise e4.3.4
but opensource v4.3.9 is not releasd yet, but we have
to bump app version to 4.3.10 to make appup work for the next
release (either opensource or enterprise).
2021-10-05 12:03:47 +02:00
Ilya Averyanov 44d16a26ab fix(mgmt api): validate clientid to avoid crashes and 500 HTTP errors 2021-10-05 12:09:03 +03:00
Ilya Averyanov 42339b2e35
Merge pull request #5869 from savonarola/refactor-relup-tests
chore(relup tests): refactored relup tests
2021-10-05 12:07:49 +03:00
Ilya Averyanov ebbf567fff chore(relup tests): refactored relup tests 2021-10-04 21:47:51 +03:00
Zaiming (Stone) Shi ec89781cc4
Merge pull request #5849 from savonarola/dashboard-login-security
fix(dashboard rest api): improve auth method security
2021-09-30 07:29:38 +02:00
Ilya Averyanov 40850d981d chore(CI): increased relup test timeout 2021-09-29 23:29:40 +03:00
Ilya Averyanov 188b889ed3 fix(dashboard rest api): improve auth method security
Make messages not differ when authenticating with invalid password and invalid username.

Closes: #5563
2021-09-29 19:33:45 +03:00
Zaiming (Stone) Shi 004160af56
Merge pull request #5826 from JimMoen/fix-frame
fix(frame): variable byte integer could be larger than 4 bytes.
2021-09-28 19:06:54 +02:00
JimMoen 2dba91d6d0 chore(test): variable integer test. 2021-09-28 15:15:05 +08:00
JimMoen 19031e21ec fix(frame): variable byte integer could be larger than 4 bytes. 2021-09-28 15:15:05 +08:00
Zaiming (Stone) Shi d59d3849e0
Merge pull request #5794 from zmstone/fix-flaky-test-bridge-worker
test(mqtt-bridge): increase timeout in snk event wait
2021-09-23 16:58:47 +02:00
Zaiming Shi 92a3d683cf test(mqtt-bridge): increase timeout in snk event wait 2021-09-23 13:34:27 +02:00
Zaiming (Stone) Shi 55d4dfde44
Merge pull request #5758 from m-yosefpor/main-v4.3
Backporting https://github.com/emqx/emqx/pull/5471 to main-v4.3
2021-09-16 21:36:50 +02:00
Mohammad Yosefpor 1ae3f8c204
fix: Running on Openshift clusters with restricted writable filesystem containers 2021-09-16 18:57:44 +04:30
Parham Alvani 9d993e1625
chore(auth-http): Disable Superuser Request by Defualt 2021-09-15 08:48:52 +08:00
Turtle 9f843d618d fix(rule): fix rpc timeout extend the RPC timeout interval 2021-09-15 08:19:22 +08:00
Zaiming (Stone) Shi 80421651d7
Merge pull request #5739 from zmstone/fix-pin-rebar_mix-plugin-version-0.4.0
chore(build): pin rebar_mix plugin version v0.4.0
2021-09-14 18:53:28 +02:00
Zaiming Shi d777ca7baf chore(build): pin rebar_mix plugin version v0.4.0 2021-09-14 16:31:38 +02:00
Turtle 3ad0678892 fix(rule): fix edit rule fail in the cluster 2021-09-14 14:54:24 +08:00
tigercl 4664b85968
Merge pull request #5696 from tigercl/fix/sni
fix(sni): fix bad type of sni
2021-09-09 17:04:17 +08:00
zhouzb ff2d73ad3b chore(upgrade): update upgrade script 2021-09-09 10:29:58 +08:00
zhouzb 1a694814e0 fix(sni): fix bad type of sni 2021-09-09 10:18:40 +08:00
zhanghongtong f92ff4494b fix(auth mnesia api): parsing the http body parameter does not require url decode 2021-09-09 09:42:03 +08:00
k32 1a291d5d97
Merge pull request #5666 from k32/pqueue
feat(mqueue): Interleave messages with different priorities
2021-09-07 16:14:24 +02:00
k32 9b097ac73f chore(mqueue): Remove forgotten debug message 2021-09-07 11:33:16 +02:00
k32 5fc1036cf7 chore(mqueue): Implement live upgrade 2021-09-06 23:15:14 +02:00
k32 ed61999fdf chore(emqx): Bump version 2021-09-06 22:22:48 +02:00
k32 4eacaa29bd feat(mqueue): Interleave messages with different priorities 2021-09-06 22:22:48 +02:00
zhanghongtong aaa7cd0a44 chore(release): update emqx release version 2021-09-06 10:55:02 +08:00
zhanghongtong eeb44086c8 fix(issue): 5565 2021-09-06 10:49:20 +08:00
zhouzb a27b75b98e chore(ehttpc): update tag for ehttpc 2021-09-06 10:41:24 +08:00
William Yang eb88a0b7b6
Merge pull request #5646 from qzhuyan/backport/william/issue/5254
Backport: fix(helm-chart): force headless svc ready while pod is not ready
2021-09-03 13:18:05 +02:00
William Yang e78967cfc3 fix(helm-chart): force headless svc ready while pod is not ready
fixs: #5254

The dist port behind headless svc should to be accessible during emqx
cluster boot.

Endpoints of headless SVC is not in 'ready' state that prevents nodes to talk to
each other, this issue only happens when K8s host node is restarted and
all emqx nodes are deployed on the same host.
2021-09-03 10:10:10 +02:00
Shawn fe343a0407 fix(ekka): kill the process if don't release lock 2021-09-03 10:50:12 +08:00
Turtle e532fff4df chore: Update dashboard version to 4.3.4 2021-08-27 16:28:01 +08:00
Turtle 7bcc67f95d fix(relup): get broker metrics 2021-08-27 16:28:01 +08:00
turtleDeng ea15aa3f9e
fix(data-import): fix import rule fail (#5512) 2021-08-18 09:55:04 +08:00
Turtle 6aa61ea78d fix(test): Increase the delay time 2021-08-13 17:29:51 +08:00
JianBo He a41e6604cf chore(exproto): update appup.src 2021-08-13 17:21:31 +08:00
JianBo He 473e600b53 fix(exproto): fix badarg is_process_alive/1 2021-08-13 17:21:31 +08:00
Turtle dffa81120c chore: emqx_rule_engine:load_providers has been called in emqx_dashboard.appup.src 2021-08-13 12:35:56 +08:00
Turtle f92cfa72d2 fix(webhook): fix the hot upgrade resulted in the loss of webhook messages 2021-08-13 11:05:55 +08:00
Shawn 1245020ec0 fix(force_shutdown): add some comments for the range of max_heap_size 2021-08-13 09:46:49 +08:00
Shawn 844133c7c5 fix(appup): always reload emqx_app 2021-08-13 09:46:49 +08:00
Shawn f9601804e5 chore(emqx): bump the emqx version to 4.3.8 2021-08-13 09:46:49 +08:00
Shawn d2d42ed33e fix(logger): change default value of log.max_depth to 100
The value 20 is too small to inspect some error messages, especially
when it contains stack traces.
2021-08-13 09:46:49 +08:00
Shawn 31a1942b61 fix(force_shutdown): cannot suicide if the process hangs up 2021-08-13 09:46:49 +08:00
Turtle 391eb55324 chore: format error log 2021-08-12 19:35:51 +08:00
Turtle a84b6b74bd chore(relup): update appup file 2021-08-12 19:35:51 +08:00
Turtle e0336e60da fix(webhook-action): fix webhook action path type error 2021-08-12 19:35:51 +08:00
Parham Alvani e5c4277109 fix: Correct Issues 2021-08-12 14:24:12 +08:00
Parham Alvani 45b9f682b2 feat: Expose Internal MQTT Service 2021-08-12 14:24:12 +08:00
William Yang 94712064b5 chore: bump to ekka 0.8.1.1 2021-08-12 11:04:14 +08:00
William Yang f3bd1f1c3a fix(helm-chart): make podManagementPolicy configurable 2021-08-12 11:04:14 +08:00
William Yang ced8693043 fix(helm-chart): start/stop pods in parallel 2021-08-12 11:04:14 +08:00
JianBo He 66f69e7693 feat(exhook): make request_failed_action working 2021-08-12 10:40:24 +08:00
JianBo He 7ec8dc21a6 chore(appup): update appup.src & app.src 2021-08-12 10:40:24 +08:00
JianBo He 1e4ca14476 fix(exhook): set trap_exit flag 2021-08-12 10:40:24 +08:00
JianBo He b3db4d0f7c refactor(exhook): move all manager code into mngr module 2021-08-12 10:40:24 +08:00
JianBo He 22f7b0b8e5 refactor(exhook): add mechanism to reload the failure server 2021-08-12 10:40:24 +08:00
JianBo He 60e830fef7 chore(ex): update grpc to 0.6.3 2021-08-10 17:59:36 +08:00
JianBo He f9a9d4a6f0 chore(exproto): update appup.src 2021-08-10 17:59:36 +08:00
JianBo He 5854bfab57 fix(exproto): retry the grpc request if the stream closed 2021-08-10 17:59:36 +08:00
zhanghongtong bf0036bf81 chore(cts): execute cts every six hours 2021-08-10 15:09:32 +08:00
zhanghongtong 554879c9d7 chore(relup tests): upload emqx package to workflow artifact
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-08-09 13:27:00 +08:00
Shawn c09cb64db6
fix(lwm2m): write incorrect integer to device (#5425)
* fix(test): add testcase for write integer values

* fix(lwm2m): write incorrect integer to device

* fix(emqx_lwm2m): refactor the code for getting bits len of a signed int

* chore(emqx_lwm2m): bump version for emqx_lwm2m to 4.3.3
2021-08-06 17:05:25 +08:00
Rory Z ff96250b0b chore(tests): fix conunt error 2021-08-06 15:31:32 +08:00
Turtle 992e094ce9 fix(relup): fix badfun after relup 2021-08-05 14:19:53 +08:00
Turtle efa71d12fe chore(minirest): Upgrade minirest version to 0.3.7 2021-08-05 14:19:53 +08:00
Turtle de96349ddf chore: Specify emqtt-bench version 2021-08-05 14:19:53 +08:00
zhanghongtong 5b671e5c4f chore(CI): print log when deployment helm fail 2021-08-05 10:57:32 +08:00
zhanghongtong ed53b859d9 feat(helm): add externalIPs to chart 2021-08-05 10:57:32 +08:00
Turtle c45de03ac8 chore(version): update emqx version to 4.3.7
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-08-05 10:00:03 +08:00
Turtle 87ee94b6f2 chore(version): update emqx version to 4.3.7 2021-08-04 18:44:47 +08:00
tigercl d4ce7f328d
Merge pull request #5395 from tigercl/chore/ehttpc
chore(ehttpc): update tag of ehttpc
2021-08-04 15:58:58 +08:00
Turtle ac0639f6b1 fix(actions): fix republish actions payload is null 2021-08-04 14:39:19 +08:00
Turtle ff4229bb93 fix(relup): fix check relup fail 2021-08-04 11:28:07 +08:00
Turtle 8fb9170df8 fix(rule-engine): fix rule status is not available after the emqx restart 2021-08-03 17:31:43 +08:00
zhouzb 46e58a50d0 chore(ehttpc): update tag of ehttpc 2021-08-03 17:27:35 +08:00
Turtle 35ae097038 fix(relup): upgrade emqx dashboard version 2021-08-03 12:17:35 +08:00
Turtle a7d67eb862 fix(script): fix emqx-ee get dashboard src fail 2021-08-03 12:17:35 +08:00
Zaiming (Stone) Shi 253fa9167c
Merge pull request #5368 from zmstone/fix-boot-log
fix(bin/emqx): fix boot log
2021-07-31 08:50:47 +02:00
Turtle 36fa9f99be test(relup): fix relup fail 2021-07-31 10:52:43 +08:00
zhouzb 65df4fd9ca fix(http pipelining): fix http pipelining for webhook resource 2021-07-30 15:22:18 +08:00
Turtle 49a00c3412 chore(relup): update appup 2021-07-30 14:39:37 +08:00
William Yang 2479c2a80b feat(ssl): mqtt bridge support ssl peer verification 2021-07-30 14:39:37 +08:00
zhanghongtong 07f58c0e9e chore(release): update emqx release version 2021-07-28 16:45:54 +08:00
tigercl 4618eb985a
Merge pull request #5334 from tigercl/chore/dashboard
chore(dashboard): update version for dashboard
2021-07-28 16:43:06 +08:00
zhouzb 2bd12a9a3d chore(dashboard): update version for dashboard 2021-07-28 14:31:24 +08:00
JianBo He d3d019cb89 chore(emqx): update appup.src 2021-07-28 13:54:13 +08:00
JianBo He 07c29e8c55 chore(acl): support ipaddr list 2021-07-28 13:54:13 +08:00
Zaiming Shi dd23ee6b15 fix(emqx_app): stop listeners in application prep_stop callback
Application:stop is call after the root supervisor is stopped,
in our case, prior to this fix, emqx_sup is stopped before
the listeners (hence the emqx_connection processes).

This causes shutdown to emit a lot of error logs
e.g. emqx_broker pool is down, but emqx_connection process is still
trying to call the pool
2021-07-28 08:52:04 +08:00
tigercl fee3462603
fix(http pipelining): support to switch http pipelining (#5279) 2021-07-27 17:32:56 +08:00
zhanghongtong a538979c3b chore(CI): upload emqx log in relup check 2021-07-27 14:57:46 +08:00
zhanghongtong 8809d72ee5 chore(CI): check relup rule action success 2021-07-27 11:31:44 +08:00
zhanghongtong a9a1c71eb4 chore(auth mnesia): hide the password in the api 2021-07-27 10:05:08 +08:00
Zaiming (Stone) Shi b851a7ea7c
Merge pull request #5301 from zmstone/add-notice
chore: Add NOTICE file
2021-07-23 11:44:26 +02:00
Zaiming Shi 7103324426 chore: Add NOTICE file 2021-07-23 10:55:03 +02:00
zhanghongtong f6138e8971 chore(relup tests): check rules matched
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-07-22 15:28:04 +08:00
JianBo He b1d190fd3b fix(exproto): fix peername for udp socket 2021-07-21 17:33:21 +08:00
JianBo He fbaf2646f9 chore(exproto): update appup.src 2021-07-21 17:33:21 +08:00
JianBo He 31cbd66f61 fix(exproto): get peername after esockd_wait/1 2021-07-21 17:33:21 +08:00
JianBo He c878c73395
fix(exproto): fix bad socket type
* fix(exproto): fix bad socket type

* chore(exproto): update appup.src
2021-07-20 11:04:00 +08:00
zhanghongtong 5bc33b9b5b chore(CI): add time sleep for relup test 2021-07-16 20:18:33 +08:00
Turtle befd22282f chore(relup): fix check relup fail 2021-07-16 19:01:05 +08:00
Turtle 5edb5351b0 chore(relup): update emqx appup 2021-07-16 19:01:05 +08:00
zhanghongtong 2b1249ba9c fix(auth mnesia): fix add password error by api
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-07-16 17:40:51 +08:00
Turtle 8b4b9a119b chore: bind_as_user set default value 2021-07-14 14:14:09 +08:00
JianBo He 46d0cb69dc chore(emqx): update appup.src 2021-07-13 17:53:34 +08:00
JianBo He 240a4b88a5 fix(cm): add a timeout to rpc_call function
An infinite wait will leave the client process waiting for
a return and cause the client to go to a dead state
2021-07-13 17:53:34 +08:00
JianBo He d3d636fc99 chore(mgmt): update appup.src 2021-07-13 17:53:26 +08:00
JianBo He 8cd1fa41b6 fix(mgmt): fix dump aborted by print function crash 2021-07-13 17:53:26 +08:00
zhanghongtong 750cb2d491 chore(CI): update emqx-ci-helper tag 2021-07-09 19:37:45 +08:00
Zaiming Shi 780e403262 fix(conf): change wss.external.max_connections from 16 to 102400 2021-07-09 09:30:57 +08:00
JianBo He 05b16c601b chore(presence): more fields for disconnected event 2021-07-07 18:36:09 +08:00
JianBo He 8935d28ed4 fix(exhook): catch the badarg error 2021-07-01 17:56:10 +08:00
zhanghongtong 0c66fcef00 chore(release): update emqx release version 2021-06-28 11:14:33 +08:00
tigercl 637cd5e804
Merge pull request #5105 from terry-xiaoyu/clean_emqx_shared_subscription2
fix(shared_sub): discard all unexpected msgs
2021-06-28 11:07:10 +08:00
Shawn 5fbf83e7f0 fix(shared_sub): discard all unexpected msgs 2021-06-28 09:37:34 +08:00
Shawn 513cd001ac chore(appup): update the appup for 4.3.5 2021-06-25 20:38:43 +08:00
Shawn 868cd6e57c fix(shared_sub): failed to clean the emqx_shared_subscription tab
A trick that fixes the issue that we demonitored the shared subscriber
too early if it not unsubscribed all of the topics.
2021-06-25 20:38:43 +08:00
zhanghongtong a8aabd5f74 revert: chore(CI): update events that trigger workflows
This reverts commit 002cbb6d8b
2021-06-25 20:13:35 +08:00
zhanghongtong 002cbb6d8b chore(CI): update events that trigger workflows 2021-06-24 17:44:30 +08:00
zhanghongtong e87838f272 docs(docker): fix env name error 2021-06-24 14:46:34 +08:00
zhanghongtong f18b9a92bc chore(CI): delete needless link when build packages 2021-06-23 21:38:30 +08:00
Zaiming Shi 49a78c8ef2 fix(script): exclude non-edge apps in relup dependency 2021-06-23 21:30:59 +08:00
zhanghongtong 8ad42cb827 chore(CI): add DIAGNOSTIC=1 when build windows 2021-06-23 20:27:08 +08:00
Zaiming Shi f17962e79a chore: add more info in error message 2021-06-23 19:40:12 +08:00
Turtle 98c4fff43f chore: fix inject deps notfound emqx_reloader 2021-06-23 19:03:06 +08:00
zhanghongtong bfc6c3aa42 chore(release): update emqx release version 2021-06-23 17:52:42 +08:00
Turtle 1a438125c7 chore(review): review 4.3.4 2021-06-23 17:51:17 +08:00
Turtle 2092bedb12 feat(lwm2m): fix check dialyzer fail 2021-06-23 17:08:44 +08:00
Turtle a6bd1c90d5 fix: Ignore repeatedly receiving connection packet in the wait_will_msg/wait_will_topic/connected state 2021-06-23 14:37:26 +08:00
JianBo He 3ddbdbc6c1
fix(emqx_cm): catch noproc exception from rpc_call (#5048) 2021-06-23 09:45:24 +08:00
zhanghongtong 2c0916ff05 chore(CI): upload rebar3.crashdump file when slim build failure 2021-06-23 09:44:58 +08:00
JianBo He 77a41ea88f
Fix coap uri format (#5059) 2021-06-23 08:50:20 +08:00
Zaiming Shi b92940af29 test(ci): add plugin list status check after relup new vsn install 2021-06-22 08:54:55 +08:00
Zaiming Shi bed45417dc chore(relup): add relup dependency injection 2021-06-22 08:54:55 +08:00
JianBo He 8110ef7a64 chore: upgrade lwm2m_coap to 1.1.4 2021-06-21 12:21:25 +08:00
Turtle ecec9bd2f6 feat(lwm2m): add emqx_lwm2m http API 2021-06-21 12:19:35 +08:00
Shawn 6724e59e7a fix(appup): relup for emqx_rule_registry failed 2021-06-21 12:18:39 +08:00
Shawn 5962c9c83c
feat(rules): remove stats update from rule_engine_registry (#5029) 2021-06-19 17:02:43 +08:00
Shawn c0367fb8dd
Delete resource failed when searching dependent rules (#4996) 2021-06-17 16:45:44 +08:00
tigercl 0ecaa80fb8
fix(query string): support query string in path (#4981) 2021-06-17 16:12:08 +08:00
JianBo He bdd9154001 fix(modules): fix start/stop exhook module failure 2021-06-16 14:40:57 +08:00
JianBo He bbed1b55e0 fix(ws): avoid funcation_clause for un-inited websocket 2021-06-15 11:27:47 +08:00
k32 074c0bd2cc fix(auth_ldap): Handle missing attributes
Fixes: #4953
2021-06-11 18:35:21 +08:00
Zaiming (Stone) Shi 69ef5cbdc3
Merge pull request #4979 from zmstone/chore-config-rpc-connections-default-to-one
chore(conf): change default number of gen_rpc connections to 1
2021-06-11 09:58:50 +02:00
JianBo He 42a6f2aba5
fix(mqttsn): fix proto_name to MQTT-SN instead of MQTT (#4961) 2021-06-11 11:08:24 +08:00
Shawn 0184a1b3e8
fix(minirest): encode response message failed (#4965) 2021-06-11 09:56:11 +08:00
JianBo He 86766ee7f1 fix(lwm2m): base64 decode for opaque value 2021-06-11 09:48:57 +08:00
Turtle 8eebdd5cdb chore: remove lager schema info 2021-06-11 09:48:25 +08:00
Zaiming Shi 1f57968c9b chore(conf): change default number of gen_rpc connections to 1 2021-06-10 19:59:10 +02:00
845 changed files with 47534 additions and 9952 deletions

14
.ci/acl_migration_test/build.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -xe
cd "$EMQX_PATH"
rm -rf _build _upgrade_base
mkdir _upgrade_base
pushd _upgrade_base
wget "https://s3-us-west-2.amazonaws.com/packages.emqx/emqx-ce/v${EMQX_BASE}/emqx-ubuntu20.04-${EMQX_BASE}-amd64.zip"
popd
make emqx-zip

View File

@ -0,0 +1,15 @@
#!/bin/bash
set -xe
mkdir -p "$TEST_PATH"
cd "$TEST_PATH"
cp ../"$EMQX_PATH"/_upgrade_base/*.zip ./
unzip ./*.zip
cp ../"$EMQX_PATH"/_packages/emqx/*.zip ./emqx/releases/
git clone --depth 1 https://github.com/terry-xiaoyu/one_more_emqx.git
./one_more_emqx/one_more_emqx.sh emqx2

17
.ci/acl_migration_test/suite.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -xe
export EMQX_PATH="$1"
export EMQX_BASE="$2"
export TEST_PATH="emqx_test"
./build.sh
VERSION=$("$EMQX_PATH"/pkg-vsn.sh)
export VERSION
./prepare.sh
./test.sh

121
.ci/acl_migration_test/test.sh Executable file
View File

@ -0,0 +1,121 @@
#!/bin/bash
set -e
EMQX_ENDPOINT="http://localhost:8081/api/v4/acl"
EMQX2_ENDPOINT="http://localhost:8917/api/v4/acl"
function run() {
emqx="$1"
shift
echo "[$emqx]" "$@"
pushd "$TEST_PATH/$emqx"
"$@"
popd
}
function post_rule() {
endpoint="$1"
rule="$2"
echo -n "->($endpoint) "
curl -s -u admin:public -X POST "$endpoint" -d "$rule"
echo
}
function verify_clientid_rule() {
endpoint="$1"
id="$2"
echo -n "<-($endpoint) "
curl -s -u admin:public "$endpoint/clientid/$id" | grep "$id" || (echo "verify rule for client $id failed" && return 1)
}
# Run nodes
run emqx ./bin/emqx start
run emqx2 ./bin/emqx start
run emqx ./bin/emqx_ctl plugins load emqx_auth_mnesia
run emqx2 ./bin/emqx_ctl plugins load emqx_auth_mnesia
run emqx2 ./bin/emqx_ctl cluster join 'emqx@127.0.0.1'
# Add ACL rule to unupgraded EMQX nodes
post_rule "$EMQX_ENDPOINT" '{"clientid": "CLIENT1_A","topic": "t", "action": "pub", "access": "allow"}'
post_rule "$EMQX2_ENDPOINT" '{"clientid": "CLIENT1_B","topic": "t", "action": "pub", "access": "allow"}'
# Upgrade emqx2 node
run emqx2 ./bin/emqx install "$VERSION"
sleep 60
# Verify upgrade blocked
run emqx2 ./bin/emqx eval 'emqx_acl_mnesia_migrator:is_old_table_migrated().' | grep false || (echo "emqx2 shouldn't have migrated" && exit 1)
# Verify old rules on both nodes
verify_clientid_rule "$EMQX_ENDPOINT" 'CLIENT1_A'
verify_clientid_rule "$EMQX2_ENDPOINT" 'CLIENT1_A'
verify_clientid_rule "$EMQX_ENDPOINT" 'CLIENT1_B'
verify_clientid_rule "$EMQX2_ENDPOINT" 'CLIENT1_B'
# Add ACL on OLD and NEW node, verify on all nodes
post_rule "$EMQX_ENDPOINT" '{"clientid": "CLIENT2_A","topic": "t", "action": "pub", "access": "allow"}'
post_rule "$EMQX2_ENDPOINT" '{"clientid": "CLIENT2_B","topic": "t", "action": "pub", "access": "allow"}'
verify_clientid_rule "$EMQX_ENDPOINT" 'CLIENT2_A'
verify_clientid_rule "$EMQX2_ENDPOINT" 'CLIENT2_A'
verify_clientid_rule "$EMQX_ENDPOINT" 'CLIENT2_B'
verify_clientid_rule "$EMQX2_ENDPOINT" 'CLIENT2_B'
# Upgrade emqx node
run emqx ./bin/emqx install "$VERSION"
# Wait for upgrade
sleep 60
# Verify if upgrade occured
run emqx ./bin/emqx eval 'emqx_acl_mnesia_migrator:is_old_table_migrated().' | grep true || (echo "emqx should have migrated" && exit 1)
run emqx2 ./bin/emqx eval 'emqx_acl_mnesia_migrator:is_old_table_migrated().' | grep true || (echo "emqx2 should have migrated" && exit 1)
# Verify rules are kept
verify_clientid_rule "$EMQX_ENDPOINT" 'CLIENT1_A'
verify_clientid_rule "$EMQX2_ENDPOINT" 'CLIENT1_A'
verify_clientid_rule "$EMQX_ENDPOINT" 'CLIENT1_B'
verify_clientid_rule "$EMQX2_ENDPOINT" 'CLIENT1_B'
verify_clientid_rule "$EMQX_ENDPOINT" 'CLIENT2_A'
verify_clientid_rule "$EMQX2_ENDPOINT" 'CLIENT2_A'
verify_clientid_rule "$EMQX_ENDPOINT" 'CLIENT2_B'
verify_clientid_rule "$EMQX2_ENDPOINT" 'CLIENT2_B'
# Add ACL on OLD and NEW node, verify on all nodes
post_rule "$EMQX_ENDPOINT" '{"clientid": "CLIENT3_A","topic": "t", "action": "pub", "access": "allow"}'
post_rule "$EMQX2_ENDPOINT" '{"clientid": "CLIENT3_B","topic": "t", "action": "pub", "access": "allow"}'
verify_clientid_rule "$EMQX_ENDPOINT" 'CLIENT3_A'
verify_clientid_rule "$EMQX2_ENDPOINT" 'CLIENT3_A'
verify_clientid_rule "$EMQX_ENDPOINT" 'CLIENT3_B'
verify_clientid_rule "$EMQX2_ENDPOINT" 'CLIENT3_B'
# Stop nodes
run emqx ./bin/emqx stop
run emqx2 ./bin/emqx stop
echo "Success!"

View File

@ -1,16 +0,0 @@
ARG BUILD_FROM=emqx/build-env:erl23.2.7.2-emqx-2-ubuntu20.04
FROM ${BUILD_FROM}
ARG EMQX_NAME=emqx
COPY . /emqx
WORKDIR /emqx
RUN rm -rf _build/${EMQX_NAME}/lib _build/${EMQX_NAME}-pkg/lib
RUN make ${EMQX_NAME}-zip || cat rebar3.crashdump
RUN make ${EMQX_NAME}-pkg || cat rebar3.crashdump
RUN /emqx/.ci/build_packages/tests.sh

View File

@ -1,28 +1,56 @@
#!/bin/bash
#!/usr/bin/env bash
## This script tests built package start/stop
## Accept 2 args PROFILE and PACKAGE_TYPE
set -x -e -u
if [ -z "${1:-}" ]; then
echo "Usage $0 <PROFILE> e.g. emqx, emqx-edge"
exit 1
fi
if [ "${2:-}" != 'zip' ] && [ "${2:-}" != 'pkg' ]; then
echo "Usage $0 <PACKAGE_NAME> zip|pkg"
exit 1
fi
PROFILE="${1}"
PACKAGE_TYPE="${2}"
export CODE_PATH=${CODE_PATH:-"/emqx"}
export EMQX_NAME=${EMQX_NAME:-"emqx"}
export PACKAGE_PATH="${CODE_PATH}/_packages/${EMQX_NAME}"
export PACKAGE_PATH="${CODE_PATH}/_packages/${PROFILE}"
export RELUP_PACKAGE_PATH="${CODE_PATH}/_upgrade_base"
# export EMQX_NODE_NAME="emqx-on-$(uname -m)@127.0.0.1"
# export EMQX_NODE_COOKIE=$(date +%s%N)
case "$(uname -m)" in
x86_64)
ARCH='amd64'
SYSTEM="$("$CODE_PATH"/scripts/get-distro.sh)"
if [ "$PACKAGE_TYPE" = 'zip' ]; then
PKG_SUFFIX="zip"
else
case "${SYSTEM:-}" in
ubuntu*|debian*|raspbian*)
PKG_SUFFIX='deb'
;;
aarch64)
ARCH='arm64'
*)
PKG_SUFFIX='rpm'
;;
arm*)
ARCH=arm
;;
esac
export ARCH
esac
fi
PACKAGE_NAME="${PROFILE}-$("$CODE_PATH"/scripts/pkg-full-vsn.sh)"
OLD_PACKAGE_PATTERN="${PROFILE}-$("$CODE_PATH"/scripts/pkg-full-vsn.sh 'vsn_matcher')"
PACKAGE_FILE_NAME="${PACKAGE_NAME}.${PKG_SUFFIX}"
PACKAGE_FILE="${PACKAGE_PATH}/${PACKAGE_FILE_NAME}"
if ! [ -f "$PACKAGE_FILE" ]; then
echo "$PACKAGE_FILE is not a file"
exit 1
fi
emqx_prepare(){
mkdir -p "${PACKAGE_PATH}"
if [ ! -d "/paho-mqtt-testing" ]; then
git clone -b develop-4.0 https://github.com/emqx/paho.mqtt.testing.git /paho-mqtt-testing
fi
@ -31,18 +59,20 @@ emqx_prepare(){
emqx_test(){
cd "${PACKAGE_PATH}"
for var in "$PACKAGE_PATH"/"${EMQX_NAME}"-*;do
case ${var##*.} in
local packagename="${PACKAGE_FILE_NAME}"
case "$PKG_SUFFIX" in
"zip")
packagename=$(basename "${PACKAGE_PATH}/${EMQX_NAME}"-*.zip)
unzip -q "${PACKAGE_PATH}/${packagename}"
export EMQX_ZONE__EXTERNAL__SERVER__KEEPALIVE=60 \
EMQX_MQTT__MAX_TOPIC_ALIAS=10
sed -i '/emqx_telemetry/d' "${PACKAGE_PATH}"/emqx/data/loaded_plugins
echo "running ${packagename} start"
"${PACKAGE_PATH}"/emqx/bin/emqx start || ( tail "${PACKAGE_PATH}"/emqx/log/emqx.log.1 && exit 1 )
if ! "${PACKAGE_PATH}"/emqx/bin/emqx start; then
cat "${PACKAGE_PATH}"/emqx/log/erlang.log.1 || true
cat "${PACKAGE_PATH}"/emqx/log/emqx.log.1 || true
exit 1
fi
IDLE_TIME=0
while ! "${PACKAGE_PATH}"/emqx/bin/emqx_ctl status | grep -qE 'Node\s.*@.*\sis\sstarted'
do
@ -60,7 +90,6 @@ emqx_test(){
rm -rf "${PACKAGE_PATH}"/emqx
;;
"deb")
packagename=$(basename "${PACKAGE_PATH}/${EMQX_NAME}"-*.deb)
dpkg -i "${PACKAGE_PATH}/${packagename}"
if [ "$(dpkg -l |grep emqx |awk '{print $1}')" != "ii" ]
then
@ -72,14 +101,14 @@ emqx_test(){
running_test
echo "running ${packagename} stop"
dpkg -r "${EMQX_NAME}"
dpkg -r "${PROFILE}"
if [ "$(dpkg -l |grep emqx |awk '{print $1}')" != "rc" ]
then
echo "package remove error"
exit 1
fi
dpkg -P "${EMQX_NAME}"
dpkg -P "${PROFILE}"
if dpkg -l |grep -q emqx
then
echo "package uninstall error"
@ -87,9 +116,21 @@ emqx_test(){
fi
;;
"rpm")
packagename=$(basename "${PACKAGE_PATH}/${EMQX_NAME}"-*.rpm)
rpm -ivh "${PACKAGE_PATH}/${packagename}"
if ! rpm -q emqx | grep -q emqx; then
# yum wants python2
if [[ "${SYSTEM:-}" == "amzn2" ]]; then
alternatives --list | grep python && alternatives --set python /usr/bin/python2
fi
YUM_RES="$(yum install -y "${PACKAGE_PATH}/${packagename}"| tee /dev/null)"
if [[ $YUM_RES =~ "Failed" ]]; then
echo "yum install failed"
exit 1
fi
# restore python3
if [[ "${SYSTEM:-}" == "amzn2" ]]; then
alternatives --list | grep python && alternatives --set python /usr/bin/python3
fi
if ! rpm -q "${PROFILE}" | grep -q "${PROFILE}"; then
echo "package install error"
exit 1
fi
@ -98,15 +139,13 @@ emqx_test(){
running_test
echo "running ${packagename} stop"
rpm -e "${EMQX_NAME}"
rpm -e "${PROFILE}"
if [ "$(rpm -q emqx)" != "package emqx is not installed" ];then
echo "package uninstall error"
exit 1
fi
;;
esac
done
}
running_test(){
@ -114,7 +153,11 @@ running_test(){
EMQX_MQTT__MAX_TOPIC_ALIAS=10
sed -i '/emqx_telemetry/d' /var/lib/emqx/loaded_plugins
emqx start || ( tail /var/log/emqx/emqx.log.1 && exit 1 )
if ! emqx start; then
cat /var/log/emqx/erlang.log.1 || true
cat /var/log/emqx/emqx.log.1 || true
exit 1
fi
IDLE_TIME=0
while ! emqx_ctl status | grep -qE 'Node\s.*@.*\sis\sstarted'
do
@ -129,45 +172,47 @@ running_test(){
pytest -v /paho-mqtt-testing/interoperability/test_client/V5/test_connect.py::test_basic
# shellcheck disable=SC2009 # pgrep does not support Extended Regular Expressions
emqx stop || kill "$(ps -ef | grep -E '\-progname\s.+emqx\s' |awk '{print $2}')"
if [ "$(sed -n '/^ID=/p' /etc/os-release | sed -r 's/ID=(.*)/\1/g' | sed 's/"//g')" = ubuntu ] \
|| [ "$(sed -n '/^ID=/p' /etc/os-release | sed -r 's/ID=(.*)/\1/g' | sed 's/"//g')" = debian ] ;then
service emqx start || ( tail /var/log/emqx/emqx.log.1 && exit 1 )
IDLE_TIME=0
while ! emqx_ctl status | grep -E 'Node\s.*@.*\sis\sstarted'
do
if [ $IDLE_TIME -gt 10 ]
then
echo "emqx service error"
exit 1
fi
sleep 10
IDLE_TIME=$((IDLE_TIME+1))
done
service emqx stop
fi
}
relup_test(){
TARGET_VERSION="$("$CODE_PATH"/pkg-vsn.sh)"
if [ -d "${RELUP_PACKAGE_PATH}" ];then
if [ ! -d "${RELUP_PACKAGE_PATH}" ];then
return 0
fi
cd "${RELUP_PACKAGE_PATH}"
find . -maxdepth 1 -name "${EMQX_NAME}-*-${ARCH}.zip" |
while read -r pkg; do
packagename=$(basename "${pkg}")
unzip "$packagename"
./emqx/bin/emqx start || ( tail emqx/log/emqx.log.1 && exit 1 )
unzip -q "$packagename"
if ! ./emqx/bin/emqx start; then
cat emqx/log/erlang.log.1 || true
cat emqx/log/emqx.log.1 || true
exit 1
fi
./emqx/bin/emqx_ctl status
./emqx/bin/emqx versions
cp "${PACKAGE_PATH}/${EMQX_NAME}"-*-"${TARGET_VERSION}-${ARCH}".zip ./emqx/releases
OldVsn="$(./emqx/bin/emqx eval 'Versions=[{S, V} || {_,V,_, S} <- release_handler:which_releases()],
Current = proplists:get_value(current, Versions, proplists:get_value(permanent, Versions)),
io:format("~s", [Current])')"
cp "${PACKAGE_PATH}/${PROFILE}-${TARGET_VERSION}"-*.zip ./emqx/releases/
./emqx/bin/emqx install "${TARGET_VERSION}"
[ "$(./emqx/bin/emqx versions |grep permanent | awk '{print $2}')" = "${TARGET_VERSION}" ] || exit 1
export EMQX_WAIT_FOR_STOP=300
./emqx/bin/emqx_ctl status
./emqx/bin/emqx stop
rm -rf emqx
done
# also test remove old rel
./emqx/bin/emqx uninstall "$OldVsn"
# check emqx still runs
./emqx/bin/emqx ping
if ! ./emqx/bin/emqx stop; then
cat emqx/log/erlang.log.1 || true
cat emqx/log/emqx.log.1 || true
echo "failed to stop emqx"
exit 1
fi
rm -rf emqx
done < <(find . -maxdepth 1 -name "${OLD_PACKAGE_PATTERN}.zip")
}
emqx_prepare

View File

@ -1,5 +1,5 @@
EMQX_AUTH__LDAP__SERVERS=ldap_server
EMQX_AUTH__MONGO__SERVER=mongo_server:27017
EMQX_AUTH__MONGO__SERVER=toxiproxy:27017
EMQX_AUTH__MYSQL__SERVER=mysql_server:3306
EMQX_AUTH__MYSQL__USERNAME=root
EMQX_AUTH__MYSQL__PASSWORD=public

View File

@ -0,0 +1,99 @@
version: '3.9'
services:
haproxy:
container_name: haproxy
image: haproxy:2.3
depends_on:
- emqx1
- emqx2
volumes:
- ./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
- ../../etc/certs:/usr/local/etc/haproxy/certs
ports:
- "18083:18083"
# - "1883:1883"
# - "8883:8883"
# - "8083:8083"
# - "5683:5683/udp"
# - "9999:9999"
# - "8084:8084"
networks:
- emqx_bridge
working_dir: /usr/local/etc/haproxy
command:
- bash
- -c
- |
cat /usr/local/etc/haproxy/certs/cert.pem /usr/local/etc/haproxy/certs/key.pem > /usr/local/etc/haproxy/certs/emqx.pem
haproxy -f /usr/local/etc/haproxy/haproxy.cfg
emqx1:
restart: always
container_name: node1.emqx.io
image: $TARGET:$EMQX_TAG
env_file:
- conf.cluster.env
volumes:
- etc:/opt/emqx/etc
environment:
- "EMQX_HOST=node1.emqx.io"
ports:
- "11881:18083"
# - "1883:1883"
command:
- /bin/sh
- -c
- |
sed -i "s 127.0.0.1 $$(ip route show |grep "link" |awk '{print $$1}') g" /opt/emqx/etc/acl.conf
sed -i '/emqx_telemetry/d' /opt/emqx/data/loaded_plugins
/opt/emqx/bin/emqx foreground
healthcheck:
test: ["CMD", "/opt/emqx/bin/emqx_ctl", "status"]
interval: 5s
timeout: 25s
retries: 5
networks:
emqx_bridge:
aliases:
- node1.emqx.io
emqx2:
restart: always
container_name: node2.emqx.io
image: $TARGET:$EMQX_TAG
env_file:
- conf.cluster.env
volumes:
- etc:/opt/emqx/etc
environment:
- "EMQX_HOST=node2.emqx.io"
ports:
- "11882:18083"
command:
- /bin/sh
- -c
- |
sed -i "s 127.0.0.1 $$(ip route show |grep "link" |awk '{print $$1}') g" /opt/emqx/etc/acl.conf
sed -i '/emqx_telemetry/d' /opt/emqx/data/loaded_plugins
/opt/emqx/bin/emqx foreground
healthcheck:
test: ["CMD", "/opt/emqx/bin/emqx", "ping"]
interval: 5s
timeout: 25s
retries: 5
networks:
emqx_bridge:
aliases:
- node2.emqx.io
volumes:
etc:
networks:
emqx_bridge:
driver: bridge
name: emqx_bridge
ipam:
driver: default
config:
- subnet: 172.100.239.0/24
gateway: 172.100.239.1

View File

@ -27,10 +27,13 @@ services:
haproxy -f /usr/local/etc/haproxy/haproxy.cfg
emqx1:
restart: always
container_name: node1.emqx.io
image: $TARGET:$EMQX_TAG
env_file:
- conf.cluster.env
volumes:
- ../../:/src/
environment:
- "EMQX_HOST=node1.emqx.io"
command:
@ -51,10 +54,13 @@ services:
- node1.emqx.io
emqx2:
restart: always
container_name: node2.emqx.io
image: $TARGET:$EMQX_TAG
env_file:
- conf.cluster.env
volumes:
- ../../:/src/
environment:
- "EMQX_HOST=node2.emqx.io"
command:

View File

@ -0,0 +1,10 @@
version: '3.9'
services:
web_server:
container_name: Tomcat
build:
context: ./http-service
image: web-server
networks:
- emqx_bridge

View File

@ -7,6 +7,8 @@ services:
restart: always
environment:
MONGO_INITDB_DATABASE: mqtt
expose:
- 27017
networks:
- emqx_bridge
command:

View File

@ -0,0 +1,19 @@
version: '3.9'
services:
toxiproxy:
container_name: toxiproxy
image: ghcr.io/shopify/toxiproxy:2.5.0
restart: always
networks:
- emqx_bridge
volumes:
- "./toxiproxy.json:/config/toxiproxy.json"
ports:
- 8474:8474
- 27011:27011
- 27016:27016
- 27017:27017
command:
- "-host=0.0.0.0"
- "-config=/config/toxiproxy.json"

View File

@ -3,7 +3,7 @@ version: '3.9'
services:
erlang:
container_name: erlang
image: emqx/build-env:erl23.2.7.2-emqx-2-ubuntu20.04
image: ghcr.io/emqx/emqx-builder/4.4-20:24.3.4.2-1-ubuntu20.04
env_file:
- conf.env
environment:

View File

@ -0,0 +1,15 @@
FROM tomcat:10.0.5
RUN wget https://downloads.apache.org/maven/maven-3/3.9.3/binaries/apache-maven-3.9.3-bin.zip \
&& unzip -q apache-maven-3.9.3-bin.zip \
&& mv apache-maven-3.9.3 /opt/apache-maven-3.9.3/ \
&& ln -s /opt/apache-maven-3.9.3/ /opt/maven
ENV M2_HOME=/opt/maven
ENV M2=$M2_HOME/bin
ENV PATH=$M2:$PATH
COPY ./web-server /code
WORKDIR /code
RUN mvn package -Dmaven.skip.test=true
RUN mv ./target/emqx-web-0.0.1.war /usr/local/tomcat/webapps/emqx-web.war
EXPOSE 8080
CMD ["/usr/local/tomcat/bin/catalina.sh","run"]

View File

@ -0,0 +1,65 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>emqx-web</groupId>
<artifactId>emqx-web</artifactId>
<version>0.0.1</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
<dependency>
<groupId>commons-dbutils</groupId>
<artifactId>commons-dbutils</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/reousrce</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,54 @@
package com.emqx.dao;
import java.io.IOException;
import java.sql.SQLException;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.ScalarHandler;
import com.emqx.util.EmqxDatabaseUtil;
public class AuthDAO {
public String getUserName(String userName) throws IOException, SQLException {
QueryRunner runner = new QueryRunner(EmqxDatabaseUtil.getDataSource());
String sql = "select password from http_user where username='"+userName+"'";
String password =runner.query(sql, new ScalarHandler<String>());
return password;
}
public String getClient(String clientid) throws IOException, SQLException {
QueryRunner runner = new QueryRunner(EmqxDatabaseUtil.getDataSource());
String sql = "select password from http_user where clientid='"+clientid+"'";
String password =runner.query(sql, new ScalarHandler<String>());
return password;
}
public String getUserAccess(String userName) throws IOException, SQLException {
QueryRunner runner = new QueryRunner(EmqxDatabaseUtil.getDataSource());
String sql = "select access from http_acl where username='"+userName+"'";
String access =runner.query(sql, new ScalarHandler<String>());
return access;
}
public String getUserTopic(String userName) throws IOException, SQLException {
QueryRunner runner = new QueryRunner(EmqxDatabaseUtil.getDataSource());
String sql = "select topic from http_acl where username='"+userName+"'";
String topic =runner.query(sql, new ScalarHandler<String>());
return topic;
}
public String getClientAccess(String clientid) throws IOException, SQLException {
QueryRunner runner = new QueryRunner(EmqxDatabaseUtil.getDataSource());
String sql = "select access from http_acl where clientid='"+clientid+"'";
String access =runner.query(sql, new ScalarHandler<String>());
return access;
}
public String getClientTopic(String clientid) throws IOException, SQLException {
QueryRunner runner = new QueryRunner(EmqxDatabaseUtil.getDataSource());
String sql = "select topic from http_acl where clientid='"+clientid+"'";
String topic =runner.query(sql, new ScalarHandler<String>());
return topic;
}
}

View File

@ -0,0 +1,45 @@
package com.emqx.dao;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Properties;
import org.apache.commons.dbcp.BasicDataSource;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.ColumnListHandler;
import org.apache.commons.dbutils.handlers.ScalarHandler;
import org.apache.commons.dbutils.handlers.columns.StringColumnHandler;
public class DBUtilsTest {
public static void main(String args[]) throws FileNotFoundException, IOException, SQLException {
Properties property = new Properties();//流文件
property.load(DBUtilsTest.class.getClassLoader().getResourceAsStream("database.properties"));
BasicDataSource dataSource = new BasicDataSource();
dataSource.setDriverClassName(property.getProperty("jdbc.driver"));
dataSource.setUrl(property.getProperty("jdbc.url"));
dataSource.setUsername(property.getProperty("jdbc.username"));
dataSource.setPassword(property.getProperty("jdbc.password"));
// 初始化连接数 if(initialSize!=null)
//dataSource.setInitialSize(Integer.parseInt(initialSize));
// 最小空闲连接 if(minIdle!=null)
//dataSource.setMinIdle(Integer.parseInt(minIdle));
// 最大空闲连接 if(maxIdle!=null)
//dataSource.setMaxIdle(Integer.parseInt(maxIdle));
QueryRunner runner = new QueryRunner(dataSource);
String sql="select username from mqtt_user where id=1";
String result = runner.query(sql, new ScalarHandler<String>());
System.out.println(result);
}
}

View File

@ -0,0 +1,103 @@
package com.emqx.servlet;
import java.io.IOException;
import java.sql.SQLException;
import com.emqx.dao.AuthDAO;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
public class AclServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
// TODO Auto-generated method stub
doPost(req, resp);
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String clientid = req.getParameter("clientid");
String username = req.getParameter("username");
String access = req.getParameter("access");
String topic = req.getParameter("topic");
//String password = req.getParameter("password");
//step0: password is not null, or not pass.
AuthDAO dao = new AuthDAO();
try {
//step1: check username access&topic
if(username != null) {
String access_1 = dao.getUserAccess(username);
String topic_1 = dao.getUserTopic(username);
if(access.equals(access_1)) {
if(topic.equals(topic_1)) {
resp.setStatus(200);
}
else {
if(clientid != null){
String access_2 = dao.getClientAccess(clientid);
String topic_2 = dao.getClientTopic(clientid);
if(access.equals(access_2)) {
if(topic.equals(topic_2)) {
resp.setStatus(200);
}
else {
resp.setStatus(400);
}
}else {
resp.setStatus(400);
}
}else {
resp.setStatus(400);
}
}
}else {//step2.1: username password is not match, then check clientid password
if(clientid != null){
String access_3 = dao.getClientAccess(clientid);
String topic_3 = dao.getClientTopic(clientid);
if(access.equals(access_3)) {
if(topic.equals(topic_3)) {
resp.setStatus(200);
}
else {
resp.setStatus(400);
}
}else {
resp.setStatus(400);
}
}else {
resp.setStatus(400);
}
}
}else {//step2.2: username is null, then check clientid password
if(clientid != null){
String access_4 = dao.getClientAccess(clientid);
String topic_4 = dao.getClientTopic(clientid);
if(access.equals(access_4)) {
if(topic.equals(topic_4)) {
resp.setStatus(200);
}
else {
resp.setStatus(400);
}
}else {
resp.setStatus(400);
}
}else {
resp.setStatus(400);
}
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,72 @@
package com.emqx.servlet;
import java.io.IOException;
import java.sql.SQLException;
import com.emqx.dao.AuthDAO;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
public class AuthServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
// TODO Auto-generated method stub
doPost(req, resp);
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String clientid = req.getParameter("clientid");
String username =req.getParameter("username");
String password = req.getParameter("password");
//step0: password is not null, or not pass.
if(password == null) {
resp.setStatus(400);
return;
}
AuthDAO dao = new AuthDAO();
try {
//step1: check username password
if(username != null) {
String password_d = dao.getUserName(username);
if(password.equals(password_d)) {
resp.setStatus(200);
//200
}else {//step2.1: username password is not match, then check clientid password
if(clientid != null){
String password_c = dao.getClient(clientid);
if(password.equals(password_c)) {
resp.setStatus(200);
}else {
resp.setStatus(400);
}
}else {
resp.setStatus(400);
}
}
}else {//step2.2: username is null, then check clientid password
if(clientid != null){
String password_c = dao.getClient(clientid);
if(password.equals(password_c)) {
resp.setStatus(200);
}else {
resp.setStatus(400);
}
}else {
resp.setStatus(400);
}
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,27 @@
package com.emqx.util;
import java.io.IOException;
import java.util.Properties;
import javax.sql.DataSource;
import org.apache.commons.dbcp.BasicDataSource;
import com.emqx.dao.DBUtilsTest;
public class EmqxDatabaseUtil {
public static DataSource getDataSource() throws IOException {
Properties property = new Properties();// 流文件
property.load(EmqxDatabaseUtil.class.getClassLoader().getResourceAsStream("database.properties"));
BasicDataSource dataSource = new BasicDataSource();
dataSource.setDriverClassName(property.getProperty("jdbc.driver"));
dataSource.setUrl(property.getProperty("jdbc.url"));
dataSource.setUsername(property.getProperty("jdbc.username"));
dataSource.setPassword(property.getProperty("jdbc.password"));
return dataSource;
}
}

View File

@ -0,0 +1,4 @@
jdbc.driver= com.mysql.jdbc.Driver
jdbc.url= jdbc:mysql://mysql_server:3306/mqtt
jdbc.username= root
jdbc.password= public

View File

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://JAVA.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>emqx-web</display-name>
<servlet>
<servlet-name>Auth</servlet-name>
<servlet-class>com.emqx.servlet.AuthServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Acl</servlet-name>
<servlet-class>com.emqx.servlet.AclServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Auth</servlet-name>
<url-pattern>/auth</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Acl</servlet-name>
<url-pattern>/acl</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>love</title>
</head>
<body>
It's lucky, jiabanxiang.
</body>
</html>

View File

@ -1,4 +1,4 @@
FROM buildpack-deps:stretch
FROM buildpack-deps:stable
ARG LDAP_TAG=2.4.50

View File

@ -10,7 +10,7 @@ LB="haproxy"
apk update && apk add git curl
git clone -b develop-4.0 https://github.com/emqx/paho.mqtt.testing.git /paho.mqtt.testing
pip install pytest
pip install pytest==6.2.5
pytest -v /paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host "$LB"
RESULT=$?

View File

@ -0,0 +1,44 @@
[
{
"name": "mongo_single",
"listen": "0.0.0.0:27017",
"upstream": "mongo:27017",
"enabled": true
},
{
"name": "mongo_rs1",
"listen": "0.0.0.0:27011",
"upstream": "mongo_rs1:27017",
"enabled": true
},
{
"name": "mongo_rs2",
"listen": "0.0.0.0:27012",
"upstream": "mongo_rs2:27017",
"enabled": true
},
{
"name": "mongo_rs3",
"listen": "0.0.0.0:27013",
"upstream": "mongo_rs3:27017",
"enabled": true
},
{
"name": "mongo_sharded1",
"listen": "0.0.0.0:27014",
"upstream": "mongosharded1:27017",
"enabled": true
},
{
"name": "mongo_sharded2",
"listen": "0.0.0.0:27015",
"upstream": "mongosharded2:27017",
"enabled": true
},
{
"name": "mongo_sharded3",
"listen": "0.0.0.0:27016",
"upstream": "mongosharded3:27017",
"enabled": true
}
]

View File

@ -1,7 +1,7 @@
{erl_opts, [debug_info]}.
{deps,
[
{minirest, {git, "https://github.com/emqx/minirest.git", {tag, "0.3.5"}}}
{minirest, {git, "https://github.com/emqx/minirest.git", {tag, "0.3.6"}}}
]}.
{shell, [

View File

@ -0,0 +1,44 @@
#!/bin/bash
USAGE="$0 profile vsn old_vsn package_path"
EXAMPLE="$0 emqx 4.3.8-b3bb6075 v4.3.2 /home/alice/relup_dubug/downloaded_packages"
if [[ $# -ne 4 ]]; then
echo "$USAGE"
echo "$EXAMPLE"
exit 1
fi
set -ex
PROFILE="$1"
VSN="$2"
OLD_VSN="$3"
PACKAGE_PATH="$4"
FROM_OTP_VSN="${5:-24.3.4.2-1}"
TO_OTP_VSN="${6:-24.3.4.2-1}"
TEMPDIR=$(mktemp -d)
trap '{ rm -rf -- "$TEMPDIR"; }' EXIT
git clone --branch=master "https://github.com/terry-xiaoyu/one_more_emqx.git" "$TEMPDIR/one_more_emqx"
cp -r "$PACKAGE_PATH" "$TEMPDIR/packages"
cp relup.lux "$TEMPDIR/"
cp -r http_server "$TEMPDIR/http_server"
exec docker run \
-v "$TEMPDIR:/relup_test" \
-w "/relup_test" \
-e REBAR_COLOR=none \
-it emqx/relup-test-env:erl23.2.7.2-emqx-3-ubuntu20.04 \
lux \
--progress verbose \
--case_timeout infinity \
--var PROFILE="$PROFILE" \
--var PACKAGE_PATH="/relup_test/packages" \
--var ONE_MORE_EMQX_PATH="/relup_test/one_more_emqx" \
--var VSN="$VSN" \
--var OLD_VSN="$OLD_VSN" \
--var FROM_OTP_VSN="$FROM_OTP_VSN" \
--var TO_OTP_VSN="$TO_OTP_VSN" \
relup.lux

View File

@ -1,15 +1,14 @@
[config var=PROFILE]
[config var=PACKAGE_PATH]
[config var=BENCH_PATH]
[config var=ONE_MORE_EMQX_PATH]
[config var=VSN]
[config var=OLD_VSNS]
[config var=OLD_VSN]
[config var=FROM_OTP_VSN]
[config var=TO_OTP_VSN]
[config shell_cmd=/bin/bash]
[config timeout=600000]
[loop old_vsn $OLD_VSNS]
[shell http_server]
!cd http_server
!rebar3 shell
@ -21,29 +20,30 @@
?>
[shell emqx]
!OLD_VSN=$(echo $OLD_VSN | sed -r 's/[v|e]//g')
!cd $PACKAGE_PATH
!unzip -q -o $PROFILE-ubuntu20.04-$(echo $old_vsn | sed -r 's/[v|e]//g')-amd64.zip
!unzip -q -o $PROFILE-$(echo $OLD_VSN | sed -r 's/[v|e]//g')-otp${FROM_OTP_VSN}-ubuntu20.04-amd64.zip
?SH-PROMPT
!cd emqx
!sed -i 's|listener.wss.external[ \t]*=.*|listener.wss.external = 8085|g' etc/emqx.conf
!sed -i '/emqx_telemetry/d' data/loaded_plugins
!export EMQX_LOG__LEVEL=debug
!./bin/emqx start
?EMQ X .* is started successfully!
?EMQ.* is started successfully!
?SH-PROMPT
[shell emqx2]
!OLD_VSN=$(echo $OLD_VSN | sed -r 's/[v|e]//g')
!cd $PACKAGE_PATH
!cp -f $ONE_MORE_EMQX_PATH/one_more_$(echo $PROFILE | sed 's/-/_/g').sh .
!./one_more_$(echo $PROFILE | sed 's/-/_/g').sh emqx2
?SH-PROMPT
!cd emqx2
!sed -i '/emqx_telemetry/d' data/loaded_plugins
!export EMQX_LOG__LEVEL=debug
!./bin/emqx start
?EMQ X (.*) is started successfully!
?EMQ.* is started successfully!
?SH-PROMPT
!./bin/emqx_ctl cluster join emqx@127.0.0.1
@ -63,6 +63,8 @@
!./bin/emqx_ctl rules create 'SELECT * FROM "t/#"' '[{"name":"data_to_webserver", "params": {"$$resource": "resource:691c29ba"}}]'
?created
?SH-PROMPT
!sleep 5
?SH-PROMPT
[shell emqx]
!./bin/emqx_ctl resources list
@ -71,19 +73,41 @@
!./bin/emqx_ctl rules list
?691c29ba
?SH-PROMPT
!./bin/emqx_ctl broker metrics | grep "messages.publish"
???SH-PROMPT
[shell bench]
!cd $BENCH_PATH
!./emqtt_bench pub -c 10 -I 1000 -t t/%i -s 64 -L 300
???sent
!emqtt_bench pub -c 10 -I 1000 -t t/%i -s 64 -L 300
# e.g. Start with 20 workers, addrs pool size: 1 and req interval: 200 ms
?^Start
[shell emqx]
!echo "" > log/emqx.log.1
?SH-PROMPT
!cp -f ../$PROFILE-ubuntu20.04-$VSN-amd64.zip releases/
!cp -f ../$PROFILE-$VSN-otp${TO_OTP_VSN}-ubuntu20.04-amd64.zip releases/
## upgrade to the new version
!./bin/emqx install $VSN
?Made release permanent: "$VSN"
?SH-PROMPT
!./bin/emqx versions |grep permanent
?(.*)$VSN
?SH-PROMPT
## downgrade to the old version
!./bin/emqx install $${OLD_VSN}
?Made release permanent:.*
?SH-PROMPT
!./bin/emqx versions |grep permanent | grep -qs "$${OLD_VSN}"
?SH-PROMPT:
!echo ==$$?==
?^==0==
?SH-PROMPT:
## again, upgrade to the new version
!./bin/emqx install $VSN
?Made release permanent: "$VSN"
?SH-PROMPT
@ -99,12 +123,37 @@
"""
?SH-PROMPT
!./bin/emqx_ctl plugins list | grep --color=never emqx_management
?Plugin\(emqx_management.*active=true\)
?SH-PROMPT
[shell emqx2]
!echo "" > log/emqx.log.1
?SH-PROMPT
!cp -f ../$PROFILE-ubuntu20.04-$VSN-amd64.zip releases/
!cp -f ../$PROFILE-$VSN-otp${TO_OTP_VSN}-ubuntu20.04-amd64.zip releases/
## upgrade to the new version
!./bin/emqx install $VSN
?Made release permanent: "$VSN"
?SH-PROMPT
!./bin/emqx versions |grep permanent
?(.*)$VSN
?SH-PROMPT
## downgrade to the old version
!./bin/emqx install $${OLD_VSN}
?Made release permanent:.*
?SH-PROMPT
!./bin/emqx versions |grep permanent | grep -qs "$${OLD_VSN}"
?SH-PROMPT:
!echo ==$$?==
?^==0==
?SH-PROMPT:
## again, upgrade to the new version
!./bin/emqx install $VSN
?Made release permanent: "$VSN"
?SH-PROMPT
@ -120,11 +169,34 @@
"""
?SH-PROMPT
!./bin/emqx_ctl plugins list | grep --color=never emqx_management
?Plugin\(emqx_management.*active=true\)
?SH-PROMPT
[shell bench]
???publish complete
??SH-PROMPT:
?publish complete
?SH-PROMPT
!sleep 30
?SH-PROMPT
[shell emqx]
!./bin/emqx_ctl broker metrics | grep "messages.publish"
???SH-PROMPT
## We don't guarantee not to lose a single message!
## So even if we received 290~300 messages, we consider it as success
[shell bench]
!curl --user admin:public --silent --show-error http://localhost:8081/api/v4/rules | jq -M --raw-output ".data[0].metrics[] | select(.node==\"emqx@127.0.0.1\").matched"
?(29[0-9])|(300)
?SH-PROMPT
!curl --user admin:public --silent --show-error http://localhost:8081/api/v4/rules | jq -M --raw-output ".data[0].actions[0].metrics[] | select(.node==\"emqx@127.0.0.1\").success"
?(29[0-9])|(300)
?SH-PROMPT
## The /counter API is provided by .ci/fvt_test/http_server
!curl http://127.0.0.1:8080/counter
???{"data":300,"code":0}
?\{"data":(29[0-9])|(300),"code":0\}
?SH-PROMPT
[shell emqx2]
@ -158,8 +230,6 @@
!halt(3).
?SH-PROMPT:
[endloop]
[cleanup]
!echo ==$$?==
?==0==

1
.gitattributes vendored
View File

@ -1,3 +1,4 @@
build text eol=lf
* text=auto
*.* text eol=lf
*.jpg -text

39
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,39 @@
## Default
* @emqx/emqx-review-board
## MQTT & Core
/src/ @qzhuyan
/include/ @qzhuyan
/etc/ @qzhuyan
/test/ @qzhuyan
## CI
/.github/ @emqx/emqx-review-board @id
/.ci/ @emqx/emqx-review-board @id
/scripts/ @emqx/emqx-review-board @id
/build @emqx/emqx-review-board @id
/deploy/ @emqx/emqx-review-board @id
## Authentication & ACL
/apps/emqx_auth_*/ @savonarola
/apps/emqx_psk_file/ @savonarola
/apps/emqx_retainer/ @savonarola
/apps/emqx_sasl/ @savonarola
## Gateway
/apps/emqx_coap/ @HJianBo
/apps/emqx_exhook/ @HJianBo
/apps/emqx_exproto/ @HJianBo
/apps/emqx_lua_hook/ @HJianBo
/apps/emqx_lwm2m/ @HJianBo
## OPs
/apps/emqx_management/ @zhongwencool
/apps/emqx_recon/ @zhongwencool
/apps/emqx_plugin_libs/ @zhongwencool
/apps/emqx_prometheus/ @zhongwencool
/apps/emqx_recon/ @zhongwencool
## Data integration
/apps/emqx_rule_engine/ @thalesmg
/apps/emqx_web_hook/ @thalesmg

View File

@ -12,7 +12,7 @@ assignees: tigercl
**Environment**:
- EMQ X version (e.g. `emqx_ctl status`):
- EMQX version (e.g. `emqx_ctl status`):
- Hardware configuration (e.g. `lscpu`):
- OS (e.g. `cat /etc/os-release`):
- Kernel (e.g. `uname -a`):

View File

@ -0,0 +1,27 @@
name: 'Detect profiles'
outputs:
profiles:
description: 'Detected profiles'
value: ${{ steps.detect-profiles.outputs.profiles}}
runs:
using: composite
steps:
- id: detect-profiles
shell: bash
run: |
if [ -d source ]; then
## source code downloaded
cd source
fi
if [ ! -d .git ]; then
echo "Not git dir, $(pwd)"
exit 1
fi
if [ -f 'EMQX_ENTERPRISE' ]; then
echo "profiles=[\"emqx-ee\"]" >> $GITHUB_OUTPUT
echo "EMQX_NAME=emqx-ee" >> $GITHUB_ENV
else
echo "profiles=[\"emqx\", \"emqx-edge\"]" >> $GITHUB_OUTPUT
echo "EMQX_NAME=emqx" >> $GITHUB_ENV
fi

View File

@ -0,0 +1,124 @@
name: 'Create MacOS package'
inputs:
otp: # 24.2.1-1, 23.3.4.9-3
required: true
type: string
apple_id_password:
required: true
type: string
apple_developer_identity:
required: true
type: string
apple_developer_id_bundle:
required: true
type: string
apple_developer_id_bundle_password:
required: true
type: string
os:
required: false
type: string
default: macos-11
runs:
using: composite
steps:
- id: prepare
shell: bash
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_UPGRADE: 1
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
run: |
brew update
brew install curl zip unzip gnu-sed coreutils autoconf automake cmake unixodbc freetds openssl@1.1
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
echo "/usr/local/bin" >> $GITHUB_PATH
OTP_SOURCE_PATH="$HOME/src/otp-${{ inputs.otp }}"
OTP_INSTALL_PATH="$HOME/otp/${{ inputs.otp }}"
echo "OTP_SOURCE_PATH=$OTP_SOURCE_PATH" >> $GITHUB_OUTPUT
echo "OTP_INSTALL_PATH=$OTP_INSTALL_PATH" >> $GITHUB_OUTPUT
mkdir -p "$OTP_INSTALL_PATH"
- uses: actions/cache@v3
id: cache
with:
path: ${{ steps.prepare.outputs.OTP_INSTALL_PATH }}
key: otp-install-${{ inputs.otp }}-${{ inputs.os }}-static-ssl-disable-hipe-disable-jit
- name: build erlang
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
run: |
OTP_SOURCE_PATH="${{ steps.prepare.outputs.OTP_SOURCE_PATH }}"
OTP_INSTALL_PATH="${{ steps.prepare.outputs.OTP_INSTALL_PATH }}"
if [ -d "$OTP_SOURCE_PATH" ]; then
rm -rf "$OTP_SOURCE_PATH"
fi
git clone --depth 1 --branch OTP-${{ inputs.otp }} https://github.com/emqx/otp.git "$OTP_SOURCE_PATH"
cd "$OTP_SOURCE_PATH"
if [ "$(arch)" = arm64 ]; then
export LDFLAGS="-L$(brew --prefix unixodbc)/lib"
export CC="/usr/bin/gcc -I$(brew --prefix unixodbc)/include"
fi
./configure --disable-dynamic-ssl-lib --with-ssl=$(brew --prefix openssl@1.1) --disable-hipe --disable-jit --prefix="$OTP_INSTALL_PATH"
make -j$(nproc)
rm -rf "$OTP_INSTALL_PATH"
make install
if [ "$(arch)" = arm64 ]; then
unset LDFLAGS
unset CC
fi
- name: build
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_UPGRADE: 1
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
AUTO_INSTALL_BUILD_DEPS: 1
APPLE_SIGN_BINARIES: 1
APPLE_ID: developers@emqx.io
APPLE_TEAM_ID: 26N6HYJLZA
APPLE_ID_PASSWORD: ${{ inputs.apple_id_password }}
APPLE_DEVELOPER_IDENTITY: ${{ inputs.apple_developer_identity }}
APPLE_DEVELOPER_ID_BUNDLE: ${{ inputs.apple_developer_id_bundle }}
APPLE_DEVELOPER_ID_BUNDLE_PASSWORD: ${{ inputs.apple_developer_id_bundle_password }}
shell: bash
run: |
export PATH="${{ steps.prepare.outputs.OTP_INSTALL_PATH }}/bin:$PATH"
make ensure-rebar3
mkdir -p $HOME/bin
cp rebar3 $HOME/bin/rebar3
export PATH="$HOME/bin:$PATH"
make ${EMQX_NAME}-zip
- name: test
shell: bash
run: |
export PATH="${{ steps.prepare.outputs.OTP_INSTALL_PATH }}/bin:$PATH"
pkg_name=$(basename _packages/${EMQX_NAME}/${EMQX_NAME}-*.zip)
unzip -q _packages/${EMQX_NAME}/$pkg_name
# test with a spaces in path
mv ./emqx "./emqx home/"
cd "./emqx home/"
gsed -i '/emqx_telemetry/d' data/loaded_plugins
./bin/emqx start || cat log/erlang.log.1
ready='no'
for i in {1..10}; do
if curl -fs 127.0.0.1:18083 > /dev/null; then
ready='yes'
break
fi
sleep 1
done
if [ "$ready" != "yes" ]; then
echo "Timed out waiting for emqx to be ready"
cat log/erlang.log.1
exit 1
fi
./bin/emqx_ctl status
if ! ./bin/emqx stop; then
cat log/erlang.log.1 || true
cat log/emqx.log.1 || true
echo "failed to stop emqx"
exit 1
fi
cd ..
# test with a spaces in path
rm -rf "emqx home"

View File

@ -3,10 +3,51 @@ name: Check Apps Version
on: [pull_request]
jobs:
check_apps_version:
check_apps_version_4_x:
runs-on: ubuntu-20.04
strategy:
matrix:
erl_otp:
- 24.3.4.2-1
os:
- ubuntu20.04
container: ghcr.io/emqx/emqx-builder/4.4-24:${{ matrix.erl_otp }}-${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
fetch-depth: 0 # need full history
- name: fix-git-unsafe-repository
run: git config --global --add safe.directory /__w/emqx/emqx
- name: Check relup version DB
if: endsWith(github.repository, 'emqx')
run: |
PKG_VSN=$(./pkg-vsn.sh)
./scripts/relup-base-vsns.escript check-vsn-db $PKG_VSN ./data/relup-paths.eterm
- name: Check relup version DB (ee)
if: endsWith(github.repository, 'enterprise')
run: |
PKG_VSN=$(./pkg-vsn.sh)
./scripts/relup-base-vsns.escript check-vsn-db $PKG_VSN ./data/relup-paths-ee.eterm
- name: Check relup (ce)
if: endsWith(github.repository, 'emqx')
run: ./scripts/update-appup.sh emqx --check
- name: Check relup (ee)
if: endsWith(github.repository, 'enterprise')
run: ./scripts/update-appup.sh emqx-ee --check
- name: Check apps version
run: ./scripts/apps-version-check.sh
run: ./scripts/check-apps-vsn.sh
- name: Check chart versions
run: ./scripts/check-chart-vsn.sh
- uses: actions/upload-artifact@v3
if: failure()
with:
name: expected_appup_files
path: |
apps/*/src/*.appup.src
src/*.appup.src
lib-ce/*/src/*.appup.src
lib-ee/*/src/*.appup.src
retention-days: 1

View File

@ -1,205 +1,143 @@
name: Cross build packages
concurrency:
group: build-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- 'main-v4.**'
tags:
- v*
- e*
schedule:
- cron: '0 */6 * * *'
release:
types:
- published
workflow_dispatch:
jobs:
prepare:
# avoid building when syncing to ee repo
if: endsWith(github.repository, 'emqx')
runs-on: ubuntu-20.04
container: emqx/build-env:erl23.2.7.2-emqx-2-ubuntu20.04
# prepare source with any OTP version, no need for a matrix
container: ghcr.io/emqx/emqx-builder/4.4-20:24.3.4.2-1-ubuntu20.04
outputs:
profiles: ${{ steps.set_profile.outputs.profiles}}
old_vsns: ${{ steps.set_profile.outputs.old_vsns}}
profiles: ${{ steps.detect-profiles.outputs.profiles}}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: source
fetch-depth: 0
- name: set profile
id: set_profile
shell: bash
run: |
cd source
vsn="$(./pkg-vsn.sh)"
pre_vsn="$(echo $vsn | grep -oE '^[0-9]+.[0-9]')"
if make emqx-ee --dry-run > /dev/null 2>&1; then
old_vsns="$(git tag -l "e$pre_vsn.[0-9]" | xargs echo -n | sed "s/e$vsn//")"
echo "::set-output name=old_vsns::$old_vsns"
echo "::set-output name=profiles::[\"emqx-ee\"]"
else
old_vsns="$(git tag -l "v$pre_vsn.[0-9]" | xargs echo -n | sed "s/v$vsn//")"
echo "::set-output name=old_vsns::$old_vsns"
echo "::set-output name=profiles::[\"emqx\", \"emqx-edge\"]"
fi
fetch-depth: 0 # clone full git history
- name: detect-profiles
id: detect-profiles
uses: ./source/.github/actions/detect-profiles
- name: get_all_deps
if: endsWith(github.repository, 'emqx')
run: |
make -C source deps-all
zip -ryq source.zip source/* source/.[^.]*
- name: get_all_deps
- name: get_all_deps_ee
if: endsWith(github.repository, 'enterprise')
run: |
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
echo "${{ secrets.CI_GIT_TOKEN }}" >> source/scripts/git-token
make -C source deps-all
zip -ryq source.zip source/* source/.[^.]*
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: source
path: source.zip
windows:
runs-on: windows-2019
needs: prepare
if: endsWith(github.repository, 'emqx')
strategy:
fail-fast: false
matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
otp:
- 24.3.4.6
exclude:
- profile: emqx-edge
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: source
path: .
- name: unzip source code
run: Expand-Archive -Path source.zip -DestinationPath ./
- uses: ilammy/msvc-dev-cmd@v1
- uses: gleam-lang/setup-erlang@v1.1.0
id: install_erlang
- uses: emqx/setup-beam@v1.16.1-emqx
with:
otp-version: 23.2
otp-version: ${{ matrix.otp }}
- name: build
env:
PYTHON: python
DIAGNOSTIC: 1
PROFILE: emqx
SYSTEM: windows
working-directory: source
run: |
$env:PATH = "${{ steps.install_erlang.outputs.erlpath }}\bin;$env:PATH"
$version = $( "${{ github.ref }}" -replace "^(.*)/(.*)/" )
if ($version -match "^v[0-9]+\.[0-9]+(\.[0-9]+)?") {
$regex = "[0-9]+\.[0-9]+(-alpha|-beta|-rc)?\.[0-9]+"
$pkg_name = "${{ matrix.profile }}-windows-$([regex]::matches($version, $regex).value).zip"
}
else {
$pkg_name = "${{ matrix.profile }}-windows-$($version -replace '/').zip"
}
cd source
## We do not build/release bcrypt for windows package
Remove-Item -Recurse -Force -Path _build/default/lib/bcrypt/
if (Test-Path rebar.lock) {
Remove-Item -Force -Path rebar.lock
}
make ensure-rebar3
copy rebar3 "${{ steps.install_erlang.outputs.erlpath }}\bin"
ls "${{ steps.install_erlang.outputs.erlpath }}\bin"
rebar3 --help
make ${{ matrix.profile }}
mkdir -p _packages/${{ matrix.profile }}
Compress-Archive -Path _build/${{ matrix.profile }}/rel/emqx -DestinationPath _build/${{ matrix.profile }}/rel/$pkg_name
mv _build/${{ matrix.profile }}/rel/$pkg_name _packages/${{ matrix.profile }}
Get-FileHash -Path "_packages/${{ matrix.profile }}/$pkg_name" | Format-List | grep 'Hash' | awk '{print $3}' > _packages/${{ matrix.profile }}/$pkg_name.sha256
erl -eval "erlang:display(crypto:info_lib())" -s init stop
make ${{ matrix.profile }}-zip
- name: run emqx
timeout-minutes: 1
working-directory: source
run: |
cd source
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx start
Start-Sleep -s 5
echo "EMQX started"
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx stop
echo "EMQX stopped"
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx install
echo "EMQX installed"
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx uninstall
- uses: actions/upload-artifact@v1
if: startsWith(github.ref, 'refs/tags/')
echo "EMQX uninstaled"
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.profile }}
path: source/_packages/${{ matrix.profile }}/.
path: source/_packages/${{ matrix.profile }}/
mac:
runs-on: macos-10.15
needs: prepare
strategy:
fail-fast: false
matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
erl_otp:
- 23.2.7.2-emqx-2
exclude:
- profile: emqx-edge
otp:
- 24.3.4.2-1
os:
- macos-11
- macos-12-arm64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/download-artifact@v2
- uses: emqx/self-hosted-cleanup-action@v1.0.3
if: matrix.os == 'macos-12-arm64'
- uses: actions/download-artifact@v3
with:
name: source
path: .
- name: unzip source code
run: unzip -q source.zip
- name: prepare
run: |
brew update
brew install curl zip unzip gnu-sed kerl unixodbc freetds
echo "/usr/local/bin" >> $GITHUB_PATH
git config --global credential.helper store
- uses: actions/cache@v2
id: cache
ln -s . source
unzip -q source.zip
rm source source.zip
- uses: ./.github/actions/detect-profiles
- uses: ./.github/actions/package-macos
with:
path: ~/.kerl
key: erl${{ matrix.erl_otp }}-macos10.15
- name: build erlang
if: steps.cache.outputs.cache-hit != 'true'
timeout-minutes: 60
env:
KERL_BUILD_BACKEND: git
OTP_GITHUB_URL: https://github.com/emqx/otp
run: |
kerl update releases
kerl build ${{ matrix.erl_otp }}
kerl install ${{ matrix.erl_otp }} $HOME/.kerl/${{ matrix.erl_otp }}
- name: build
run: |
. $HOME/.kerl/${{ matrix.erl_otp }}/activate
make -C source ensure-rebar3
sudo cp source/rebar3 /usr/local/bin/rebar3
make -C source ${{ matrix.profile }}-zip
- name: test
run: |
cd source
pkg_name=$(basename _packages/${{ matrix.profile }}/${{ matrix.profile }}-*.zip)
unzip -q _packages/${{ matrix.profile }}/$pkg_name
gsed -i '/emqx_telemetry/d' ./emqx/data/loaded_plugins
./emqx/bin/emqx start || cat emqx/log/erlang.log.1
ready='no'
for i in {1..10}; do
if curl -fs 127.0.0.1:18083 > /dev/null; then
ready='yes'
break
fi
sleep 1
done
if [ "$ready" != "yes" ]; then
echo "Timed out waiting for emqx to be ready"
cat emqx/log/erlang.log.1
exit 1
fi
./emqx/bin/emqx_ctl status
./emqx/bin/emqx stop
rm -rf emqx
openssl dgst -sha256 ./_packages/${{ matrix.profile }}/$pkg_name | awk '{print $2}' > ./_packages/${{ matrix.profile }}/$pkg_name.sha256
- uses: actions/upload-artifact@v1
if: startsWith(github.ref, 'refs/tags/')
otp: ${{ matrix.otp }}
os: ${{ matrix.os }}
apple_id_password: ${{ secrets.APPLE_ID_PASSWORD }}
apple_developer_identity: ${{ secrets.APPLE_DEVELOPER_IDENTITY }}
apple_developer_id_bundle: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE }}
apple_developer_id_bundle_password: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE_PASSWORD }}
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.profile }}
path: source/_packages/${{ matrix.profile }}/.
name: ${{ env.EMQX_NAME }}
path: _packages/${{ env.EMQX_NAME }}/
linux:
runs-on: ubuntu-20.04
@ -207,179 +145,156 @@ jobs:
needs: prepare
strategy:
fail-fast: false
matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
package:
- zip
- pkg
otp:
- 24.3.4.2-1
arch:
- amd64
- arm64
os:
- ubuntu22.04
- ubuntu20.04
- ubuntu18.04
- ubuntu16.04
- debian11
- debian10
- debian9
# - opensuse
- centos8
- centos7
- centos6
- raspbian10
# - raspbian9
exclude:
- os: centos6
arch: arm64
- os: raspbian9
arch: amd64
- os: raspbian10
arch: amd64
- os: raspbian9
profile: emqx
- os: raspbian10
profile: emqx
- os: raspbian9
profile: emqx-ee
- os: raspbian10
profile: emqx-ee
- el8
- el7
- amzn2
defaults:
run:
shell: bash
steps:
- name: prepare docker
run: |
mkdir -p $HOME/.docker
echo '{ "experimental": "enabled" }' | tee $HOME/.docker/config.json
echo '{ "experimental": true, "storage-driver": "overlay2", "max-concurrent-downloads": 50, "max-concurrent-uploads": 50}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
docker info
docker buildx create --use --name mybuild
docker run --rm --privileged tonistiigi/binfmt --install all
- uses: actions/download-artifact@v2
- uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:latest
platforms: all
- uses: docker/setup-buildx-action@v2
- uses: actions/download-artifact@v3
with:
name: source
path: .
- name: unzip source code
run: unzip -q source.zip
- name: downloads old emqx zip packages
env:
PROFILE: ${{ matrix.profile }}
ARCH: ${{ matrix.arch }}
SYSTEM: ${{ matrix.os }}
OLD_VSNS: ${{ needs.prepare.outputs.old_vsns }}
run: |
set -e -x -u
broker=$PROFILE
if [ $PROFILE = "emqx" ];then
broker="emqx-ce"
fi
if [ ! -z "$(echo $SYSTEM | grep -oE 'raspbian')" ]; then
export ARCH="arm"
fi
mkdir -p source/_upgrade_base
cd source/_upgrade_base
old_vsns=($(echo $OLD_VSNS | tr ' ' ' '))
for tag in ${old_vsns[@]}; do
if [ ! -z "$(echo $(curl -I -m 10 -o /dev/null -s -w %{http_code} https://s3-us-west-2.amazonaws.com/packages.emqx/$broker/$tag/$PROFILE-$SYSTEM-${tag#[e|v]}-$ARCH.zip) | grep -oE "^[23]+")" ];then
wget --no-verbose https://s3-us-west-2.amazonaws.com/packages.emqx/$broker/$tag/$PROFILE-$SYSTEM-${tag#[e|v]}-$ARCH.zip
wget --no-verbose https://s3-us-west-2.amazonaws.com/packages.emqx/$broker/$tag/$PROFILE-$SYSTEM-${tag#[e|v]}-$ARCH.zip.sha256
echo "$(cat $PROFILE-$SYSTEM-${tag#[e|v]}-$ARCH.zip.sha256) $PROFILE-$SYSTEM-${tag#[e|v]}-$ARCH.zip" | sha256sum -c || exit 1
fi
done
- name: build emqx packages
env:
ERL_OTP: erl23.2.7.2-emqx-2
OTP: ${{ matrix.otp }}
PROFILE: ${{ matrix.profile }}
PACKAGE: ${{ matrix.package}}
ARCH: ${{ matrix.arch }}
SYSTEM: ${{ matrix.os }}
working-directory: source
run: |
set -e -u
cd source
docker buildx build --no-cache \
--platform=linux/$ARCH \
-t cross_build_emqx_for_$SYSTEM \
-f .ci/build_packages/Dockerfile \
--build-arg BUILD_FROM=emqx/build-env:$ERL_OTP-$SYSTEM \
--build-arg EMQX_NAME=$PROFILE \
--output type=tar,dest=/tmp/cross-build-$PROFILE-for-$SYSTEM.tar .
mkdir -p /tmp/packages/$PROFILE
tar -xvf /tmp/cross-build-$PROFILE-for-$SYSTEM.tar --wildcards emqx/_packages/$PROFILE/*
mv emqx/_packages/$PROFILE/* /tmp/packages/$PROFILE/
rm -rf /tmp/cross-build-$PROFILE-for-$SYSTEM.tar
docker rm -f $(docker ps -a -q)
docker volume prune -f
- name: create sha256
env:
PROFILE: ${{ matrix.profile}}
run: |
if [ -d /tmp/packages/$PROFILE ]; then
cd /tmp/packages/$PROFILE
for var in $(ls emqx-* ); do
bash -c "echo $(sha256sum $var | awk '{print $1}') > $var.sha256"
done
cd -
fi
- uses: actions/upload-artifact@v1
if: startsWith(github.ref, 'refs/tags/')
./scripts/buildx.sh \
--profile "${PROFILE}" \
--pkgtype "${PACKAGE}" \
--arch "${ARCH}" \
--builder "ghcr.io/emqx/emqx-builder/4.4-24:${OTP}-${SYSTEM}"
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.profile }}
path: /tmp/packages/${{ matrix.profile }}/.
path: source/_packages/${{ matrix.profile }}/
docker:
runs-on: ubuntu-20.04
needs: prepare
strategy:
fail-fast: false
matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
arch:
- [amd64, x86_64]
- [arm64v8, aarch64]
- [arm32v7, arm]
- [i386, i386]
- [s390x, s390x]
otp:
- 24.3.4.2-1
registry:
- 'docker.io'
- 'public.ecr.aws'
exclude:
# we don't have an aws ecr repo for enterprise and edge yet
- profile: emqx-edge
registry: 'public.ecr.aws'
- profile: emqx-ee
arch: [i386, i386]
- profile: emqx-ee
arch: [s390x, s390x]
registry: 'public.ecr.aws'
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: source
path: .
- name: unzip source code
run: unzip -q source.zip
- name: build emqx docker image
env:
PROFILE: ${{ matrix.profile }}
ARCH: ${{ matrix.arch[0] }}
QEMU_ARCH: ${{ matrix.arch[1] }}
run: |
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
cd source
sudo TARGET=emqx/$PROFILE ARCH=$ARCH QEMU_ARCH=$QEMU_ARCH make docker
cd _packages/$PROFILE && for var in $(ls ${PROFILE}-docker-* ); do sudo bash -c "echo $(sha256sum $var | awk '{print $1}') > $var.sha256"; done && cd -
- uses: actions/upload-artifact@v1
if: startsWith(github.ref, 'refs/tags/')
- uses: docker/setup-qemu-action@v2
with:
name: ${{ matrix.profile }}
path: source/_packages/${{ matrix.profile }}/.
delete-artifact:
runs-on: ubuntu-20.04
needs: [prepare, mac, linux, docker]
steps:
- uses: geekyeggo/delete-artifact@v1
image: tonistiigi/binfmt:latest
platforms: all
- uses: docker/setup-buildx-action@v2
- uses: aws-actions/configure-aws-credentials@v1-node16
if: matrix.registry == 'public.ecr.aws'
with:
name: source
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Docker login to aws ecr
if: matrix.registry == 'public.ecr.aws'
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
- uses: docker/login-action@v2
if: matrix.registry == 'docker.io'
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- uses: docker/metadata-action@v4
id: meta
with:
images: ${{ matrix.registry }}/${{ github.repository_owner }}/${{ matrix.profile }}
## only 5.0 is latest
flavor: |
latest=false # latest is now 5.0
tags: |
type=ref,event=branch
type=ref,event=pr
type=match,pattern=[v|e](.*),group=1
labels:
org.opencontainers.image.otp.version=${{ matrix.otp }}
- uses: docker/build-push-action@v3
if: matrix.profile != 'emqx-ee'
with:
## only push when stable tag and rc tag
push: ${{ contains(github.ref, 'tags') && !contains(github.ref_name, 'beta') && !contains(github.ref_name, 'alpha') }}
pull: true
no-cache: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-24:${{ matrix.otp }}-alpine3.15.1
RUN_FROM=alpine:3.15.1
EMQX_NAME=${{ matrix.profile }}
file: source/deploy/docker/Dockerfile
context: source
- uses: docker/build-push-action@v3
if: matrix.profile == 'emqx-ee'
with:
## only push when stable tag and rc tag
push: ${{ contains(github.ref, 'tags') && !contains(github.ref_name, 'beta') && !contains(github.ref_name, 'alpha') }}
pull: true
no-cache: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-24:${{ matrix.otp }}-alpine3.15.1
RUN_FROM=alpine:3.15.1
EMQX_NAME=${{ matrix.profile }}
file: source/deploy/docker/Dockerfile.enterprise
context: source
upload:
publish_artifacts:
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags/')
@ -387,106 +302,38 @@ jobs:
needs: [prepare, mac, linux, docker]
strategy:
fail-fast: false
matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
steps:
- uses: actions/checkout@v2
- name: get_version
run: |
echo 'version<<EOF' >> $GITHUB_ENV
echo ${{ github.ref }} | sed -r "s ^refs/heads/|^refs/tags/(.*) \1 g" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: ${{ matrix.profile }}
path: ./_packages/${{ matrix.profile }}
path: packages/${{ matrix.profile }}
- name: install dos2unix
run: sudo apt-get update && sudo apt install -y dos2unix
- name: get packages
run: |
set -e -u
cd _packages/${{ matrix.profile }}
cd packages/${{ matrix.profile }}
for var in $( ls |grep emqx |grep -v sha256); do
dos2unix $var.sha256
echo "$(cat $var.sha256) $var" | sha256sum -c || exit 1
done
cd -
- name: upload aws s3
- uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: upload to aws s3
run: |
set -e -u
if [ "${{ matrix.profile }}" == "emqx" ];then
broker="emqx-ce"
s3dir="emqx-ce"
else
broker=${{ matrix.profile }}
s3dir=${{ matrix.profile }}
fi
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set default.region ${{ secrets.AWS_DEFAULT_REGION }}
aws s3 cp --recursive _packages/${{ matrix.profile }} s3://${{ secrets.AWS_S3_BUCKET }}/$broker/${{ env.version }}
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_ID }} --paths "/$broker/${{ env.version }}/*"
- uses: Rory-Z/upload-release-asset@v1
if: github.event_name == 'release' && matrix.profile != 'emqx-ee'
with:
repo: emqx
path: "_packages/${{ matrix.profile }}/emqx-*"
token: ${{ github.token }}
- uses: Rory-Z/upload-release-asset@v1
if: github.event_name == 'release' && matrix.profile == 'emqx-ee'
with:
repo: emqx-enterprise
path: "_packages/${{ matrix.profile }}/emqx-*"
token: ${{ github.token }}
- name: update to emqx.io
if: github.event_name == 'release'
run: |
set -e -x -u
curl -w %{http_code} \
--insecure \
-H "Content-Type: application/json" \
-H "token: ${{ secrets.EMQX_IO_TOKEN }}" \
-X POST \
-d "{\"repo\":\"emqx/emqx\", \"tag\": \"${{ env.version }}\" }" \
${{ secrets.EMQX_IO_RELEASE_API }}
- name: push docker image to docker hub
if: github.event_name == 'release'
run: |
set -e -x -u
sudo make docker-prepare
cd _packages/${{ matrix.profile }} && for var in $(ls |grep docker |grep -v sha256); do unzip $var; sudo docker load < ${var%.*}; rm -f ${var%.*}; done && cd -
echo ${{ secrets.DOCKER_HUB_TOKEN }} |sudo docker login -u ${{ secrets.DOCKER_HUB_USER }} --password-stdin
sudo TARGET=emqx/${{ matrix.profile }} make docker-push
sudo TARGET=emqx/${{ matrix.profile }} make docker-manifest-list
- name: update repo.emqx.io
if: github.event_name == 'release' && endsWith(github.repository, 'enterprise') && matrix.profile == 'emqx-ee'
run: |
curl --silent --show-error \
-H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-X POST \
-d "{\"ref\":\"v1.0.1\",\"inputs\":{\"version\": \"${{ env.version }}\", \"emqx_ee\": \"true\"}}" \
"https://api.github.com/repos/emqx/emqx-ci-helper/actions/workflows/update_emqx_repos.yaml/dispatches"
- name: update repo.emqx.io
if: github.event_name == 'release' && endsWith(github.repository, 'emqx') && matrix.profile == 'emqx'
run: |
curl --silent --show-error \
-H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-X POST \
-d "{\"ref\":\"v1.0.1\",\"inputs\":{\"version\": \"${{ env.version }}\", \"emqx_ce\": \"true\"}}" \
"https://api.github.com/repos/emqx/emqx-ci-helper/actions/workflows/update_emqx_repos.yaml/dispatches"
- name: update homebrew packages
if: github.event_name == 'release' && endsWith(github.repository, 'emqx') && matrix.profile == 'emqx'
run: |
if [ -z $(echo $version | grep -oE "(alpha|beta|rc)\.[0-9]") ]; then
curl --silent --show-error \
-H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-X POST \
-d "{\"ref\":\"v1.0.1\",\"inputs\":{\"version\": \"${{ env.version }}\"}}" \
"https://api.github.com/repos/emqx/emqx-ci-helper/actions/workflows/update_emqx_homebrew.yaml/dispatches"
fi
- uses: geekyeggo/delete-artifact@v1
with:
name: ${{ matrix.profile }}
aws s3 cp --recursive packages/${{ matrix.profile }} s3://${{ secrets.AWS_S3_BUCKET }}/${s3dir}/${{ github.ref_name }}
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_ID }} --paths "/${s3dir}/${{ github.ref_name }}/*"

View File

@ -1,122 +1,242 @@
name: Build slim packages
concurrency:
group: slim-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
tags:
- v*
- e*
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
linux:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
erl_otp:
- erl23.2.7.2-emqx-2
otp:
- 24.3.4.2-1
os:
- ubuntu22.04
- ubuntu20.04
- centos7
- el7
runs-on:
- aws-amd64
- ubuntu-20.04
use-self-hosted:
- ${{ github.repository_owner == 'emqx' }}
exclude:
- runs-on: ubuntu-20.04
use-self-hosted: true
- runs-on: aws-amd64
use-self-hosted: false
container: emqx/build-env:${{ matrix.erl_otp }}-${{ matrix.os }}
container: ghcr.io/emqx/emqx-builder/4.4-24:${{ matrix.otp }}-${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: prepare
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v3
with:
fetch-depth: 0 # clone full git history
- name: fix-git-unsafe-repository
run: git config --global --add safe.directory /__w/emqx/emqx
- uses: ./.github/actions/detect-profiles
- name: ensure access to github
if: endsWith(github.repository, 'enterprise')
run: |
if make emqx-ee --dry-run > /dev/null 2>&1; then
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
echo "${{ secrets.CI_GIT_TOKEN }}" >> ./scripts/git-token
echo "EMQX_NAME=emqx-ee" >> $GITHUB_ENV
else
echo "EMQX_NAME=emqx" >> $GITHUB_ENV
fi
- uses: actions/cache@v3
with:
# dialyzer PLTs
path: ~/.cache/rebar3/
key: dialyzer-${{ matrix.otp }}
- name: make xref
run: make xref
- name: make dialyzer
run: make dialyzer
- name: build zip packages
run: make ${EMQX_NAME}-zip
- name: build deb/rpm packages
run: make ${EMQX_NAME}-pkg
- name: pakcages test
- uses: actions/upload-artifact@v3
if: failure()
with:
name: rebar3.crashdump
path: ./rebar3.crashdump
- name: packages test
run: |
export CODE_PATH=$GITHUB_WORKSPACE
.ci/build_packages/tests.sh
- uses: actions/upload-artifact@v2
export CODE_PATH="$GITHUB_WORKSPACE"
.ci/build_packages/tests.sh "${EMQX_NAME}" zip
.ci/build_packages/tests.sh "${EMQX_NAME}" pkg
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: _packages/**/*.zip
mac:
runs-on: macos-10.15
windows:
runs-on: windows-2019
if: endsWith(github.repository, 'emqx')
strategy:
fail-fast: false
matrix:
erl_otp:
- 23.2.7.2-emqx-2
profile:
- emqx
otp:
- 24.3.4.6
steps:
- uses: actions/checkout@v1
- name: prepare
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- uses: emqx/setup-beam@v1.16.1-emqx
with:
otp-version: ${{ matrix.otp }}
- name: build
env:
PYTHON: python
DIAGNOSTIC: 1
SYSTEM: windows
run: |
erl -eval "erlang:display(crypto:info_lib())" -s init stop
make ${{ matrix.profile }}-zip
- name: run emqx
timeout-minutes: 1
run: |
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx start
Start-Sleep -s 5
echo "EMQX started"
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx stop
echo "EMQX stopped"
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx install
echo "EMQX installed"
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx uninstall
echo "EMQX uninstaled"
mac:
strategy:
fail-fast: false
matrix:
otp:
- 24.3.4.2-1
os:
- macos-11
- macos-12-arm64
runs-on: ${{ matrix.os }}
steps:
- uses: emqx/self-hosted-cleanup-action@v1.0.3
if: matrix.os == 'macos-12-arm64'
- uses: actions/checkout@v3
with:
fetch-depth: 0 # clone full git history
- name: ensure access to github
if: endsWith(github.repository, 'enterprise')
run: |
if make emqx-ee --dry-run > /dev/null 2>&1; then
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
echo "${{ secrets.CI_GIT_TOKEN }}" >> ./scripts/git-token
echo "EMQX_NAME=emqx-ee" >> $GITHUB_ENV
else
echo "EMQX_NAME=emqx" >> $GITHUB_ENV
fi
- uses: ./.github/actions/detect-profiles
- uses: ./.github/actions/package-macos
with:
otp: ${{ matrix.otp }}
os: ${{ matrix.os }}
apple_id_password: ${{ secrets.APPLE_ID_PASSWORD }}
apple_developer_identity: ${{ secrets.APPLE_DEVELOPER_IDENTITY }}
apple_developer_id_bundle: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE }}
apple_developer_id_bundle_password: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE_PASSWORD }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: rebar3.crashdump
path: ./rebar3.crashdump
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: _packages/**/*.zip
docker:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
otp:
- 24.3.4.2-1
runs-on:
- aws-amd64
- ubuntu-22.04
use-self-hosted:
- ${{ github.repository_owner == 'emqx' }}
exclude:
- runs-on: ubuntu-22.04
use-self-hosted: true
- runs-on: aws-amd64
use-self-hosted: false
steps:
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v3
with:
fetch-depth: 0 # clone full git history
- name: fix-git-unsafe-repository
run: git config --global --add safe.directory /__w/emqx/emqx
- name: prepare
run: |
brew update
brew install curl zip unzip gnu-sed kerl unixodbc freetds
echo "/usr/local/bin" >> $GITHUB_PATH
if [ -f 'EMQX_ENTERPRISE' ]; then
EMQX_NAME=emqx-ee
else
EMQX_NAME=emqx
fi
EMQX_IMAGE_TAG=localhost:5000/${{ github.repository_owner }}/$EMQX_NAME
PKG_VSN=${PKG_VSN:-$(./pkg-vsn.sh $EMQX_NAME)}
echo "EMQX_NAME=$EMQX_NAME" >> $GITHUB_ENV
echo "PKG_VSN=$PKG_VSN" >> $GITHUB_ENV
echo "EMQX_IMAGE_TAG=$EMQX_IMAGE_TAG" >> $GITHUB_ENV
- name: ensure access to github
if: endsWith(github.repository, 'enterprise')
run: |
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
- uses: actions/cache@v2
id: cache
- uses: docker/setup-buildx-action@v2
- uses: docker/metadata-action@v4
id: meta
with:
path: ~/.kerl
key: erl${{ matrix.erl_otp }}-macos10.15
- name: build erlang
if: steps.cache.outputs.cache-hit != 'true'
timeout-minutes: 60
env:
KERL_BUILD_BACKEND: git
OTP_GITHUB_URL: https://github.com/emqx/otp
run: |
kerl update releases
kerl build ${{ matrix.erl_otp }}
kerl install ${{ matrix.erl_otp }} $HOME/.kerl/${{ matrix.erl_otp }}
- name: build
run: |
. $HOME/.kerl/${{ matrix.erl_otp }}/activate
make ensure-rebar3
sudo cp rebar3 /usr/local/bin/rebar3
make ${EMQX_NAME}-zip
- name: test
run: |
pkg_name=$(basename _packages/${EMQX_NAME}/emqx-*.zip)
unzip -q _packages/${EMQX_NAME}/$pkg_name
gsed -i '/emqx_telemetry/d' ./emqx/data/loaded_plugins
./emqx/bin/emqx start || cat emqx/log/erlang.log.1
ready='no'
for i in {1..10}; do
if curl -fs 127.0.0.1:18083 > /dev/null; then
ready='yes'
break
fi
sleep 1
done
if [ "$ready" != "yes" ]; then
echo "Timed out waiting for emqx to be ready"
cat emqx/log/erlang.log.1
exit 1
fi
./emqx/bin/emqx_ctl status
./emqx/bin/emqx stop
rm -rf emqx
- uses: actions/upload-artifact@v2
images: ${{ env.EMQX_IMAGE_TAG }}
flavor: |
latest=false
tags: |
type=ref,event=branch
type=ref,event=pr
type=match,pattern=[v|e](.*),group=1
labels:
org.opencontainers.image.otp.version=${{ matrix.otp }}
- uses: docker/build-push-action@v4
if: endsWith(github.repository, 'emqx')
with:
name: macos
path: _packages/**/*.zip
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-24:${{ matrix.otp }}-alpine3.15.1
RUN_FROM=alpine:3.15.1
EMQX_NAME=${{ env.EMQX_NAME }}
file: deploy/docker/Dockerfile
context: .
- uses: docker/build-push-action@v4
if: endsWith(github.repository, 'enterprise')
with:
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-24:${{ matrix.otp }}-alpine3.15.1
RUN_FROM=alpine:3.15.1
EMQX_NAME=${{ env.EMQX_NAME }}
file: deploy/docker/Dockerfile.enterprise
context: .
- name: export docker image
run: |
docker save ${{ steps.meta.outputs.tags }} | gzip > $EMQX_NAME-$PKG_VSN.tar.gz
- uses: actions/upload-artifact@v3
with:
name: "${{ env.EMQX_NAME }}-docker"
path: "${{ env.EMQX_NAME }}-${{ env.PKG_VSN }}.tar.gz"

View File

@ -5,9 +5,9 @@ on: [pull_request]
jobs:
check_deps_integrity:
runs-on: ubuntu-20.04
container: emqx/build-env:erl23.2.7.2-emqx-2-ubuntu20.04
container: ghcr.io/emqx/emqx-builder/4.4-24:24.3.4.2-1-ubuntu20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run check-deps-integrity.escript
run: ./scripts/check-deps-integrity.escript

View File

@ -1,16 +0,0 @@
name: Elvis Linter
on: [pull_request]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set git token
if: endsWith(github.repository, 'enterprise')
run: |
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
- run: |
./scripts/elvis-check.sh $GITHUB_BASE_REF

View File

@ -3,7 +3,6 @@ name: Sync to enterprise
on:
push:
branches:
- master
- main-v*
jobs:
@ -23,11 +22,7 @@ jobs:
id: create_pull_request
run: |
set -euo pipefail
if [ "$GITHUB_REF" = "refs/heads/master" ]; then
EE_REF="refs/heads/enterprise"
else
EE_REF="${GITHUB_REF}-enterprise"
fi
R=$(curl --silent --show-error \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
@ -35,7 +30,7 @@ jobs:
-d "{\"title\": \"Sync code from opensource $GITHUB_REF to entperprise $EE_REF\", \"head\": \"$GITHUB_REF\", \"base\":\"$EE_REF\"}" \
https://api.github.com/repos/${{ github.repository_owner }}/emqx-enterprise/pulls)
echo $R | jq
echo "::set-output name=url::$(echo $R | jq '.url')"
echo "url=$(echo $R | jq '.url')" >> $GITHUB_OUTPUT
- name: request reviewers for a pull request
if: steps.create_pull_request.outputs.url != 'null'
run: |

93
.github/workflows/release.yaml vendored Normal file
View File

@ -0,0 +1,93 @@
name: Upload release assets
on:
release:
types:
- published
jobs:
prepare:
runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-24:24.3.4.2-1-ubuntu20.04
outputs:
profiles: ${{ steps.detect-profiles.outputs.profiles}}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # clone full git history
- id: detect-profiles
uses: ./.github/actions/detect-profiles
upload:
runs-on: ubuntu-20.04
needs: prepare
strategy:
fail-fast: false
matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
steps:
- uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Get packages
run: |
if [ "${{ matrix.profile }}" == "emqx" ];then
s3dir="emqx-ce"
else
s3dir=${{ matrix.profile }}
fi
aws s3 cp --recursive s3://${{ secrets.AWS_S3_BUCKET }}/$s3dir/${{ github.ref_name }} packages
- uses: alexellis/upload-assets@0.4.0
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["packages/*"]'
- name: update to emqx.io
run: |
set -e -x -u
curl -w %{http_code} \
--insecure \
-H "Content-Type: application/json" \
-H "token: ${{ secrets.EMQX_IO_TOKEN }}" \
-X POST \
-d "{\"repo\":\"emqx/emqx\", \"tag\": \"${{ github.ref_name }}\" }" \
${{ secrets.EMQX_IO_RELEASE_API }}
- uses: actions/checkout@v3
with:
fetch-depth: 0 # clone full git history
- name: get version
id: version
run: echo "version=$(./pkg-vsn.sh)" >> $GITHUB_OUTPUT
- uses: emqx/push-helm-action@v1
if: github.event_name == 'release' && endsWith(github.repository, 'emqx') && matrix.profile == 'emqx'
with:
charts_dir: "${{ github.workspace }}/deploy/charts/emqx"
version: ${{ steps.version.outputs.version }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: "us-west-2"
aws_bucket_name: "repos-emqx-io"
- uses: emqx/push-helm-action@v1
if: github.event_name == 'release' && endsWith(github.repository, 'enterprise') && matrix.profile == 'emqx-ee'
with:
charts_dir: "${{ github.workspace }}/deploy/charts/emqx-ee"
version: ${{ steps.version.outputs.version }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: "us-west-2"
aws_bucket_name: "repos-emqx-io"
- name: update homebrew packages
if: github.event_name == 'release' && endsWith(github.repository, 'emqx') && matrix.profile == 'emqx'
run: |
if [ -z $(echo $version | grep -oE "(alpha|beta|rc)\.[0-9]") ]; then
curl --silent --show-error \
-H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-X POST \
-d "{\"ref\":\"v1.0.3\",\"inputs\":{\"version\": \"${{ github.ref_name }}\"}}" \
"https://api.github.com/repos/emqx/emqx-ci-helper/actions/workflows/update_emqx_homebrew.yaml/dispatches"
fi

View File

@ -0,0 +1,22 @@
name: ACL fix & migration integration tests
on: workflow_dispatch
jobs:
test:
runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-24:24.3.4.2-1-ubuntu20.04
strategy:
fail-fast: true
env:
BASE_VERSION: "4.3.0"
steps:
- uses: actions/checkout@v3
with:
path: emqx
- name: Prepare scripts
run: |
cp ./emqx/.ci/acl_migration_test/*.sh ./
- name: Run tests
run: |
./suite.sh emqx "$BASE_VERSION"

View File

@ -0,0 +1,475 @@
name: Integration Test Suites
on:
push:
tags:
- "v4.*"
pull_request:
branches:
- 'main-v4**'
- 'release-v4**'
jobs:
build:
runs-on: ubuntu-latest
outputs:
imgname: ${{ steps.prepare.outputs.imgname}}
version: ${{ steps.prepare.outputs.version}}
steps:
- name: download jmeter
id: dload_jmeter
timeout-minutes: 1
env:
JMETER_VERSION: 5.6
run: |
wget --no-verbose --no-check-certificate -O /tmp/apache-jmeter.tgz https://downloads.apache.org/jmeter/binaries/apache-jmeter-$JMETER_VERSION.tgz
- uses: actions/upload-artifact@v3
with:
name: apache-jmeter.tgz
path: /tmp/apache-jmeter.tgz
- uses: actions/checkout@v3
- uses: emqx/setup-beam@v1.16.1-emqx
with:
otp-version: 24.3.4.6
- name: prepare
id: prepare
run: |
if [ -f EMQX_ENTERPRISE ]; then
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
make deps-emqx-ee
make clean
echo "imgname=emqx-ee" >> $GITHUB_OUTPUT
echo "version=$(./pkg-vsn.sh)" >> $GITHUB_OUTPUT
else
make emqx-docker
echo "imgname=emqx" >> $GITHUB_OUTPUT
echo "version=$(./pkg-vsn.sh)" >> $GITHUB_OUTPUT
fi
- name: build docker image
run: |
make ${{ steps.prepare.outputs.imgname }}-docker
docker save emqx/${{ steps.prepare.outputs.imgname }}:${{ steps.prepare.outputs.version }} -o image.tar.gz
- uses: actions/upload-artifact@v3
with:
name: image
path: image.tar.gz
webhook:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
webhook_type:
- webhook_data_bridge
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: image
path: /tmp
- name: load docker image
run: |
docker load < /tmp/image.tar.gz
- name: docker compose up
timeout-minutes: 5
env:
TARGET: emqx/${{ needs.build.outputs.imgname }}
EMQX_TAG: ${{ needs.build.outputs.version }}
run: |
docker compose \
-f .ci/docker-compose-file/docker-compose-emqx-cluster.yaml \
up -d --build
- uses: actions/checkout@v3
with:
repository: emqx/emqx-svt-web-server
ref: web-server-1.0
path: emqx-svt-web-server
- uses: actions/download-artifact@v3
- name: run webserver in docker
run: |
cd ./emqx-svt-web-server/svtserver
mvn clean package
cd target
docker run --name webserver --network emqx_bridge -d -v $(pwd)/svtserver-0.0.1.jar:/webserver/svtserver-0.0.1.jar --workdir /webserver openjdk:8-jdk bash \
-c "java -jar svtserver-0.0.1.jar"
- name: wait docker compose up
timeout-minutes: 5
run: |
while [ "$(docker inspect -f '{{ .State.Health.Status}}' node1.emqx.io)" != "healthy" ] || [ "$(docker inspect -f '{{ .State.Health.Status}}' node2.emqx.io)" != "healthy" ]; do
echo "['$(date -u +"%y-%m-%dt%h:%m:%sz")']:waiting emqx";
sleep 5;
done
docker ps -a
echo HAPROXY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' haproxy) >> $GITHUB_ENV
echo WEB_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' webserver) >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
repository: emqx/emqx-fvt
ref: v1.6.0
path: scripts
- uses: actions/setup-java@v3
with:
java-version: '8.0.282' # The JDK version to make available on the path.
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64
distribution: 'zulu'
- uses: actions/download-artifact@v3
with:
name: apache-jmeter.tgz
path: /tmp
- name: install jmeter
timeout-minutes: 10
env:
JMETER_VERSION: 5.6
run: |
cd /tmp && tar -xvf apache-jmeter.tgz
echo "jmeter.save.saveservice.output_format=xml" >> /tmp/apache-jmeter-$JMETER_VERSION/user.properties
echo "jmeter.save.saveservice.response_data.on_error=true" >> /tmp/apache-jmeter-$JMETER_VERSION/user.properties
wget --no-verbose -O /tmp/apache-jmeter-$JMETER_VERSION/lib/ext/mqtt-xmeter-2.0.2-jar-with-dependencies.jar https://raw.githubusercontent.com/xmeter-net/mqtt-jmeter/master/Download/v2.0.2/mqtt-xmeter-2.0.2-jar-with-dependencies.jar
ln -s /tmp/apache-jmeter-$JMETER_VERSION /opt/jmeter
- name: run jmeter
run: |
JTL_FILE="jmeter_logs/webhook_${{ matrix.webhook_type }}.jtl"
if [ -e "$JTL_FILE" ]
then
echo > $JTL_FILE
fi
/opt/jmeter/bin/jmeter.sh \
-Jjmeter.save.saveservice.output_format=xml -n \
-t scripts/automate-test-suite/${{ matrix.webhook_type }}.jmx \
-Demqx_ip=$HAPROXY_IP \
-Dweb_ip=$WEB_IP \
-l $JTL_FILE \
-j jmeter_logs/logs/webhook_${{ matrix.webhook_type }}.log
- name: check logs
run: |
if cat $JTL_FILE | grep -e '<failure>true</failure>' > /dev/null 2>&1; then
echo "check logs filed"
exit 1
fi
- uses: actions/upload-artifact@v3
if: always()
with:
name: jmeter_logs
path: ./jmeter_logs
mysql:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mysql_tag:
- 5.7
- 8
mysql_type:
- mysql_auth_acl
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: image
path: /tmp
- name: load docker image
run: |
docker load < /tmp/image.tar.gz
- name: docker compose up
timeout-minutes: 5
env:
TARGET: emqx/${{ needs.build.outputs.imgname }}
EMQX_TAG: ${{ needs.build.outputs.version }}
MYSQL_TAG: ${{ matrix.mysql_tag }}
run: |
docker compose \
-f .ci/docker-compose-file/docker-compose-emqx-cluster.yaml \
-f .ci/docker-compose-file/docker-compose-mysql-tls.yaml \
up -d --build
- name: wait docker compose up
timeout-minutes: 5
run: |
while [ "$(docker inspect -f '{{ .State.Health.Status}}' node1.emqx.io)" != "healthy" ] || [ "$(docker inspect -f '{{ .State.Health.Status}}' node2.emqx.io)" != "healthy" ]; do
echo "['$(date -u +"%y-%m-%dt%h:%m:%sz")']:waiting emqx";
sleep 5;
done
while [ $(docker ps -a --filter name=client --filter exited=0 | wc -l) \
!= $(docker ps -a --filter name=client | wc -l) ]; do
sleep 1
done
docker ps -a
echo HAPROXY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' haproxy) >> $GITHUB_ENV
echo MYSQL_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mysql) >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
repository: emqx/emqx-fvt
ref: v1.6.0
path: scripts
- uses: actions/setup-java@v3
with:
java-version: '8.0.282' # The JDK version to make available on the path.
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64
distribution: 'zulu'
- uses: actions/download-artifact@v3
with:
name: apache-jmeter.tgz
path: /tmp
- name: install jmeter
timeout-minutes: 10
env:
JMETER_VERSION: 5.6
run: |
cd /tmp && tar -xvf apache-jmeter.tgz
echo "jmeter.save.saveservice.output_format=xml" >> /tmp/apache-jmeter-$JMETER_VERSION/user.properties
echo "jmeter.save.saveservice.response_data.on_error=true" >> /tmp/apache-jmeter-$JMETER_VERSION/user.properties
wget --no-verbose -O /tmp/apache-jmeter-$JMETER_VERSION/lib/ext/mqtt-xmeter-2.0.2-jar-with-dependencies.jar https://raw.githubusercontent.com/xmeter-net/mqtt-jmeter/master/Download/v2.0.2/mqtt-xmeter-2.0.2-jar-with-dependencies.jar
ln -s /tmp/apache-jmeter-$JMETER_VERSION /opt/jmeter
- name: install jmeter plugin
run: |
wget --no-verbose -O "/opt/jmeter/lib/mysql-connector-java-8.0.16.jar" https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.16/mysql-connector-java-8.0.16.jar
- name: run jmeter
run: |
JTL_FILE="jmeter_logs/${{ matrix.mysql_type }}_${{ matrix.mysql_tag }}.jtl"
if [ -e "$JTL_FILE" ]
then
echo > $JTL_FILE
fi
/opt/jmeter/bin/jmeter.sh \
-Jjmeter.save.saveservice.output_format=xml -n \
-t scripts/automate-test-suite/${{ matrix.mysql_type }}.jmx \
-Droute="apps/emqx_auth_mysql/test/emqx_auth_mysql_SUITE_data" \
-Dmysql_ip=$MYSQL_IP \
-Demqx_ip=$HAPROXY_IP \
-Ddbname="mqtt" \
-Dmysql_user="ssluser" \
-Ddb_user="root" \
-Dmysql_pwd="public" \
-Dconfig_path="/tmp/etc" \
-Ddocker_path=".ci/docker-compose-file" \
-l $JTL_FILE \
-j jmeter_logs/logs/${{ matrix.mysql_type }}_${{ matrix.mysql_tag }}.log
- name: check logs
run: |
if cat $JTL_FILE | grep -e '<failure>true</failure>' > /dev/null 2>&1; then
echo "check logs filed"
exit 1
fi
- uses: actions/upload-artifact@v3
if: always()
with:
name: jmeter_logs
path: ./jmeter_logs
postgresql:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pgsql_type:
- pgsql_auth_acl
pgsql_tag:
- 9
- 10
- 11
- 12
- 13
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: image
path: /tmp
- name: load docker image
run: |
docker load < /tmp/image.tar.gz
- name: docker compose up
timeout-minutes: 5
env:
TARGET: emqx/${{ needs.build.outputs.imgname }}
EMQX_TAG: ${{ needs.build.outputs.version }}
PGSQL_TAG: ${{ matrix.pgsql_tag }}
run: |
docker compose \
-f .ci/docker-compose-file/docker-compose-emqx-broker-cluster.yaml \
-f .ci/docker-compose-file/docker-compose-pgsql-tls.yaml \
up -d --build
- name: wait docker compose up
timeout-minutes: 5
run: |
while [ "$(docker inspect -f '{{ .State.Health.Status}}' node1.emqx.io)" != "healthy" ] || [ "$(docker inspect -f '{{ .State.Health.Status}}' node2.emqx.io)" != "healthy" ]; do
echo "['$(date -u +"%y-%m-%dt%h:%m:%sz")']:waiting emqx";
sleep 5;
done
docker ps -a
echo HAPROXY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' haproxy) >> $GITHUB_ENV
echo PGSQL_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pgsql) >> $GITHUB_ENV
echo CONFIG_PATH=$(docker inspect -f '{{ range .Mounts }}{{ if eq .Name "docker-compose-file_etc" }}{{ .Source }}{{ end }}{{ end }}' node1.emqx.io) >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
repository: emqx/emqx-fvt
ref: v1.6.0
path: scripts
- uses: actions/setup-java@v3
with:
java-version: '8.0.282' # The JDK version to make available on the path.
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64
distribution: 'zulu'
- uses: actions/download-artifact@v3
with:
name: apache-jmeter.tgz
path: /tmp
- name: install jmeter
timeout-minutes: 10
env:
JMETER_VERSION: 5.6
run: |
cd /tmp && tar -xvf apache-jmeter.tgz
echo "jmeter.save.saveservice.output_format=xml" >> /tmp/apache-jmeter-$JMETER_VERSION/user.properties
echo "jmeter.save.saveservice.response_data.on_error=true" >> /tmp/apache-jmeter-$JMETER_VERSION/user.properties
wget --no-verbose -O /tmp/apache-jmeter-$JMETER_VERSION/lib/ext/mqtt-xmeter-2.0.2-jar-with-dependencies.jar https://raw.githubusercontent.com/xmeter-net/mqtt-jmeter/master/Download/v2.0.2/mqtt-xmeter-2.0.2-jar-with-dependencies.jar
ln -s /tmp/apache-jmeter-$JMETER_VERSION /opt/jmeter
- name: install jmeter plugin
run: |
wget --no-verbose -O "/opt/jmeter/lib/postgresql-42.2.18.jar" https://repo1.maven.org/maven2/org/postgresql/postgresql/42.2.18/postgresql-42.2.18.jar
- name: run jmeter
run: |
JTL_FILE="jmeter_logs/${{ matrix.pgsql_type }}_${{ matrix.pgsql_tag }}.jtl"
if [ -e "$JTL_FILE" ]
then
echo > $JTL_FILE
fi
sudo /opt/jmeter/bin/jmeter.sh \
-Jjmeter.save.saveservice.output_format=xml -n \
-t scripts/automate-test-suite/${{ matrix.pgsql_type }}.jmx \
-Droute="apps/emqx_auth_pgsql/test/emqx_auth_pgsql_SUITE_data" \
-Dca_name="ca.pem" \
-Dkey_name="client-key.pem" \
-Dcert_name="client-cert.pem" \
-Ddb_ip=$PGSQL_IP \
-Dpgsql_ip=$PGSQL_IP \
-Demqx_ip=$HAPROXY_IP \
-Dpgsql_user="root" \
-Dpgsql_pwd="public" \
-Ddbname="mqtt" \
-Dpgsql_db="mqtt" \
-Dport="5432" \
-Dconfig_path=$CONFIG_PATH \
-Ddocker_path=".ci/docker-compose-file" \
-l $JTL_FILE \
-j jmeter_logs/logs/${{ matrix.pgsql_type }}_${{ matrix.pgsql_tag }}.log
- name: check logs
run: |
if cat $JTL_FILE | grep -e '<failure>true</failure>' > /dev/null 2>&1; then
echo "check logs filed"
exit 1
fi
- uses: actions/upload-artifact@v3
if: always()
with:
name: jmeter_logs
path: ./jmeter_logs
http:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: image
path: /tmp
- name: load docker image
run: |
docker load < /tmp/image.tar.gz
- name: docker compose up
timeout-minutes: 5
env:
TARGET: emqx/${{ needs.build.outputs.imgname }}
EMQX_TAG: ${{ needs.build.outputs.version }}
MYSQL_TAG: 8
run: |
docker compose \
-f .ci/docker-compose-file/docker-compose-emqx-broker-cluster.yaml \
-f .ci/docker-compose-file/docker-compose-mysql-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-enterprise-tomcat-tcp.yaml \
up -d --build
- name: wait docker compose up
timeout-minutes: 5
run: |
while [ "$(docker inspect -f '{{ .State.Health.Status}}' node1.emqx.io)" != "healthy" ] || [ "$(docker inspect -f '{{ .State.Health.Status}}' node2.emqx.io)" != "healthy" ]; do
echo "['$(date -u +"%y-%m-%dt%h:%m:%sz")']:waiting emqx";
sleep 5;
done
docker ps -a
echo HAPROXY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' haproxy) >> $GITHUB_ENV
echo HTTP_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' Tomcat) >> $GITHUB_ENV
echo MYSQL_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mysql) >> $GITHUB_ENV
echo CONFIG_PATH=$(docker inspect -f '{{ range .Mounts }}{{ if eq .Name "docker-compose-file_etc" }}{{ .Source }}{{ end }}{{ end }}' node1.emqx.io) >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
repository: emqx/emqx-fvt
ref: v1.6.0
path: scripts
- uses: actions/setup-java@v3
with:
java-version: '8.0.282' # The JDK version to make available on the path.
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64
distribution: 'zulu'
- uses: actions/download-artifact@v3
with:
name: apache-jmeter.tgz
path: /tmp
- name: install jmeter
timeout-minutes: 10
env:
JMETER_VERSION: 5.6
run: |
cd /tmp && tar -xvf apache-jmeter.tgz
echo "jmeter.save.saveservice.output_format=xml" >> /tmp/apache-jmeter-$JMETER_VERSION/user.properties
echo "jmeter.save.saveservice.response_data.on_error=true" >> /tmp/apache-jmeter-$JMETER_VERSION/user.properties
wget --no-verbose -O /tmp/apache-jmeter-$JMETER_VERSION/lib/ext/mqtt-xmeter-2.0.2-jar-with-dependencies.jar https://raw.githubusercontent.com/xmeter-net/mqtt-jmeter/master/Download/v2.0.2/mqtt-xmeter-2.0.2-jar-with-dependencies.jar
ln -s /tmp/apache-jmeter-$JMETER_VERSION /opt/jmeter
- name: install jmeter plugin
run: |
wget --no-verbose -O "/opt/jmeter/lib/mysql-connector-java-8.0.16.jar" https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.16/mysql-connector-java-8.0.16.jar
- name: run jmeter
run: |
JTL_FILE="jmeter_logs/http_auth_acl.jtl"
if [ -e "$JTL_FILE" ]
then
echo > $JTL_FILE
fi
sudo /opt/jmeter/bin/jmeter.sh \
-Jjmeter.save.saveservice.output_format=xml -n \
-t scripts/automate-test-suite/http_auth_acl.jmx \
-Dmysql_ip=$MYSQL_IP \
-Demqx_ip=$HAPROXY_IP \
-Dweb_server_ip=$HTTP_IP \
-Dconfig_path=$CONFIG_PATH \
-Ddocker_path=".ci/docker-compose-file" \
-l $JTL_FILE \
-j jmeter_logs/logs/http_auth_acl.log
- name: check logs
run: |
if cat $JTL_FILE | grep -e '<failure>true</failure>' > /dev/null 2>&1; then
echo "check logs filed"
sudo cat /var/lib/docker/volumes/docker-compose-file_etc/_data/emqx.conf
exit 1
fi
- uses: actions/upload-artifact@v3
if: always()
with:
name: jmeter_logs
path: ./jmeter_logs

View File

@ -1,11 +1,13 @@
name: Compatibility Test Suite
on:
schedule:
- cron: '0 */6 * * *'
pull_request:
push:
tags:
- v*
- e*
pull_request:
jobs:
ldap:
@ -21,12 +23,17 @@ jobs:
- ipv6
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
# to avoid dirty self-hosted runners
- name: stop containers
run: |
docker rm -f $(docker ps -qa) || true
docker network rm $(docker network ls -q) || true
- name: docker compose up
env:
LDAP_TAG: ${{ matrix.ldap_tag }}
run: |
docker-compose \
docker compose \
-f .ci/docker-compose-file/docker-compose-ldap-tcp.yaml \
-f .ci/docker-compose-file/docker-compose.yaml \
up -d --build
@ -43,14 +50,17 @@ jobs:
if make emqx-ee --dry-run > /dev/null 2>&1; then
docker exec -i erlang bash -c "echo \"https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com\" > /root/.git-credentials && git config --global credential.helper store"
fi
- name: fix-git-unsafe-repository
run: docker exec -i erlang sh -c "git config --global --add safe.directory /emqx"
- name: run test cases
run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_
printenv > .env
docker exec -i erlang sh -c "make ensure-rebar3"
docker exec -i erlang sh -c "./rebar3 eunit --dir apps/emqx_auth_ldap"
docker exec --env-file .env -i erlang sh -c "./rebar3 ct --dir apps/emqx_auth_ldap"
- uses: actions/upload-artifact@v1
printenv | grep "^EMQX_" > .env
docker exec -i \
-e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_ldap-ct"
- uses: actions/upload-artifact@v3
if: failure()
with:
name: logs_ldap${{ matrix.ldap_tag }}_${{ matrix.network_type }}
@ -73,10 +83,15 @@ jobs:
- tcp
steps:
- uses: actions/checkout@v1
- name: docker-compose up
- uses: actions/checkout@v3
- name: stop containers
run: |
docker-compose \
docker rm -f $(docker ps -qa) || true
docker network rm $(docker network ls -q) || true
- name: docker compose up
run: |
docker compose \
-f .ci/docker-compose-file/docker-compose-toxiproxy.yaml \
-f .ci/docker-compose-file/docker-compose-mongo-${{ matrix.connect_type }}.yaml \
-f .ci/docker-compose-file/docker-compose.yaml \
up -d --build
@ -102,24 +117,26 @@ jobs:
- name: setup
if: matrix.network_type == 'ipv4'
run: |
echo "EMQX_AUTH__MONGO__SERVER=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mongo):27017" >> "$GITHUB_ENV"
echo "EMQX_AUTH__MONGO__SERVER=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' toxiproxy):27017" >> "$GITHUB_ENV"
- name: setup
if: matrix.network_type == 'ipv6'
run: |
echo "EMQX_AUTH__MONGO__SERVER=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.GlobalIPv6Address}}{{end}}' mongo):27017" >> "$GITHUB_ENV"
echo "EMQX_AUTH__MONGO__SERVER=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.GlobalIPv6Address}}{{end}}' toxiproxy):27017" >> "$GITHUB_ENV"
- name: set git token
run: |
if make emqx-ee --dry-run > /dev/null 2>&1; then
docker exec -i erlang bash -c "echo \"https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com\" > /root/.git-credentials && git config --global credential.helper store"
fi
- name: fix-git-unsafe-repository
run: docker exec -i erlang sh -c "git config --global --add safe.directory /emqx"
- name: run test cases
run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_
printenv > .env
docker exec -i erlang sh -c "make ensure-rebar3"
docker exec -i erlang sh -c "./rebar3 eunit --dir apps/emqx_auth_mongo"
docker exec --env-file .env -i erlang sh -c "./rebar3 ct --dir apps/emqx_auth_mongo"
- uses: actions/upload-artifact@v1
printenv | grep "^EMQX_" > .env
docker exec -i \
-e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_mongo-ct"
- uses: actions/upload-artifact@v3
if: failure()
with:
name: logs_mongo${{ matrix.mongo_tag }}_${{ matrix.network_type }}_${{ matrix.connect_type }}
@ -142,11 +159,15 @@ jobs:
- tcp
steps:
- uses: actions/checkout@v1
- name: docker-compose up
- uses: actions/checkout@v3
- name: stop containers
run: |
docker rm -f $(docker ps -qa) || true
docker network rm $(docker network ls -q) || true
- name: docker compose up
timeout-minutes: 5
run: |
docker-compose \
docker compose \
-f .ci/docker-compose-file/docker-compose-mysql-${{ matrix.connect_type }}.yaml \
-f .ci/docker-compose-file/docker-compose.yaml \
up -d --build
@ -194,14 +215,16 @@ jobs:
if make emqx-ee --dry-run > /dev/null 2>&1; then
docker exec -i erlang bash -c "echo \"https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com\" > /root/.git-credentials && git config --global credential.helper store"
fi
- name: fix-git-unsafe-repository
run: docker exec -i erlang sh -c "git config --global --add safe.directory /emqx"
- name: run test cases
run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_
printenv > .env
docker exec -i erlang sh -c "make ensure-rebar3"
docker exec -i erlang sh -c "./rebar3 eunit --dir apps/emqx_auth_mysql"
docker exec --env-file .env -i erlang sh -c "./rebar3 ct --dir apps/emqx_auth_mysql"
- uses: actions/upload-artifact@v1
printenv | grep "^EMQX_" > .env
docker exec -i \
-e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_mysql-ct"
- uses: actions/upload-artifact@v3
if: failure()
with:
name: logs_mysql${{ matrix.mysql_tag }}_${{ matrix.network_type }}_${{ matrix.connect_type }}
@ -226,10 +249,14 @@ jobs:
- tls
- tcp
steps:
- uses: actions/checkout@v1
- name: docker-compose up
- uses: actions/checkout@v3
- name: stop containers
run: |
docker-compose \
docker rm -f $(docker ps -qa) || true
docker network rm $(docker network ls -q) || true
- name: docker compose up
run: |
docker compose \
-f .ci/docker-compose-file/docker-compose-pgsql-${{ matrix.connect_type }}.yaml \
-f .ci/docker-compose-file/docker-compose.yaml \
up -d --build
@ -265,17 +292,19 @@ jobs:
if make emqx-ee --dry-run > /dev/null 2>&1; then
docker exec -i erlang bash -c "echo \"https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com\" > /root/.git-credentials && git config --global credential.helper store"
fi
- name: fix-git-unsafe-repository
run: docker exec -i erlang sh -c "git config --global --add safe.directory /emqx"
- name: run test cases
run: |
export EMQX_AUTH__PGSQL__USERNAME=root \
EMQX_AUTH__PGSQL__PASSWORD=public \
EMQX_AUTH__PGSQL__DATABASE=mqtt \
CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_
printenv > .env
docker exec -i erlang sh -c "make ensure-rebar3"
docker exec -i erlang sh -c "./rebar3 eunit --dir apps/emqx_auth_pgsql"
docker exec --env-file .env -i erlang sh -c "./rebar3 ct --dir apps/emqx_auth_pgsql"
- uses: actions/upload-artifact@v1
EMQX_AUTH__PGSQL__DATABASE=mqtt
printenv | grep "^EMQX_" > .env
docker exec -i \
-e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_pgsql-ct"
- uses: actions/upload-artifact@v3
if: failure()
with:
name: logs_pgsql${{ matrix.pgsql_tag }}_${{ matrix.network_type }}_${{ matrix.connect_type }}
@ -305,10 +334,14 @@ jobs:
connect_type: tls
steps:
- uses: actions/checkout@v1
- name: docker-compose up
- uses: actions/checkout@v3
- name: stop containers
run: |
docker-compose \
docker rm -f $(docker ps -qa) || true
docker network rm $(docker network ls -q) || true
- name: docker compose up
run: |
docker compose \
-f .ci/docker-compose-file/docker-compose-redis-${{ matrix.node_type }}-${{ matrix.connect_type }}.yaml \
-f .ci/docker-compose-file/docker-compose.yaml \
up -d --build
@ -388,15 +421,17 @@ jobs:
if make emqx-ee --dry-run > /dev/null 2>&1; then
docker exec -i erlang bash -c "echo \"https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com\" > /root/.git-credentials && git config --global credential.helper store"
fi
- name: fix-git-unsafe-repository
run: docker exec -i erlang sh -c "git config --global --add safe.directory /emqx"
- name: run test cases
run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_
export EMQX_AUTH__REIDS__PASSWORD=public
printenv > .env
docker exec -i erlang sh -c "make ensure-rebar3"
docker exec -i erlang sh -c "./rebar3 eunit --dir apps/emqx_auth_redis"
docker exec --env-file .env -i erlang sh -c "./rebar3 ct --dir apps/emqx_auth_redis"
- uses: actions/upload-artifact@v1
printenv | grep "^EMQX_" > .env
docker exec -i \
-e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_redis-ct"
- uses: actions/upload-artifact@v3
if: failure()
with:
name: logs_redis${{ matrix.redis_tag }}_${{ matrix.node_type }}_${{ matrix.network_type }}_${{ matrix.connect_type }}

View File

@ -12,26 +12,29 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: gleam-lang/setup-erlang@v1.1.2
id: install_erlang
- uses: actions/checkout@v3
- uses: emqx/setup-beam@v1.16.1-emqx
with:
otp-version: 23.2
otp-version: 24.3.4.6
- name: prepare
run: |
if make emqx-ee --dry-run > /dev/null 2>&1; then
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
echo "${{ secrets.CI_GIT_TOKEN }}" >> scripts/git-token
make deps-emqx-ee
make clean
echo "TARGET=emqx/emqx-ee" >> $GITHUB_ENV
echo "PROFILE=emqx-ee" >> $GITHUB_ENV
echo "EMQX_TAG=$(./pkg-vsn.sh)" >> $GITHUB_ENV
make emqx-ee-docker
else
echo "TARGET=emqx/emqx" >> $GITHUB_ENV
echo "PROFILE=emqx" >> $GITHUB_ENV
echo "EMQX_TAG=$(./pkg-vsn.sh)" >> $GITHUB_ENV
make emqx-docker
fi
- name: make emqx image
run: make docker
run: make ${PROFILE}-docker
- name: run emqx
timeout-minutes: 5
run: |
@ -64,54 +67,53 @@ jobs:
helm_test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
discovery:
- k8s
- dns
steps:
- uses: actions/checkout@v1
- uses: gleam-lang/setup-erlang@v1.1.2
id: install_erlang
- uses: actions/checkout@v3
- uses: emqx/setup-beam@v1.16.1-emqx
with:
otp-version: 23.2
otp-version: 24.3.4.6
- name: prepare
run: |
if make emqx-ee --dry-run > /dev/null 2>&1; then
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
echo "${{ secrets.CI_GIT_TOKEN }}" >> scripts/git-token
make deps-emqx-ee
make clean
echo "TARGET=emqx/emqx-ee" >> $GITHUB_ENV
echo "PROFILE=emqx-ee" >> $GITHUB_ENV
echo "EMQX_TAG=$(./pkg-vsn.sh)" >> $GITHUB_ENV
else
echo "TARGET=emqx/emqx" >> $GITHUB_ENV
echo "PROFILE=emqx" >> $GITHUB_ENV
echo "EMQX_TAG=$(./pkg-vsn.sh)" >> $GITHUB_ENV
fi
- name: make emqx image
run: make docker
- name: install k3s
env:
KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
run: |
sudo sh -c "echo \"127.0.0.1 $(hostname)\" >> /etc/hosts"
curl -sfL https://get.k3s.io | sh -
sudo chmod 644 /etc/rancher/k3s/k3s.yaml
kubectl cluster-info
run: make ${PROFILE}-docker
- run: minikube start
- name: install helm
env:
KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
run: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
sudo chmod 700 get_helm.sh
sudo ./get_helm.sh
helm version
- name: run emqx on chart
env:
KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
timeout-minutes: 5
run: |
version=$(./pkg-vsn.sh)
sudo docker save ${TARGET}:$version -o emqx.tar.gz
sudo k3s ctr image import emqx.tar.gz
minikube image load ${TARGET}:$version
sed -i -r "s/^appVersion: .*$/appVersion: \"${version}\"/g" deploy/charts/emqx/Chart.yaml
sed -i '/emqx_telemetry/d' deploy/charts/emqx/values.yaml
- name: run emqx on chart
if: matrix.discovery == 'k8s'
run: |
helm install emqx \
--set image.repository=${TARGET} \
--set image.pullPolicy=Never \
@ -121,7 +123,25 @@ jobs:
--set emqxConfig.EMQX_MQTT__MAX_TOPIC_ALIAS=10 \
deploy/charts/emqx \
--debug
- name: run emqx on chart
if: matrix.discovery == 'dns'
run: |
helm install emqx \
--set emqxConfig.EMQX_CLUSTER__DISCOVERY="dns" \
--set emqxConfig.EMQX_CLUSTER__DNS__NAME="emqx-headless.default.svc.cluster.local" \
--set emqxConfig.EMQX_CLUSTER__DNS__APP="emqx" \
--set emqxConfig.EMQX_CLUSTER__DNS__TYPE="srv" \
--set image.repository=${TARGET} \
--set image.pullPolicy=Never \
--set emqxAclConfig="" \
--set image.pullPolicy=Never \
--set emqxConfig.EMQX_ZONE__EXTERNAL__RETRY_INTERVAL=2s \
--set emqxConfig.EMQX_MQTT__MAX_TOPIC_ALIAS=10 \
deploy/charts/emqx \
--debug
- name: waiting emqx started
timeout-minutes: 5
run: |
while [ "$(kubectl get StatefulSet -l app.kubernetes.io/name=emqx -o jsonpath='{.items[0].status.replicas}')" \
!= "$(kubectl get StatefulSet -l app.kubernetes.io/name=emqx -o jsonpath='{.items[0].status.readyReplicas}')" ]; do
echo "==============================";
@ -130,12 +150,32 @@ jobs:
echo "waiting emqx started";
sleep 10;
done
- name: get pods log
- name: Check ${{ matrix.kind[0]}} cluster
timeout-minutes: 10
run: |
while
nodes="$(kubectl exec -i emqx-0 -- curl --silent --basic -u admin:public -X GET http://localhost:8081/api/v4/brokers | jq '.data|length')";
[ "$nodes" != "3" ];
do
echo "waiting emqx cluster scale"
sleep 1
done
- name: get emqx-0 pods log
if: failure()
env:
KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
run: kubectl describe pods emqx-0
- uses: actions/checkout@v2
run: |
kubectl describe pods emqx-0
kubectl logs emqx-0
- name: get emqx-1 pods log
if: failure()
run: |
kubectl describe pods emqx-1
kubectl logs emqx-1
- name: get emqx-2 pods log
if: failure()
run: |
kubectl describe pods emqx-2
kubectl logs emqx-2
- uses: actions/checkout@v3
with:
repository: emqx/paho.mqtt.testing
ref: develop-4.0
@ -145,16 +185,12 @@ jobs:
pip install pytest
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: run paho test
env:
KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
run: |
emqx_svc=$(kubectl get svc --namespace default emqx -o jsonpath="{.spec.clusterIP}")
emqx1=$(kubectl get pods emqx-1 -o jsonpath='{.status.podIP}')
emqx2=$(kubectl get pods emqx-2 -o jsonpath='{.status.podIP}')
nohup kubectl port-forward svc/emqx 1883:1883 &
pytest -v paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host $emqx_svc
pytest -v paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic
RESULT=$?
pytest -v paho.mqtt.testing/interoperability/test_cluster --host1 $emqx1 --host2 $emqx2
pytest -v paho.mqtt.testing/interoperability/test_cluster
RESULT=$((RESULT + $?))
if [ 0 -ne $RESULT ]; then
kubectl logs emqx-1
@ -162,117 +198,147 @@ jobs:
fi
exit $RESULT
relup_test:
relup_test_plan:
runs-on: ubuntu-20.04
container: emqx/build-env:erl23.2.7.2-emqx-2-ubuntu20.04
container: ghcr.io/emqx/emqx-builder/4.4-24:24.3.4.2-1-ubuntu20.04
outputs:
profile: ${{ steps.profile-and-versions.outputs.profile }}
vsn: ${{ steps.profile-and-versions.outputs.vsn }}
old_vsns: ${{ steps.profile-and-versions.outputs.old_vsns }}
broker: ${{ steps.profile-and-versions.outputs.broker }}
matrix: ${{ steps.generate-matrix.outputs.matrix }}
defaults:
run:
shell: bash
steps:
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
name: Checkout
with:
python-version: '3.8'
architecture: 'x64'
- uses: actions/checkout@v2
path: emqx
fetch-depth: 0
- name: Get profile and version list
id: profile-and-versions
run: |
cd emqx
vsn="$(./pkg-vsn.sh)"
if make emqx-ee --dry-run > /dev/null 2>&1; then
profile="emqx-ee"
old_vsns="$(./scripts/relup-base-vsns.sh enterprise | xargs)"
broker="emqx-ee"
else
profile="emqx"
old_vsns="$(./scripts/relup-base-vsns.sh community | xargs)"
broker="emqx-ce"
fi
echo "OLD_VSNS=$old_vsns" >> $GITHUB_ENV
echo "vsn=$vsn" >> $GITHUB_OUTPUT
echo "profile=$profile" >> $GITHUB_OUTPUT
echo "broker=$broker" >> $GITHUB_OUTPUT
echo "old_vsns=$old_vsns" >> $GITHUB_OUTPUT
- name: Generate matrix
id: generate-matrix
run: |
matrix=$(echo -n "$OLD_VSNS" | sed 's/ $//g' | jq -R -s -c 'split(" ")')
echo "matrix=$matrix" >> $GITHUB_OUTPUT
relup_test_build:
needs: relup_test_plan
strategy:
fail-fast: false
matrix:
otp:
- 24.3.4.2-1
runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-24:24.3.4.2-1-ubuntu20.04
defaults:
run:
shell: bash
env:
OLD_VSNS: "${{ needs.relup_test_plan.outputs.old_vsns }}"
PROFILE: "${{ needs.relup_test_plan.outputs.profile }}"
BROKER: "${{ needs.relup_test_plan.outputs.broker }}"
steps:
- uses: actions/checkout@v3
name: Checkout
with:
repository: emqx/paho.mqtt.testing
ref: develop-4.0
path: paho.mqtt.testing
- uses: actions/checkout@v2
path: emqx
fetch-depth: 0
- name: Prepare credentials
run: |
if [ "$PROFILE" = "emqx-ee" ]; then
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
fi
- name: Build emqx
run: make -C emqx ${PROFILE}-zip
- uses: actions/upload-artifact@v3
name: Upload built emqx and test scenario
with:
name: emqx_built
path: |
emqx/_packages/*/*.zip
emqx/.ci/fvt_tests
emqx/data/relup-paths.eterm
emqx/scripts/relup-base-vsns.escript
relup_test_run:
needs:
- relup_test_plan
- relup_test_build
runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-24:24.3.4.2-1-ubuntu20.04
strategy:
fail-fast: false
matrix:
old_vsn: ${{ fromJson(needs.relup_test_plan.outputs.matrix) }}
env:
OLD_VSN: "${{ matrix.old_vsn }}"
PROFILE: "${{ needs.relup_test_plan.outputs.profile }}"
VSN: "${{ needs.relup_test_plan.outputs.vsn }}"
BROKER: "${{ needs.relup_test_plan.outputs.broker }}"
defaults:
run:
shell: bash
steps:
- uses: actions/download-artifact@v3
name: Download built emqx and test scenario
with:
name: emqx_built
path: emqx_built
- uses: actions/checkout@v3
name: Checkout one_more_emqx
with:
repository: terry-xiaoyu/one_more_emqx
ref: master
path: one_more_emqx
- uses: actions/checkout@v2
with:
repository: emqx/emqtt-bench
ref: master
path: emqtt-bench
- uses: actions/checkout@v2
with:
repository: hawk/lux
ref: lux-2.6
path: lux
- uses: actions/checkout@v2
with:
repository: ${{ github.repository }}
path: emqx
fetch-depth: 0
- name: prepare
run: |
if make -C emqx emqx-ee --dry-run > /dev/null 2>&1; then
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
echo "${{ secrets.CI_GIT_TOKEN }}" >> emqx/scripts/git-token
echo "PROFILE=emqx-ee" >> $GITHUB_ENV
else
echo "PROFILE=emqx" >> $GITHUB_ENV
fi
- name: get version
- name: Run relup test scenario
timeout-minutes: 6
run: |
set -e -x -u
cd emqx
if [ $PROFILE = "emqx" ];then
broker="emqx-ce"
edition='opensource'
else
broker="emqx-ee"
edition='enterprise'
fi
echo "BROKER=$broker" >> $GITHUB_ENV
vsn="$(./pkg-vsn.sh)"
echo "VSN=$vsn" >> $GITHUB_ENV
pre_vsn="$(echo $vsn | grep -oE '^[0-9]+.[0-9]')"
if [ $PROFILE = "emqx" ]; then
old_vsns="$(git tag -l "v$pre_vsn.[0-9]" | xargs echo -n | sed "s/v$vsn//")"
else
old_vsns="$(git tag -l "e$pre_vsn.[0-9]" | xargs echo -n | sed "s/e$vsn//")"
fi
echo "OLD_VSNS=$old_vsns" >> $GITHUB_ENV
- name: download emqx
run: |
set -e -x -u
mkdir -p emqx/_upgrade_base
cd emqx/_upgrade_base
old_vsns=($(echo $OLD_VSNS | tr ' ' ' '))
for old_vsn in ${old_vsns[@]}; do
wget --no-verbose https://s3-us-west-2.amazonaws.com/packages.emqx/$BROKER/$old_vsn/$PROFILE-ubuntu20.04-${old_vsn#[e|v]}-amd64.zip
done
- name: build emqx
run: make -C emqx ${PROFILE}-zip
- name: build emqtt-bench
run: make -C emqtt-bench
- name: build lux
run: |
set -e -u -x
cd lux
autoconf
./configure
make
make install
- name: run relup test
timeout-minutes: 20
run: |
set -e -x -u
if [ -n "$OLD_VSNS" ]; then
mkdir -p packages
cp emqx/_packages/${PROFILE}/*.zip packages
cp emqx/_upgrade_base/*.zip packages
old_emqx_vsn=${OLD_VSN#[e|v]}
old_otp_vsn=$(escript emqx_built/scripts/relup-base-vsns.escript otp-vsn-for "${old_emqx_vsn}" emqx_built/data/relup-paths.eterm)
wget --no-verbose -P packages https://s3-us-west-2.amazonaws.com/packages.emqx/$BROKER/$OLD_VSN/$PROFILE-${old_emqx_vsn}-otp${old_otp_vsn}-ubuntu20.04-amd64.zip
cp emqx_built/_packages/*/*.zip packages
lux \
--progress verbose \
--case_timeout infinity \
--var PROFILE=$PROFILE \
--var PACKAGE_PATH=$(pwd)/packages \
--var BENCH_PATH=$(pwd)/emqtt-bench \
--var ONE_MORE_EMQX_PATH=$(pwd)/one_more_emqx \
--var VSN="$VSN" \
--var OLD_VSNS="$OLD_VSNS" \
emqx/.ci/fvt_tests/relup.lux
fi
- uses: actions/upload-artifact@v1
--var OLD_VSN="$OLD_VSN" \
--var FROM_OTP_VSN="${old_otp_vsn}" \
--var TO_OTP_VSN="24.3.4.2-1" \
emqx_built/.ci/fvt_tests/relup.lux
- uses: actions/upload-artifact@v3
name: Save debug data
if: failure()
with:
name: lux_logs
path: lux_logs
name: debug_data
path: |
packages/emqx/log/emqx.log.1
packages/emqx2/log/emqx.log.1
packages/*.zip
lux_logs

View File

@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Install gitlint
run: |
sudo apt-get update

View File

@ -5,74 +5,156 @@ on:
tags:
- v*
- e*
branches:
- 'main-v4.[0-9]?'
pull_request:
jobs:
run_static_analysis:
runs-on: ubuntu-20.04
container: emqx/build-env:erl23.2.7.2-emqx-2-ubuntu20.04
prepare:
runs-on: aws-amd64
container: ghcr.io/emqx/emqx-builder/4.4-24:24.3.4.2-1-ubuntu20.04
outputs:
fast_ct_apps: ${{ steps.run_find_apps.outputs.fast_ct_apps }}
docker_ct_apps: ${{ steps.run_find_apps.outputs.docker_ct_apps }}
steps:
- uses: actions/checkout@v2
- name: set git credentials
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v3
with:
path: source
fetch-depth: 0
- name: git credentials
if: endsWith(github.repository, 'emqx-enterprise')
run: |
if make emqx-ee --dry-run > /dev/null 2>&1; then
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
fi
- name: xref
run: make xref
- name: dialyzer
run: make dialyzer
run_proper_test:
runs-on: ubuntu-20.04
container: emqx/build-env:erl23.2.7.2-emqx-2-ubuntu20.04
- name: find_ct_apps
working-directory: source
id: run_find_apps
# emqx_plugin_libs doesn't have a test suite -> excluded from app list
# emqx ct is run independently -> exclude it from the app list (regular ct)
# lib-ee/emqx_node_rebalance -> exclude it from app list (regular ct)
run: |
fast_ct_apps="$(./scripts/find-apps.sh --ct fast --json)"
docker_ct_apps="$(./scripts/find-apps.sh --ct docker --json)"
echo "fast_ct_apps=$fast_ct_apps" | tee -a $GITHUB_OUTPUT
echo "docker_ct_apps=$docker_ct_apps" | tee -a $GITHUB_OUTPUT
- name: get_all_deps
working-directory: source
run: |
git config --global --add safe.directory $(pwd)
# build the default profile for two purposes
# 1. download all dependencies (so the individual app runs do not depend on github credentials)
# 2. some of the files such as segmented config files are not created when compiling only the test profile
make
# compile test profile to speed up the individual runs
./rebar3 as test compile
cd ..
zip -ryq source.zip source/* source/.[^.]*
- uses: actions/upload-artifact@v3
with:
name: source
path: source.zip
eunit_and_proper:
needs: prepare
runs-on: aws-amd64
container: ghcr.io/emqx/emqx-builder/4.4-24:24.3.4.2-1-ubuntu20.04
strategy:
fail-fast: false
matrix:
task:
- eunit
- proper
steps:
- uses: actions/checkout@v2
- name: set git credentials
run: |
if make emqx-ee --dry-run > /dev/null 2>&1; then
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
fi
- name: proper
run: make proper
run_common_test:
runs-on: ubuntu-20.04
- uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3
with:
name: source
path: .
- name: unzip source code
run: unzip -o -q source.zip
# produces eunit.coverdata and proper.coverdata
- name: eunit and proper
working-directory: source
run: make ${{ matrix.task }}
- uses: actions/upload-artifact@v3
with:
name: cover
path: source/_build/test/cover
if-no-files-found: warn
fast_ct:
needs: prepare
runs-on: ${{ matrix.runs-on }}
container: ghcr.io/emqx/emqx-builder/4.4-24:24.3.4.2-1-ubuntu20.04
strategy:
fail-fast: false
matrix:
app_name: ${{ fromJson(needs.prepare.outputs.fast_ct_apps) }}
runs-on:
- aws-amd64
- ubuntu-20.04
use-self-hosted:
- ${{ github.repository_owner == 'emqx' }}
exclude:
- runs-on: ubuntu-20.04
use-self-hosted: true
- runs-on: aws-amd64
use-self-hosted: false
steps:
- uses: actions/checkout@v2
- name: set edition
id: set_edition
- uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3
with:
name: source
path: .
- name: unzip source code
run: unzip -o -q source.zip
# produces emqx-<appname>.coverdata
- name: make-app-ct-pipeline
working-directory: source
run: |
if make emqx-ee --dry-run > /dev/null 2>&1; then
echo "EDITION=enterprise" >> $GITHUB_ENV
else
echo "EDITION=opensource" >> $GITHUB_ENV
fi
- name: docker compose up
if: env.EDITION == 'opensource'
env:
MYSQL_TAG: 8
REDIS_TAG: 6
MONGO_TAG: 4
PGSQL_TAG: 13
LDAP_TAG: 2.4.50
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
export CT_READABLE=true
make ${{ matrix.app_name }}-ct-pipeline
- uses: actions/upload-artifact@v3
with:
name: cover
path: source/_build/test/cover
if-no-files-found: warn
docker_ct:
needs: prepare
runs-on: ${{ matrix.runs-on }}
strategy:
max-parallel: 12
fail-fast: false
matrix:
app_name: ${{ fromJson(needs.prepare.outputs.docker_ct_apps) }}
runs-on:
- aws-amd64
- ubuntu-20.04
use-self-hosted:
- ${{ github.repository_owner == 'emqx' }}
exclude:
- runs-on: ubuntu-20.04
use-self-hosted: true
- runs-on: aws-amd64
use-self-hosted: false
steps:
- uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3
with:
name: source
path: .
- name: unzip source code
run: unzip -q source.zip
# to avoid dirty self-hosted runners
- name: stop containers
run: |
docker-compose \
-f .ci/docker-compose-file/docker-compose.yaml \
-f .ci/docker-compose-file/docker-compose-ldap-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-mongo-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-mysql-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-pgsql-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-redis-single-tcp.yaml \
up -d --build
docker rm -f $(docker ps -qa) || true
docker network rm $(docker network ls -q) || true
docker system prune --volumes -f
- name: docker compose up
if: env.EDITION == 'enterprise'
working-directory: source
env:
MYSQL_TAG: 8
REDIS_TAG: 6
@ -88,16 +170,20 @@ jobs:
KAFKA_TAG: 2.5.0
PULSAR_TAG: 2.3.2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 20
timeout-minutes: 40
run: |
docker-compose \
ulimit -n
docker_compose_files="\
-f .ci/docker-compose-file/docker-compose.yaml \
-f .ci/docker-compose-file/docker-compose-ldap-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-toxiproxy.yaml \
-f .ci/docker-compose-file/docker-compose-mongo-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-mysql-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-pgsql-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-redis-single-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-redis-single-tcp.yaml"
ee_docker_compose_files="\
-f .ci/docker-compose-file/docker-compose-enterprise.yaml \
-f .ci/docker-compose-file/docker-compose-mongo-replicaset-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-mongo-sharded-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-enterprise-cassandra-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-enterprise-dynamodb-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-enterprise-influxdb-tcp.yaml \
@ -107,40 +193,92 @@ jobs:
-f .ci/docker-compose-file/docker-compose-enterprise-rabbit-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-enterprise-timescale-tcp.yaml \
-f .ci/docker-compose-file/docker-compose-enterprise-mysql-client.yaml \
-f .ci/docker-compose-file/docker-compose-enterprise-pgsql-and-timescale-client.yaml \
up -d --build
-f .ci/docker-compose-file/docker-compose-enterprise-pgsql-and-timescale-client.yaml"
if [ -f EMQX_ENTERPRISE ]; then
docker_compose_files="${docker_compose_files} ${ee_docker_compose_files}"
fi
# only build ldap docker image when necessary, it takes 9 minutes
if [[ ${{ matrix.app_name }} == *ldap ]]; then
docker_compose_files="${docker_compose_files} -f .ci/docker-compose-file/docker-compose-ldap-tcp.yaml"
fi
docker compose $docker_compose_files up -d --build
if [ -f EMQX_ENTERPRISE ]; then
docker exec -i erlang bash -c "echo \"https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com\" > /root/.git-credentials && git config --global credential.helper store"
while [ $(docker ps -a --filter name=client --filter exited=0 | wc -l) \
!= $(docker ps -a --filter name=client | wc -l) ]; do
sleep 5
fi
docker exec -i erlang bash -c "git config --global --add safe.directory /emqx"
clients="$(docker ps -q --filter name=client)"
for client in ${clients}; do
docker ps -a --filter name=client
echo "waiting for docker ${client} to exit"
if ! timeout 60 docker wait "${client}"; then
docker compose $docker_compose_files logs | tee docker-compose.log
exit 1
fi
done
- name: run eunit
run: |
docker exec -i erlang bash -c "make eunit"
- name: run common test
run: |
docker exec -i erlang bash -c "make ct"
- name: run cover
run: |
printenv > .env
docker exec -i erlang bash -c "make cover"
docker exec --env-file .env -i erlang bash -c "make coveralls"
run: docker exec -i erlang bash -c "env CT_READABLE=true make ${{ matrix.app_name }}-ct-pipeline"
- name: cat rebar.crashdump
if: failure()
working-directory: source
run: if [ -f 'rebar3.crashdump' ];then cat 'rebar3.crashdump'; fi
- uses: actions/upload-artifact@v1
- name: set log file name
if: failure()
run: echo "LOGFILENAME=logs-$(echo ${{ matrix.app_name }} | tr '/' '_')" >> $GITHUB_ENV
- name: stop containers
run: |
docker rm -f $(docker ps -qa) || true
docker network rm $(docker network ls -q) || true
docker system prune --volumes -f
- uses: actions/upload-artifact@v3
if: failure()
with:
name: logs
path: _build/test/logs
- uses: actions/upload-artifact@v1
name: ${{ env.LOGFILENAME }}
path: |
docker-compose.log
source/_build/test/logs
if-no-files-found: warn
- uses: actions/upload-artifact@v3
with:
name: cover
path: _build/test/cover
path: source/_build/test/cover
if-no-files-found: warn
make_cover:
needs:
- eunit_and_proper
- fast_ct
- docker_ct
runs-on: aws-amd64
container: ghcr.io/emqx/emqx-builder/4.4-24:24.3.4.2-1-ubuntu20.04
steps:
- uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3
with:
name: source
path: .
- name: unzip source code
run: unzip -q source.zip
- uses: actions/download-artifact@v3
name: download cover data
with:
name: cover
path: source/_build/test/cover
- name: make cover
working-directory: source
run: make cover
- name: send to coveralls
working-directory: source
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make coveralls
- name: get coveralls logs
working-directory: source
if: failure()
run: cat rebar3.crashdump
finish:
needs: run_common_test
runs-on: ubuntu-20.04
needs: make_cover
runs-on: aws-amd64
steps:
- name: Coveralls Finished
env:

View File

@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Install shellcheck
run: |
sudo apt-get update

14
.gitignore vendored
View File

@ -47,3 +47,17 @@ dist.zip
scripts/git-token
etc/*.seg
_upgrade_base/
erlang_ls.config
.els_cache/
# VSCode files
.vs/
.vscode/
# Emacs Backup files
*~
# Emacs temporary files
.#*
*#
# For direnv
.envrc
mix.lock
.gitconfig.tmp

View File

@ -1 +1 @@
erlang 24.0.1-emqx-1
erlang 24.3.4.2-1

399
CHANGES-4.3.md Normal file
View File

@ -0,0 +1,399 @@
# EMQX 4.3 Changes
Started tracking changes in CHANGE.md since EMQX v4.3.11
NOTE: Keep prepending to the head of the file instead of the tail
File format:
- Use weight-2 heading for releases
- One list item per change topic
Change log ends with a list of GitHub PRs
## For 4.3.22 and later versions, please find details in `changes` dir
## v4.3.21
### Bug fixes
- Deny POST an existing resource id using HTTP API with error 400 "Already Exists". [#9079](https://github.com/emqx/emqx/pull/9079)
- Fix the issue that reseting rule metrics crashed under certain conditions. [#9079](https://github.com/emqx/emqx/pull/9079)
### Enhancements
- TLS listener memory usage optimization [#9005](https://github.com/emqx/emqx/pull/9005).
New config `listener.ssl.$NAME.hibernate_after` to hibernate TLS connection process after idling.
Hibernation can reduce RAM usage significantly, but may cost more CPU.
This configuration is by default disabled.
Our preliminary test shows a 50% of RAM usage decline when configured to '5s'.
- TLS listener default buffer size to 4KB [#9007](https://github.com/emqx/emqx/pull/9007)
Eliminate uncertainty that the buffer size is set by OS default.
- Disable authorization for `api/v4/emqx_prometheus` endpoint. [#8955](https://github.com/emqx/emqx/pull/8955)
- Added a test to prevent a last will testament message to be
published when a client is denied connection. [#8894](https://github.com/emqx/emqx/pull/8894)
- More rigorous checking of flapping to improve stability of the system. [#9045](https://github.com/emqx/emqx/pull/9045)
- QoS1 and QoS2 messages in session's buffer are re-dispatched to other members in the group
when the session terminates [#9094](https://github.com/emqx/emqx/pull/9094).
Prior to this enhancement, one would have to set `broker.shared_dispatch_ack_enabled` to true
to prevent sessions from buffering messages, however this acknowledgement comes with a cost.
- Prior to this fix, some of the time stamps were taken from the `os` module (system call),
while majority of other places are using `erlang` module (from Erlang virtual machine).
This inconsistent behaviour has caused some trouble for the Delayed Publish feature when OS time changes.
Now all time stamps are from `erlang` module. [#8908](https://github.com/emqx/emqx/pull/8908)
### Bug fixes
- Fix HTTP client library to handle SSL socket passive signal. [#9145](https://github.com/emqx/emqx/pull/9145)
- Hide redis password in error logs [#9071](https://github.com/emqx/emqx/pull/9071)
More changes in redis client included in this release:
- Improve redis connection error logging [eredis #19](https://github.com/emqx/eredis/pull/19).
Also added support for eredis to accept an anonymous function as password instead of
passing around plaintext args which may get dumpped to crash logs (hard to predict where).
This change also added `format_status` callback for `gen_server` states which hold plaintext
password so the process termination log and `sys:get_status` will print '******' instead of
the password to console.
- Avoid pool name clashing [eredis_cluster #22](https://github.com/emqx/eredis_cluster/pull/22)
Same `format_status` callback is added here too for `gen_server`s which hold password in
their state.
- Fix shared subscription message re-dispatches [#9094](https://github.com/emqx/emqx/pull/9094).
- When discarding QoS 2 inflight messages, there were excessive logs
- For wildcard deliveries, the re-dispatch used the wrong topic (the publishing topic,
but not the subscribing topic), caused messages to be lost when dispatching.
- Fix shared subscription group member unsubscribe issue when 'sticky' strategy is used.
Prior to this fix, if a previously picked member unsubscribes from the group (without reconnect)
the message is still dispatched to it.
This issue only occurs when unsubscribe with the session kept.
Fixed in [#9119](https://github.com/emqx/emqx/pull/9119)
- Fix shared subscription 'sticky' strategy when there is no local subscriptions at all.
Prior to this change, it may take a few rounds to randomly pick group members until a local subscriber
is hit (and then start sticking to it).
After this fix, it will start sticking to whichever randomly picked member even when it is a
subscriber from another node in the cluster.
Fixed in [#9122](https://github.com/emqx/emqx/pull/9122)
- Fix rule engine fallback actions metrics reset. [#9125](https://github.com/emqx/emqx/pull/9125)
## v4.3.20
### Bug fixes
- Fix rule-engine update behaviour which may initialize actions for disabled rules. [#8849](https://github.com/emqx/emqx/pull/8849)
- Fix JWT plugin don't support non-integer timestamp claims. [#8862](https://github.com/emqx/emqx/pull/8862)
- Fix a possible dead loop caused by shared subscriptions with `shared_dispatch_ack_enabled=true`. [#8918](https://github.com/emqx/emqx/pull/8918)
- Fix dashboard binding IP address not working. [#8916](https://github.com/emqx/emqx/pull/8916)
- Fix rule SQL topic matching to null values failed. [#8927](https://github.com/emqx/emqx/pull/8927)
The following SQL should not fail (crash) but return `{"r": false}`:
`SELECT topic =~ 't' as r FROM "$events/client_connected"`.
The topic is a null value as there's no such field in event `$events/client_connected`, so it
should return false if match it to a topic.
## v4.3.19
### Enhancements
- Improve error message for LwM2M plugin when object ID is not valid. [#8654](https://github.com/emqx/emqx/pull/8654).
- Add tzdata apk package to alpine docker image. [#8671](https://github.com/emqx/emqx/pull/8671)
- Refine Rule Engine error log. RuleId will be logged when take action failed. [#8737](https://github.com/emqx/emqx/pull/8737)
- Increases the latency interval for MQTT Bridge test connections to improve compatibility in high-latency environments. [#8745](https://github.com/emqx/emqx/pull/8745)
- Close ExProto client process immediately if it's keepalive timeouted. [#8725](https://github.com/emqx/emqx/pull/8725)
- Upgrade grpc-erl driver to 0.6.7 to support batch operation in sending stream. [#8725](https://github.com/emqx/emqx/pull/8725)
- Improved jwt authentication module initialization process. [#8736](https://github.com/emqx/emqx/pull/8736)
### Bug fixes
- Fix rule SQL compare to null values always returns false. [#8743](https://github.com/emqx/emqx/pull/8743)
Before this change, the following SQL failed to match on the WHERE clause (`clientid != foo` returns false):
`SELECT 'some_var' as clientid FROM "t" WHERE clientid != foo`.
The `foo` variable is a null value, so `clientid != foo` should be evaluated as true.
- Fix GET `/auth_clientid` and `/auth_username` counts. [#8655](https://github.com/emqx/emqx/pull/8655)
- Add an idle timer for ExProto UDP client to avoid client leaking [#8628](https://github.com/emqx/emqx/pull/8628)
- Fix ExHook can't be un-hooked if the grpc service stop first. [#8725](https://github.com/emqx/emqx/pull/8725)
- Fix the problem that ExHook cannot continue hook chains execution for mismatched topics. [#8807](https://github.com/emqx/emqx/pull/8807)
- Fix GET `/listeners/` crashes when listener is not ready. [#8752](https://github.com/emqx/emqx/pull/8752)
- Fix repeated warning messages in bin/emqx [#8824](https://github.com/emqx/emqx/pull/8824)
## v4.3.18
### Enhancements
- Upgrade Erlang/OTP from 23.2.7.2-emqx-3 to 23.3.4.9-3 [#8511](https://github.com/emqx/emqx/pull/8511)
- Make possible to debug-print SSL handshake procedure by setting listener config `log_level=debug` [#8553](https://github.com/emqx/emqx/pull/8553)
- Add option to perform GC on connection process after TLS/SSL handshake is performed. [#8649](https://github.com/emqx/emqx/pull/8649)
Expected to reduce around 35% memory consumption for each SSL connection. See [#8637](https://github.com/emqx/emqx/pull/8637) for more details.
## v4.3.17
### Bug fixes
- Fixed issue where the dashboard APIs were being exposed under the
management listener. [#8411]
- Fixed crash when shared persistent subscription [#8441]
- Fixed issue in Lua hook that prevented messages from being
rejected [#8535]
- Fix ExProto UDP client keepalive checking error.
This causes the clients to not expire as long as a new UDP packet arrives [#8575]
### Enhancements
- HTTP API(GET /rules/) support for pagination and fuzzy filtering. [#8450]
- Add check_conf cli to check config format. [#8486]
- Optimize performance of shared subscription
## v4.3.16
### Enhancements
- Add the possibility of configuring the password for
password-protected private key files used for dashboard and
management HTTPS listeners. [#8129]
- Add message republish supports using placeholder variables to specify QoS and Retain values. Set `${qos}` and `${flags.retain}` use the original QoS & Retain flag.
- Add supports specifying the network interface address of the cluster listener & rpc call listener. Specify `0.0.0.0` use all network interfaces, or a particular network interface IP address.
- ExHook supports to customize the socket parameters for gRPC client. [#8314]
### Bug fixes
- Avoid repeated writing `loaded_plugins` file if the plugin enable stauts has not changed [#8179]
- Correctly tally `connack.auth_error` metrics when a client uses MQTT
3.1. [#8177]
- Do not match ACL rules containing placeholders if there's no
information to fill them. [#8280]
- Fixed issue in Lua hook that didn't prevent a topic from being
subscribed to. [#8288]
- Ensuring that exhook dispatches the client events are sequential. [#8311]
- Ensure start dashboard ok event if default_username is missing.
- Fix key update from JWKS server by JWT auth. [#8337]
- Better errors for JWT claim validations. [#8337]
## v4.3.15
### Enhancements
* Refactored `bin/emqx` help messages.
* Upgrade script refuses upgrade from incompatible versions. (e.g. hot upgrade from 4.3 to 4.4 will fail fast).
* Made possible for EMQX to boot from a Linux directory which has white spaces in its path.
* Add support for JWT authorization [#7596]
Now MQTT clients may be authorized with respect to a specific claim containing publish/subscribe topic whitelists.
* Better randomisation of app screts (changed from timestamp seeded sha hash (uuid) to crypto:strong_rand_bytes)
* Return a client_identifier_not_valid error when username is empty and username_as_clientid is set to true [#7862]
* Add more rule engine date functions: format_date/3, format_date/4, date_to_unix_ts/3, date_to_unix_ts/4 [#7894]
* Add proto_name and proto_ver fields for $event/client_disconnected event.
* Mnesia auth/acl http api support multiple condition queries.
* Inflight QoS1 Messages for shared topics are now redispatched to other alive subscribers upon chosen subscriber session termination.
* Make auth metrics name more understandable.
* Allow emqx_management http listener binding to specific interface [#8005]
* Add rule-engine function float2str/2, user can specify the float output precision [#7991]
### Bug fixes
* List subscription topic (/api/v4/subscriptions), the result do not match with multiple conditions.
* SSL closed error bug fixed for redis client.
* Fix mqtt-sn client disconnected due to re-send a duplicated qos2 message
* Rule-engine function hexstr2bin/1 support half byte [#7977]
* Shared message delivery when all alive shared subs have full inflight [#7984]
* Improved resilience against autocluster partitioning during cluster
startup. [#7876]
[ekka-158](https://github.com/emqx/ekka/pull/158)
* Add regular expression check ^[0-9A-Za-z_\-]+$ for node name [#7979]
* Fix `node_dump` variable sourcing. [#8026]
* Fix heap size is growing too fast when trace large message.
* Support customized timestamp format of the log messages.
## v4.3.14
### Enhancements
* Add `RequestMeta` for exhook.proto in order to expose `cluster_name` of emqx in each gRPC request. [#7524]
* Support customize emqx_exhook execution priority. [#7408]
* add api: PUT /rules/{id}/reset_metrics.
This api reset the metrics of the rule engine of a rule, and reset the metrics of the action related to this rule. [#7474]
* Enhanced rule engine error handling when json parsing error.
* Add support for `RSA-PSK-AES256-GCM-SHA384`, `RSA-PSK-AES256-CBC-SHA384`,
`RSA-PSK-AES128-GCM-SHA256`, `RSA-PSK-AES128-CBC-SHA256` PSK ciphers, and remove `PSK-3DES-EDE-CBC-SHA`,
`PSK-RC4-SHA` from the default configuration. [#7427]
* Diagnostic logging for mnesia `wait_for_table`
- prints check points of mnesia internal stats
- prints check points of per table loading stats
Help to locate the problem of long table loading time.
* Add `local` strategy for Shared Subscription.
That will preferentially dispatch messages to a shared subscriber at the same
node. It will improves the efficiency of shared messages dispatching in certain
scenarios, especially when the emqx-bridge-mqtt plugin is configured as shared
subscription. [#7462]
* Add some compression functions to rule-engine: gzip, gunzip, zip, unzip, zip_compress, zip_uncompress
### Bug fixes
* Prohibit empty topics in strict mode
* Make sure ehttpc delete useless pool always succeed.
* Update mongodb driver to fix potential process leak.
* Fix a potential security issue #3155 with emqx-dashboard plugin.
In the earlier implementation, the Dashboard password is reset back to the
default value of emqx_dashboard.conf after the node left cluster.
Now we persist changed password to protect against reset. [#7518]
* Silence grep/sed warnings in docker-entrypoint.sh. [#7520]
* Generate `loaded_modules` and `loaded_plugins` files with default values when no such files exists. [#7520]
* Fix the configuration `server_name_indication` set to disable does not take effect.
* Fix backup files are not deleted and downloaded correctly when the API path has ISO8859-1 escape characters.
## v4.3.13
### Important changes
* For docker image, /opt/emqx/etc has been removed from the VOLUME list,
this made it easier for the users to rebuild image on top with changed configs.
* CentOS 7 Erlang runtime is rebuilt on OpenSSL-1.1.1n (previously on 1.0),
Prior to v4.3.13, EMQX pick certain cipher suites proposed by the clients,
but then fail to handshake resulting in a `malformed_handshake_data` exception.
* CentOS 8 Erlang runtime is rebuilt on RockyLinux 8.
'centos8' will remain in the package name to keep it backward compatible.
### Enhancements
* CLI `emqx_ctl pem_cache clean` to force purge x509 certificate cache,
to force an immediate reload of all certificates after the files are updated on disk.
* Refactor the ExProto so that anonymous clients can also be displayed on the dashboard [#6983]
* Force shutdown of processes that cannot answer takeover event [#7026]
* Support set keepalive via queryString & Body HTTP API.
* `topic` parameter in bridge configuration can have `${node}` substitution (just like in `clientid` parameter)
* Add UTF-8 string validity check in `strict_mode` for MQTT packet.
When set to true, invalid UTF-8 strings will cause the client to be disconnected. i.e. client ID, topic name. [#7261]
* Changed systemd service restart delay from 10 seconds to 60 seconds.
* MQTT-SN gateway supports initiative to synchronize registered topics after session resumed. [#7300]
* Add load control app for future development.
* Change the precision of float to 17 digits after the decimal point when formatting a
float using payload templates of rule actions. The old precision is 10 digits before
this change. [#7336]
* Return the cached resource status when querying a resource using HTTP APIs.
This is to avoid blocking the HTTP request if the resource is unavailable. [#7374]
### Bug fixes
* Fix the `{error,eexist}` error when do release upgrade again if last run failed. [#7121]
* Fix case where publishing to a non-existent topic alias would crash the connection [#6979]
* Fix HTTP-API 500 error on querying the lwm2m client list on the another node [#7009]
* Fix the ExProto connection registry is not released after the client process abnormally exits [#6983]
* Fix Server-KeepAlive wrongly applied on MQTT v3.0/v3.1 [#7085]
* Fix Stomp client can not trigger `$event/client_connection` message [#7096]
* Fix system memory false alarm at boot
* Fix the MQTT-SN message replay when the topic is not registered to the client [#6970]
* Fix rpc get node info maybe crash when other nodes is not ready.
* Fix false alert level log “cannot_find_plugins” caused by duplicate plugin names in `loaded_plugins` files.
* Prompt user how to change the dashboard's initial default password when emqx start.
* Fix errno=13 'Permission denied' Cannot create FIFO boot error in Amazon Linux 2022 (el8 package)
* Fix user or appid created, name only allow `^[A-Za-z]+[A-Za-z0-9-_]*$`
* Fix subscribe http api crash by bad_qos `/mqtt/subscribe`,`/mqtt/subscribe_batch`.
* Send DISCONNECT packet with reason code 0x98 if connection has been kicked [#7309]
* Auto subscribe to an empty topic will be simply ignored now
## v4.3.12
### Important changes
### Minor changes
* Fix updating `emqx_auth_mnesia.conf` password and restarting the new password does not take effect [#6717]
* Fix import data crash when emqx_auth_mnesia's record is not empty [#6717]
* Fix `os_mon.sysmem_high_watermark` may not alert after reboot.
* Enhancement: Log client status before killing it for holding the lock for too long.
[emqx-6959](https://github.com/emqx/emqx/pull/6959)
[ekka-144](https://github.com/emqx/ekka/pull/144)
[ekka-146](https://github.com/emqx/ekka/pull/146)
## v4.3.11
Important notes:
- For Debian/Ubuntu users
We changed the package installed service from init.d to systemd.
The upgrade from init.d to systemd is verified, however it is
recommended to verify it before rolling out to production.
At least to ensure systemd is available in your system.
- For Centos Users
RPM package now depends on `openssl11` which is NOT available
in certain centos distributions.
Please make sure the yum repo [epel-release](https://docs.fedoraproject.org/en-US/epel) is installed.
### Important changes
* Debian/Ubuntu package (deb) installed EMQX now runs on systemd [#6389]<br>
This is to take advantage of systemd's supervision functionality to ensure
EMQX service is restarted after crashes.
### Minor changes
* Clustering malfunction fixes [#6221, #6381]
Mostly changes made in [ekka](https://github.com/emqx/ekka/pull/134)<br>
From 0.8.1.4 to 0.8.1.6, fixes included intra-cluster RPC call timeouts,<br>
also fixed `ekka_locker` process crashed after killing a hanged lock owner.
* Improved log message when TCP proxy is in use but proxy_protocol configuration is not turned on [#6416]<br>
"please check proxy_protocol config for specific listeners and zones" to hint a misconfiguration
* Helm chart supports networking.k8s.io/v1 [#6368]
* Fix session takeover race condition which may lead to message loss [#6396]
* EMQX docker images are pushed to aws public ecr in an automated CI job [#6271]<br>
`docker pull public.ecr.aws/emqx/emqx:4.3.10`
* Fix webhook URL path to allow rule-engine variable substitution [#6399]
* Corrected RAM usage display [#6379]
* Changed emqx_sn_registry table creation to runtime [#6357]<br>
This was a bug introduced in 4.3.3, in which the table is changed from ets to mnesia<br>
this will cause upgrade to fail when a later version node joins a 4.3.0-2 cluster<br>
* Log level for normal termination changed from info to debug [#6358]
* Added config `retainer.stop_publish_clear_msg` to enable/disable empty message retained message publish [#6343]<br>
In MQTT 3.1.1, it is unclear if a MQTT broker should publish the 'clear' (no payload) message<br>
to the subscribers, or just delete the retained message. So we have made it configurable
* Fix mqtt bridge malfunction when remote host is unreachable (hangs the connection) [#6286, #6323]
* System monitor now inspects `current_stacktrace` of suspicious process [#6290]<br>
`current_function` was not quite helpful
* Changed default `max_topc_levels` config value to 128 [#6294, #6420]<br>
previously it has no limit (config value = 0), which can be a potential DoS threat
* Collect only libcrypto and libtinfo so files for zip package [#6259]<br>
in 4.3.10 we tried to collect all so files, however glibc is not quite portable
* Added openssl-1.1 to RPM dependency [#6239]
* Http client duplicated header fix [#6195]
* Fix `node_dump` issues when working with deb or rpm installation [#6209]
* Pin Erlang/OTP 23.2.7.2-emqx-3 [#6246]<br>
4.3.10 is on 23.2.7.2-emqx-2, this bump is to fix an ECC signature name typo:
ecdsa_secp512r1_sha512 -> ecdsa_secp521r1_sha512
* HTTP client performance improvement [#6474, #6414]<br>
The changes are mostly done in the dependency [repo](https://github.com/emqx/ehttpc).
* For messages from gateways add message properties as MQTT message headers [#6142]<br>
e.g. messages from CoAP, LwM2M, Stomp, ExProto, when translated into MQTT message<br>
properties such as protocol name, protocol version, username (if any) peer-host<br>
etc. are filled as MQTT message headers.
* Format the message id to hex strings in the log message [#6961]
## v4.3.0~10
Older version changes are not tracked here.

289
CHANGES-4.4.md Normal file
View File

@ -0,0 +1,289 @@
# EMQX 4.4 Changes
## v4.4.10
### Bug fixes (synced from v4.3.21)
- Fix the latency statistics error of the slow subscription module when `stats_type` is `internal` or `response`. [#8981](https://github.com/emqx/emqx/pull/8981)
## v4.4.9
### Bug fixes (synced from v4.3.20)
- Fix rule-engine update behaviour which may initialize actions for disabled rules. [#8849](https://github.com/emqx/emqx/pull/8849)
- Fix JWT plugin don't support non-integer timestamp claims. [#8862](https://github.com/emqx/emqx/pull/8862)
- Fix a possible dead loop caused by shared subscriptions with `shared_dispatch_ack_enabled=true`. [#8918](https://github.com/emqx/emqx/pull/8918)
- Fix dashboard binding IP address not working. [#8916](https://github.com/emqx/emqx/pull/8916)
- Fix rule SQL topic matching to null values failed. [#8927](https://github.com/emqx/emqx/pull/8927)
The following SQL should not fail (crash) but return `{"r": false}`:
`SELECT topic =~ 't' as r FROM "$events/client_connected"`.
The topic is a null value as there's no such field in event `$events/client_connected`, so it
should return false if match it to a topic.
## v4.4.8
### Enhancements (synced from v4.3.19)
* Support HTTP API `/trace/:name/detail`.
### Bug fixes
- Fix: Check if emqx_mod_trace is enabled when the trace file is not found.
### Enhancements (synced from v4.3.19)
- Improve error message for LwM2M plugin when object ID is not valid. [#8654](https://github.com/emqx/emqx/pull/8654).
- Add tzdata apk package to alpine docker image. [#8671](https://github.com/emqx/emqx/pull/8671)
- Refine Rule Engine error log. RuleId will be logged when take action failed. [#8737](https://github.com/emqx/emqx/pull/8737)
- Increases the latency interval for MQTT Bridge test connections to improve compatibility in high-latency environments. [#8745](https://github.com/emqx/emqx/pull/8745)
- Close ExProto client process immediately if it's keepalive timeouted. [#8725](https://github.com/emqx/emqx/pull/8725)
- Upgrade grpc-erl driver to 0.6.7 to support batch operation in sending stream. [#8725](https://github.com/emqx/emqx/pull/8725)
- Improved jwt authentication module initialization process. [#8736](https://github.com/emqx/emqx/pull/8736)
### Bug fixes (synced from v4.3.19)
- Fix rule SQL compare to null values always returns false. [#8743](https://github.com/emqx/emqx/pull/8743)
Before this change, the following SQL failed to match on the WHERE clause (`clientid != foo` returns false):
`SELECT 'some_var' as clientid FROM "t" WHERE clientid != foo`.
The `foo` variable is a null value, so `clientid != foo` should be evaluated as true.
- Fix GET `/auth_clientid` and `/auth_username` counts. [#8655](https://github.com/emqx/emqx/pull/8655)
- Add an idle timer for ExProto UDP client to avoid client leaking [#8628](https://github.com/emqx/emqx/pull/8628)
- Fix ExHook can't be un-hooked if the grpc service stop first. [#8725](https://github.com/emqx/emqx/pull/8725)
- Fix the problem that ExHook cannot continue hook chains execution for mismatched topics. [#8807](https://github.com/emqx/emqx/pull/8807)
- Fix GET `/listeners/` crashes when listener is not ready. [#8752](https://github.com/emqx/emqx/pull/8752)
- Fix repeated warning messages in bin/emqx [#8824](https://github.com/emqx/emqx/pull/8824)
## v4.4.7
### Enhancements (synced from v4.3.18)
- Make possible to debug-print SSL handshake procedure by setting listener config `log_level=debug` [#8553](https://github.com/emqx/emqx/pull/8553)
- Add option to perform GC on connection process after TLS/SSL handshake is performed. [#8649](https://github.com/emqx/emqx/pull/8649)
Expected to reduce around 35% memory consumption for each SSL connection. See [#8637](https://github.com/emqx/emqx/pull/8637) for more details.
## v4.4.6
### Bug fixes (synced from v4.3.17)
- Fixed issue where the dashboard APIs were being exposed under the
management listener. [#8411]
- Fixed crash when shared persistent subscription [#8441]
- Fixed issue in Lua hook that prevented messages from being
rejected [#8535]
- Fix ExProto UDP client keepalive checking error.
This causes the clients to not expire as long as a new UDP packet arrives [#8575]
### Enhancements (synced from v4.3.17)
- HTTP API(GET /rules/) support for pagination and fuzzy filtering. [#8450]
- Add check_conf cli to check config format. [#8486]
- Optimize performance of shared subscription
## v4.4.5 (v4.3.16)
### Enhancements
- HTTP API `mqtt/publish` support to publish with properties and user_properties.
### Bug fixes
- Clean trace zip files when file has been downloaded.
- Remove unnecessary error messages generated by JWT auth.
## v4.4.4
### Enhancements (synced from v4.3.15)
* Refactored `bin/emqx` help messages.
* Upgrade script refuses upgrade from incompatible versions. (e.g. hot upgrade from 4.3 to 4.4 will fail fast).
* Made possible for EMQX to boot from a Linux directory which has white spaces in its path.
* Add support for JWT authorization [#7596]
Now MQTT clients may be authorized with respect to a specific claim containing publish/subscribe topic whitelists.
* Better randomisation of app screts (changed from timestamp seeded sha hash (uuid) to crypto:strong_rand_bytes)
* Return a client_identifier_not_valid error when username is empty and username_as_clientid is set to true [#7862]
* Add more rule engine date functions: format_date/3, format_date/4, date_to_unix_ts/4 [#7894]
* Add proto_name and proto_ver fields for $event/client_disconnected event.
* Mnesia auth/acl http api support multiple condition queries.
* Inflight QoS1 Messages for shared topics are now redispatched to another alive subscribers upon chosen subscriber session termination.
* Make auth metrics name more understandable.
* Allow emqx_management http listener binding to specific interface [#8005]
* Add rule-engine function float2str/2, user can specify the float output precision [#7991]
### Bug fixes
- Allow uploading or referencing a backup file outside the
`data/backup` directory when restoring a backup. [#7996]
### Bug fixes (synced from v4.3.15)
* List subscription topic (/api/v4/subscriptions), the result do not match with multiple conditions.
* SSL closed error bug fixed for redis client.
* Fix mqtt-sn client disconnected due to re-send a duplicated qos2 message
* Rule-engine function hexstr2bin/1 support half byte [#7977]
* Shared message delivery when all alive shared subs have full inflight [#7984]
* Improved resilience against autocluster partitioning during cluster
startup. [#7876]
[ekka-158](https://github.com/emqx/ekka/pull/158)
* Add regular expression check ^[0-9A-Za-z_\-]+$ for node name [#7979]
* Fix `node_dump` variable sourcing. [#8026]
* Fix heap size is growing too fast when trace large message.
* Support customized timestamp format of the log messages.
## v4.4.3
** NOTE**: v4.4.3 is in sync with v4.3.14
### Enhancements
* Add rule events: client.connack, client.check_acl_complete
- client.connack The rule event is triggered when the server sends a CONNACK packet to the client. reason_code contains the error reason code.
- client.check_acl_complete The rule event is triggered when the client check acl complete.
### Enhancements (synced from v4.3.14)
* Add `RequestMeta` for exhook.proto in order to expose `cluster_name` of emqx in each gRPC request. [#7524]
* Support customize emqx_exhook execution priority. [#7408]
* add api: PUT /rules/{id}/reset_metrics.
This api reset the metrics of the rule engine of a rule, and reset the metrics of the action related to this rule. [#7474]
* Enhanced rule engine error handling when json parsing error.
* Add support for `RSA-PSK-AES256-GCM-SHA384`, `RSA-PSK-AES256-CBC-SHA384`,
`RSA-PSK-AES128-GCM-SHA256`, `RSA-PSK-AES128-CBC-SHA256` PSK ciphers, and remove `PSK-3DES-EDE-CBC-SHA`,
`PSK-RC4-SHA` from the default configuration. [#7427]
* Diagnostic logging for mnesia `wait_for_table`
- prints check points of mnesia internal stats
- prints check points of per table loading stats
Help to locate the problem of long table loading time.
* Add `local` strategy for Shared Subscription.
That will preferentially dispatch messages to a shared subscriber at the same
node. It will improves the efficiency of shared messages dispatching in certain
scenarios, especially when the emqx-bridge-mqtt plugin is configured as shared
subscription. [#7462]
* Add some compression functions to rule-engine: gzip, gunzip, zip, unzip, zip_compress, zip_uncompress
### Bug Fixes (synced from v4.3.14)
* Prohibit empty topics in strict mode
* Make sure ehttpc delete useless pool always succeed.
* Update mongodb driver to fix potential process leak.
* Fix a potential security issue #3155 with emqx-dashboard plugin.
In the earlier implementation, the Dashboard password is reset back to the
default value of emqx_dashboard.conf after the node left cluster.
Now we persist changed password to protect against reset. [#7518]
* Silence grep/sed warnings in docker-entrypoint.sh. [#7520]
* Generate `loaded_modules` and `loaded_plugins` files with default values when no such files exists. [#7520]
* Fix the configuration `server_name_indication` set to disable does not take effect.
* Fix backup files are not deleted and downloaded correctly when the API path has ISO8859-1 escape characters.
## v4.4.2
**NOTE**: v4.4.2 is in sync with: v4.3.13
### Important changes
* Docker image is based on alpine-3.15.1 (OpenSSL-1.1.1n)
* For docker image, /opt/emqx/etc has been removed from the VOLUME list,
this made it easier for the users to rebuild image on top with changed configs.
* CentOS 7 Erlang runtime is rebuilt on OpenSSL-1.1.1n (previously on 1.0),
Prior to v4.4.1, EMQX may pick certain cipher suites proposed by the clients,
but then fail to handshake resulting in a `malformed_handshake_data` exception.
### Enhancements
* Windows package is built on Erlang/OTP 24
### Enhancements (synced from v4.3.13)
* CLI `emqx_ctl pem_cache clean` to force purge x509 certificate cache,
to force an immediate reload of all certificates after the files are updated on disk.
* Refactor the ExProto so that anonymous clients can also be displayed on the dashboard [#6983]
* Force shutdown of processes that cannot answer takeover event [#7026]
* Support set keepalive via queryString & Body HTTP API.
* `topic` parameter in bridge configuration can have `${node}` substitution (just like in `clientid` parameter)
* Add UTF-8 string validity check in `strict_mode` for MQTT packet.
When set to true, invalid UTF-8 strings will cause the client to be disconnected. i.e. client ID, topic name. [#7261]
* Changed systemd service restart delay from 10 seconds to 60 seconds.
* MQTT-SN gateway supports initiative to synchronize registered topics after session resumed. [#7300]
* Add load control app for future development.
* Change the precision of float to 17 digits after the decimal point when formatting a
float using payload templates of rule actions. The old precision is 10 digits before
this change.
### Bug fixes (synced from v4.3.13)
* Fix the `{error,eexist}` error when do release upgrade again if last run failed. [#7121]
* Fix case where publishing to a non-existent topic alias would crash the connection [#6979]
* Fix HTTP-API 500 error on querying the lwm2m client list on the another node [#7009]
* Fix the ExProto connection registry is not released after the client process abnormally exits [#6983]
* Fix Server-KeepAlive wrongly applied on MQTT v3.0/v3.1 [#7085]
* Fix Stomp client can not trigger `$event/client_connection` message [#7096]
* Fix system memory false alarm at boot
* Fix the MQTT-SN message replay when the topic is not registered to the client [#6970]
* Fix rpc get node info maybe crash when other nodes is not ready.
* Fix false alert level log “cannot_find_plugins” caused by duplicate plugin names in `loaded_plugins` files.
* Prompt user how to change the dashboard's initial default password when emqx start.
* Fix errno=13 'Permission denied' Cannot create FIFO boot error in Amazon Linux 2022 (el8 package)
* Fix user or appid created, name only allow `^[A-Za-z]+[A-Za-z0-9-_]*$`
* Fix subscribe http api crash by bad_qos `/mqtt/subscribe`,`/mqtt/subscribe_batch`.
* Send DISCONNECT packet with reason code 0x98 if connection has been kicked [#7309]
* Fix make all traces stopped when emqx_trace_module is disabled.
## v4.4.1
This patch release is only to fix windows build which failed on v4.4.0.
## v4.4.0
**NOTE**: v4.4.0 is in sync with: v4.3.12
### Important changes
- **For Debian/Ubuntu users**, Debian/Ubuntu package (deb) installed EMQX is now started from systemd.
This is to use systemd's supervision functionality to ensure that EMQX service restarts after a crash.
The package installation service upgrade from init.d to systemd has been verified,
it is still recommended that you verify and confirm again before deploying to the production environment,
at least to ensure that systemd is available in your system
- Package name scheme changed comparing to 4.3.
4.3 format: emqx-centos8-4.3.8-amd64.zip
4.4 format: emqx-4.4.0-rc.1-otp24.1.5-3-el8-amd64.zip
* Erlang/OTP version is included in the package name,
providing the possibility to release EMQX on multiple Erlang/OTP versions
* `centos` is renamed to `el`. This is mainly due to centos8 being dead (replaced with rockylinux8)
- MongoDB authentication supports DNS SRV and TXT Records resolution, which can seamlessly connect with MongoDB Altas
- Support dynamic modification of MQTT Keep Alive to adapt to different energy consumption strategies.
- Support 4.3 to 4.4 rolling upgrade of clustered nodes. See upgrade document for more dtails.
- TLS for cluster backplane (RPC) connections. See clustering document for more details.
- Support real-time tracing in the dashboard, with Client ID, Client IP address, and topic name based filtering.
- Add the Slow Subscriptions module to count the time spent during the message transmission. This feature will list the Clients and Topics with higher time consumption in Dashboard
### Minor changes
- Bumpped default boot wait time from 15 seconds to 150 seconds
because in some simulated environments it may take up to 70 seconds to boot in build CI
- Dashboard supports relative paths and custom access paths
- Supports configuring whether to forward retained messages with empty payload to suit users
who are still using MQTT v3.1. The relevant configurable item is `retainer.stop_publish_clear_msg`
- Multi-language hook extension (ExHook) supports dynamic cancellation of subsequent forwarding of client messages
- Rule engine SQL supports the use of single quotes in `FROM` clauses, for example: `SELECT * FROM 't/#'`
- Change the default value of the `max_topic_levels` configurable item to 128.
Previously, it had no limit (configured to 0), which may be a potential DoS threat
- Improve the error log content when the Proxy Protocol message is received without `proxy_protocol` configured.
- Add additional message attributes to the message reported by the gateway.
Messages from gateways such as CoAP, LwM2M, Stomp, ExProto, etc., when converted to EMQX messages,
add fields such as protocol name, protocol version, user name, client IP, etc.,
which can be used for multi-language hook extension (ExHook)
- HTTP client performance improvement
- Add openssl-1.1 to RPM dependency

View File

@ -1,20 +1,37 @@
$(shell $(CURDIR)/scripts/git-hooks-init.sh)
REBAR_VERSION = 3.14.3-emqx-8
REBAR = $(CURDIR)/rebar3
BUILD = $(CURDIR)/build
SCRIPTS = $(CURDIR)/scripts
export PKG_VSN ?= $(shell $(CURDIR)/pkg-vsn.sh)
export EMQX_DESC ?= EMQ X
export EMQX_CE_DASHBOARD_VERSION ?= v4.3.1
export EMQX_RELUP ?= true
export EMQX_DEFAULT_BUILDER = ghcr.io/emqx/emqx-builder/4.4-20:24.3.4.2-1-alpine3.15.1
export EMQX_DEFAULT_RUNNER = alpine:3.15.1
export DOCKERFILE := deploy/docker/Dockerfile
export DOCKERFILE_TESTING := deploy/docker/Dockerfile.testing
ifeq ($(OS),Windows_NT)
export REBAR_COLOR=none
FIND=/usr/bin/find
else
FIND=find
endif
# `:=` should be used here, otherwise the `$(shell ...)` will be executed every time when the variable is used
# In make 4.4+, for backward-compatibility the value from the original environment is used.
# so the shell script will be executed tons of times.
ifeq ($(strip $(OTP_VSN)),)
export OTP_VSN := $(shell $(SCRIPTS)/get-otp-vsn.sh)
endif
ifeq ($(strip $(PKG_VSN)),)
export PKG_VSN := $(shell $(CURDIR)/pkg-vsn.sh)
endif
PROFILE ?= emqx
REL_PROFILES := emqx emqx-edge
PKG_PROFILES := emqx-pkg emqx-edge-pkg
PROFILES := $(REL_PROFILES) $(PKG_PROFILES) default
CT_READABLE ?= true
export REBAR_GIT_CLONE_OPTIONS += --depth=1
.PHONY: default
@ -26,7 +43,7 @@ all: $(REBAR) $(PROFILES)
.PHONY: ensure-rebar3
ensure-rebar3:
@$(SCRIPTS)/fail-on-old-otp-version.escript
@$(SCRIPTS)/ensure-rebar3.sh $(REBAR_VERSION)
@$(SCRIPTS)/ensure-rebar3.sh
$(REBAR): ensure-rebar3
@ -51,11 +68,19 @@ APPS=$(shell $(CURDIR)/scripts/find-apps.sh)
## app/name-ct targets are intended for local tests hence cover is not enabled
.PHONY: $(APPS:%=%-ct)
define gen-app-ct-target
$1-ct:
$(REBAR) ct --name 'test@127.0.0.1' -v --suite $(shell $(CURDIR)/scripts/find-suites.sh $1)
$1-ct: $(REBAR)
$(REBAR) ct --name 'test@127.0.0.1' -v --readable $(CT_READABLE) --suite $(shell $(CURDIR)/scripts/find-suites.sh $1)
endef
$(foreach app,$(APPS),$(eval $(call gen-app-ct-target,$(app))))
## app/name-ct-pipeline targets are used in pipeline -> make cover data for each app
.PHONY: $(APPS:%=%-ct-pipeline)
define gen-app-ct-target-pipeline
$1-ct-pipeline: $(REBAR)
$(REBAR) ct --name 'test@127.0.0.1' -c -v --readable $(CT_READABLE) --cover_export_name $(PROFILE)-$(subst /,-,$1) --suite $(shell $(CURDIR)/scripts/find-suites.sh $1)
endef
$(foreach app,$(APPS),$(eval $(call gen-app-ct-target-pipeline,$(app))))
## apps/name-prop targets
.PHONY: $(APPS:%=%-prop)
define gen-app-prop-target
@ -73,6 +98,7 @@ coveralls: $(REBAR)
@ENABLE_COVER_COMPILE=1 $(REBAR) as test coveralls send
.PHONY: $(REL_PROFILES)
$(REL_PROFILES:%=%): $(REBAR) get-dashboard
@$(REBAR) as $(@) do compile,release
@ -85,16 +111,21 @@ $(REL_PROFILES:%=%): $(REBAR) get-dashboard
clean: $(PROFILES:%=clean-%)
$(PROFILES:%=clean-%):
@if [ -d _build/$(@:clean-%=%) ]; then \
rm -f rebar.lock; \
rm -rf _build/$(@:clean-%=%)/rel; \
find _build/$(@:clean-%=%) -name '*.beam' -o -name '*.so' -o -name '*.app' -o -name '*.appup' -o -name '*.o' -o -name '*.d' -type f | xargs rm -f; \
$(FIND) _build/$(@:clean-%=%) -name '*.beam' -o -name '*.so' -o -name '*.app' -o -name '*.appup' -o -name '*.o' -o -name '*.d' -type f | xargs rm -f; \
$(FIND) _build/$(@:clean-%=%) -type l -delete; \
fi
.PHONY: clean-all
clean-all:
@rm -f rebar.lock
@rm -rf _build
@rm -f rebar.lock
.PHONY: deps-all
deps-all: $(REBAR) $(PROFILES:%=deps-%)
@make clean # ensure clean at the end
## deps-<profile> is used in CI scripts to download deps and the
## share downloads between CI steps and/or copied into containers
@ -102,10 +133,12 @@ deps-all: $(REBAR) $(PROFILES:%=deps-%)
.PHONY: $(PROFILES:%=deps-%)
$(PROFILES:%=deps-%): $(REBAR) get-dashboard
@$(REBAR) as $(@:deps-%=%) get-deps
@rm -f rebar.lock
.PHONY: xref
xref: $(REBAR)
xref: $(REBAR) $(REL_PROFILES:%=%-rel)
@$(REBAR) as check xref
@scripts/xref-check.escript
.PHONY: dialyzer
dialyzer: $(REBAR)
@ -118,10 +151,19 @@ COMMON_DEPS := $(REBAR) get-dashboard $(CONF_SEGS)
$(REL_PROFILES:%=%-rel) $(PKG_PROFILES:%=%-rel): $(COMMON_DEPS)
@$(BUILD) $(subst -rel,,$(@)) rel
## download relup base packages
.PHONY: $(REL_PROFILES:%=%-relup-downloads)
define download-relup-packages
$1-relup-downloads:
@if [ "$${EMQX_RELUP}" = "true" ]; then $(CURDIR)/scripts/relup-base-packages.sh $1; fi
endef
ALL_ZIPS = $(REL_PROFILES)
$(foreach zt,$(ALL_ZIPS),$(eval $(call download-relup-packages,$(zt))))
## relup target is to create relup instructions
.PHONY: $(REL_PROFILES:%=%-relup)
define gen-relup-target
$1-relup: $(COMMON_DEPS)
$1-relup: $1-relup-downloads $(COMMON_DEPS)
@$(BUILD) $1 relup
endef
ALL_ZIPS = $(REL_PROFILES)
@ -144,11 +186,30 @@ $1: $1-rel
endef
$(foreach pt,$(PKG_PROFILES),$(eval $(call gen-pkg-target,$(pt))))
## docker target is to create docker instructions
.PHONY: $(REL_PROFILES:%=%-docker)
define gen-docker-target
$1-docker: $(COMMON_DEPS)
@$(BUILD) $1 docker
endef
ALL_ZIPS = $(REL_PROFILES)
$(foreach zt,$(ALL_ZIPS),$(eval $(call gen-docker-target,$(zt))))
## emqx-docker-testing
## emqx-ee-docker-testing
## is to directly copy a unzipped zip-package to a
## base image such as ubuntu20.04. Mostly for testing
.PHONY: $(REL_PROFILES:%=%-docker-testing)
define gen-docker-target-testing
$1-docker-testing: $(COMMON_DEPS)
@$(BUILD) $1 docker-testing
endef
ALL_ZIPS = $(REL_PROFILES)
$(foreach zt,$(ALL_ZIPS),$(eval $(call gen-docker-target-testing,$(zt))))
.PHONY: run
run: $(PROFILE) quickrun
.PHONY: quickrun
quickrun:
./_build/$(PROFILE)/rel/emqx/bin/emqx console
include docker.mk

5
NOTICE Normal file
View File

@ -0,0 +1,5 @@
EMQX, a highly scalable, highly available distributed MQTT messaging broker for IoT.
Copyright (c) 2017-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
This product contains code developed at EMQ Technologies Co., Ltd.
Visit https://www.emqx.come to learn more.

View File

@ -1,32 +1,30 @@
# EMQ X Broker
# EMQX Broker
[![GitHub Release](https://img.shields.io/github/release/emqx/emqx?color=brightgreen)](https://github.com/emqx/emqx/releases)
[![Build Status](https://travis-ci.org/emqx/emqx.svg)](https://travis-ci.org/emqx/emqx)
[![Coverage Status](https://coveralls.io/repos/github/emqx/emqx/badge.svg)](https://coveralls.io/github/emqx/emqx)
[![Docker Pulls](https://img.shields.io/docker/pulls/emqx/emqx)](https://hub.docker.com/r/emqx/emqx)
[![Slack Invite](<https://slack-invite.emqx.io/badge.svg>)](https://slack-invite.emqx.io)
[![Slack](https://img.shields.io/badge/Slack-EMQ-39AE85?logo=slack)](https://slack-invite.emqx.io/)
[![Twitter](https://img.shields.io/badge/Twitter-EMQ-1DA1F2?logo=twitter)](https://twitter.com/EMQTech)
[![Community](https://img.shields.io/badge/Community-EMQ%20X-yellow)](https://askemq.com)
[![YouTube](https://img.shields.io/badge/Subscribe-EMQ%20中文-FF0000?logo=youtube)](https://www.youtube.com/channel/UCir_r04HIsLjf2qqyZ4A8Cg)
[![最棒的物联网 MQTT 开源团队期待您的加入](https://www.emqx.io/static/img/github_readme_cn_bg.png)](https://careers.emqx.cn/)
[English](./README.md) | 简体中文 | [日本語](./README-JP.md) | [русский](./README-RU.md)
*EMQ X* 是一款完全开源,高度可伸缩,高可用的分布式 MQTT 消息服务器,适用于 IoT、M2M 和移动应用程序,可处理千万级别的并发客户端。
*EMQX* 是一款完全开源,高度可伸缩,高可用的分布式 MQTT 消息服务器,适用于 IoT、M2M 和移动应用程序,可处理千万级别的并发客户端。
从 3.0 版本开始,*EMQ X* 完整支持 MQTT V5.0 协议规范,向下兼容 MQTT V3.1 和 V3.1.1,并支持 MQTT-SN、CoAP、LwM2M、WebSocket 和 STOMP 等通信协议。EMQ X 3.0 单集群可支持千万级别的 MQTT 并发连接。
从 3.0 版本开始,*EMQX* 完整支持 MQTT V5.0 协议规范,向下兼容 MQTT V3.1 和 V3.1.1,并支持 MQTT-SN、CoAP、LwM2M、WebSocket 和 STOMP 等通信协议。EMQX 3.0 单集群可支持千万级别的 MQTT 并发连接。
- 新功能的完整列表,请参阅 [EMQ X Release Notes](https://github.com/emqx/emqx/releases)。
- 获取更多信息,请访问 [EMQ X 官网](https://www.emqx.cn/)。
- 新功能的完整列表,请参阅 [EMQX Release Notes](https://github.com/emqx/emqx/releases)。
- 获取更多信息,请访问 [EMQX 官网](https://www.emqx.cn/)。
## 安装
*EMQ X* 是跨平台的,支持 Linux、Unix、macOS 以及 Windows。这意味着 *EMQ X* 可以部署在 x86_64 架构的服务器上,也可以部署在 Raspberry Pi 这样的 ARM 设备上。
*EMQX* 是跨平台的,支持 Linux、Unix、macOS 以及 Windows。这意味着 *EMQX* 可以部署在 x86_64 架构的服务器上,也可以部署在 Raspberry Pi 这样的 ARM 设备上。
Windows 上编译和运行 *EMQ X* 的详情参考:[Windows.md](./Windows.md)
Windows 上编译和运行 *EMQX* 的详情参考:[Windows.md](./Windows.md)
#### EMQ X Docker 镜像安装
#### EMQX Docker 镜像安装
```
docker run -d --name emqx -p 1883:1883 -p 8081:8081 -p 8083:8083 -p 8883:8883 -p 8084:8084 -p 18083:18083 emqx/emqx
@ -34,14 +32,14 @@ docker run -d --name emqx -p 1883:1883 -p 8081:8081 -p 8083:8083 -p 8883:8883 -p
#### 二进制软件包安装
需从 [EMQ X 下载](https://www.emqx.cn/downloads) 页面获取相应操作系统的二进制软件包。
需从 [EMQX 下载](https://www.emqx.cn/downloads) 页面获取相应操作系统的二进制软件包。
- [单节点安装文档](https://docs.emqx.cn/broker/latest/getting-started/install.html)
- [集群配置文档](https://docs.emqx.cn/broker/latest/advanced/cluster.html)
## 从源码构建
3.0 版本开始,构建 *EMQ X* 需要 Erlang/OTP R21+。
3.0 版本开始,构建 *EMQX* 需要 Erlang/OTP R21+。
4.3 及以后的版本:
@ -77,7 +75,7 @@ _build/emqx/rel/emqx/bin/emqx console
./bin/emqx stop
```
*EMQ X* 启动,可以使用浏览器访问 http://localhost:18083 来查看 Dashboard。
*EMQX* 启动,可以使用浏览器访问 http://localhost:18083 来查看 Dashboard。
## 测试
@ -108,7 +106,7 @@ DIALYZER_ANALYSE_APP=emqx_lwm2m,emqx_auth_jwt,emqx_auth_ldap make dialyzer
### FAQ
访问 [EMQ X FAQ](https://docs.emqx.cn/broker/latest/faq/faq.html) 以获取常见问题的帮助。
访问 [EMQX FAQ](https://docs.emqx.cn/broker/latest/faq/faq.html) 以获取常见问题的帮助。
### 问答
@ -117,7 +115,7 @@ DIALYZER_ANALYSE_APP=emqx_lwm2m,emqx_auth_jwt,emqx_auth_ldap make dialyzer
### 参与设计
如果对 EMQ X 有改进建议,可以向[EIP](https://github.com/emqx/eip) 提交 PR 和 ISSUE
如果对 EMQX 有改进建议,可以向[EIP](https://github.com/emqx/eip) 提交 PR 和 ISSUE
### 插件开发

View File

@ -1,33 +1,31 @@
# EMQ X Broker
# EMQX Broker
[![GitHub Release](https://img.shields.io/github/release/emqx/emqx?color=brightgreen)](https://github.com/emqx/emqx/releases)
[![Build Status](https://travis-ci.org/emqx/emqx.svg)](https://travis-ci.org/emqx/emqx)
[![Coverage Status](https://coveralls.io/repos/github/emqx/emqx/badge.svg)](https://coveralls.io/github/emqx/emqx)
[![Docker Pulls](https://img.shields.io/docker/pulls/emqx/emqx)](https://hub.docker.com/r/emqx/emqx)
[![Slack Invite](<https://slack-invite.emqx.io/badge.svg>)](https://slack-invite.emqx.io)
[![Slack](https://img.shields.io/badge/Slack-EMQ-39AE85?logo=slack)](https://slack-invite.emqx.io/)
[![Twitter](https://img.shields.io/badge/Twitter-EMQ-1DA1F2?logo=twitter)](https://twitter.com/EMQTech)
[![YouTube](https://img.shields.io/badge/Subscribe-EMQ-FF0000?logo=youtube)](https://www.youtube.com/channel/UC5FjR77ErAxvZENEWzQaO5Q)
[![The best IoT MQTT open source team looks forward to your joining](https://www.emqx.io/static/img/github_readme_en_bg.png)](https://www.emqx.io/careers)
[English](./README.md) | [简体中文](./README-CN.md) | 日本語 | [русский](./README-RU.md)
*EMQ X* は、高い拡張性と可用性をもつ、分散型のMQTTブローカーです。数千万のクライアントを同時に処理するIoT、M2M、モバイルアプリケーション向けです。
*EMQX* は、高い拡張性と可用性をもつ、分散型のMQTTブローカーです。数千万のクライアントを同時に処理するIoT、M2M、モバイルアプリケーション向けです。
version 3.0 以降、*EMQ X* は MQTT V5.0 の仕様を完全にサポートしており、MQTT V3.1およびV3.1.1とも下位互換性があります。
version 3.0 以降、*EMQX* は MQTT V5.0 の仕様を完全にサポートしており、MQTT V3.1およびV3.1.1とも下位互換性があります。
MQTT-SN、CoAP、LwM2M、WebSocket、STOMPなどの通信プロトコルをサポートしています。 MQTTの同時接続数は1つのクラスター上で1,000万以上にまでスケールできます。
- 新機能の一覧については、[EMQ Xリリースート](https://github.com/emqx/emqx/releases)を参照してください。
- 詳細はこちら[EMQ X公式ウェブサイト](https://www.emqx.io/)をご覧ください。
- 新機能の一覧については、[EMQXリリースート](https://github.com/emqx/emqx/releases)を参照してください。
- 詳細はこちら[EMQX公式ウェブサイト](https://www.emqx.io/)をご覧ください。
## インストール
*EMQ X* はクロスプラットフォームで、Linux、Unix、macOS、Windowsをサポートしています。
そのため、x86_64アーキテクチャサーバー、またはRaspberryPiなどのARMデバイスに *EMQ X* をデプロイすることもできます。
*EMQX* はクロスプラットフォームで、Linux、Unix、macOS、Windowsをサポートしています。
そのため、x86_64アーキテクチャサーバー、またはRaspberryPiなどのARMデバイスに *EMQX* をデプロイすることもできます。
Windows上における *EMQ X* のビルドと実行については、[Windows.md](./Windows.md)をご参照ください。
Windows上における *EMQX* のビルドと実行については、[Windows.md](./Windows.md)をご参照ください。
#### Docker イメージによる EMQ X のインストール
#### Docker イメージによる EMQX のインストール
```
docker run -d --name emqx -p 1883:1883 -p 8083:8083 -p 8883:8883 -p 8084:8084 -p 18083:18083 emqx/emqx
@ -35,14 +33,14 @@ docker run -d --name emqx -p 1883:1883 -p 8083:8083 -p 8883:8883 -p 8084:8084 -p
#### バイナリパッケージによるインストール
それぞれのOSに対応したバイナリソフトウェアパッケージは、[EMQ Xのダウンロード](https://www.emqx.io/downloads)ページから取得できます。
それぞれのOSに対応したバイナリソフトウェアパッケージは、[EMQXのダウンロード](https://www.emqx.io/downloads)ページから取得できます。
- [シングルノードインストール](https://docs.emqx.io/broker/latest/en/getting-started/installation.html)
- [マルチノードインストール](https://docs.emqx.io/broker/latest/en/advanced/cluster.html)
## ソースからビルド
version 3.0 以降の *EMQ X* をビルドするには Erlang/OTP R21+ が必要です。
version 3.0 以降の *EMQX* をビルドするには Erlang/OTP R21+ が必要です。
version 4.3 以降の場合:
@ -71,7 +69,7 @@ emqx をソースコードからビルドした場合は、
./bin/emqx stop
```
*EMQ X* の起動後、ブラウザで http://localhost:18083 にアクセスするとダッシュボードが表示されます。
*EMQX* の起動後、ブラウザで http://localhost:18083 にアクセスするとダッシュボードが表示されます。
## テスト
@ -102,7 +100,7 @@ DIALYZER_ANALYSE_APP=emqx_lwm2m,emqx_auth_jwt,emqx_auth_ldap make dialyzer
### FAQ
よくある質問については、[EMQ X FAQ](https://docs.emqx.io/broker/latest/en/faq/faq.html)をご確認ください。
よくある質問については、[EMQX FAQ](https://docs.emqx.io/broker/latest/en/faq/faq.html)をご確認ください。
### 質問する

View File

@ -1,32 +1,30 @@
# Брокер EMQ X
# Брокер EMQX
[![GitHub Release](https://img.shields.io/github/release/emqx/emqx?color=brightgreen)](https://github.com/emqx/emqx/releases)
[![Build Status](https://travis-ci.org/emqx/emqx.svg)](https://travis-ci.org/emqx/emqx)
[![Coverage Status](https://coveralls.io/repos/github/emqx/emqx/badge.svg?branch=master)](https://coveralls.io/github/emqx/emqx?branch=master)
[![Docker Pulls](https://img.shields.io/docker/pulls/emqx/emqx)](https://hub.docker.com/r/emqx/emqx)
[![Slack Invite](<https://slack-invite.emqx.io/badge.svg>)](https://slack-invite.emqx.io)
[![Slack](https://img.shields.io/badge/Slack-EMQ-39AE85?logo=slack)](https://slack-invite.emqx.io/)
[![Twitter](https://img.shields.io/badge/Follow-EMQ-1DA1F2?logo=twitter)](https://twitter.com/EMQTech)
[![Community](https://img.shields.io/badge/Community-EMQ%20X-yellow?logo=github)](https://github.com/emqx/emqx/discussions)
[![YouTube](https://img.shields.io/badge/Subscribe-EMQ-FF0000?logo=youtube)](https://www.youtube.com/channel/UC5FjR77ErAxvZENEWzQaO5Q)
[![The best IoT MQTT open source team looks forward to your joining](https://www.emqx.io/static/img/github_readme_en_bg.png)](https://www.emqx.io/careers)
[English](./README.md) | [简体中文](./README-CN.md) | [日本語](./README-JP.md) | русский
*EMQ X* — это масштабируемый, высоко доступный, распределённый MQTT брокер с полностью открытым кодом для интернета вещей, межмашинного взаимодействия и мобильных приложений, который поддерживает миллионы одновременных подключений.
*EMQX* — это масштабируемый, высоко доступный, распределённый MQTT брокер с полностью открытым кодом для интернета вещей, межмашинного взаимодействия и мобильных приложений, который поддерживает миллионы одновременных подключений.
Начиная с релиза 3.0, брокер *EMQ X* полностью поддерживает протокол MQTT версии 5.0, и обратно совместим с версиями 3.1 и 3.1.1, а также протоколами MQTT-SN, CoAP, LwM2M, WebSocket и STOMP. Начиная с релиза 3.0, брокер *EMQ X* может масштабироваться до более чем 10 миллионов одновременных MQTT соединений на один кластер.
Начиная с релиза 3.0, брокер *EMQX* полностью поддерживает протокол MQTT версии 5.0, и обратно совместим с версиями 3.1 и 3.1.1, а также протоколами MQTT-SN, CoAP, LwM2M, WebSocket и STOMP. Начиная с релиза 3.0, брокер *EMQX* может масштабироваться до более чем 10 миллионов одновременных MQTT соединений на один кластер.
- Полный список возможностей доступен по ссылке: [EMQ X Release Notes](https://github.com/emqx/emqx/releases).
- Более подробная информация доступна на нашем сайте: [EMQ X homepage](https://www.emqx.io).
- Полный список возможностей доступен по ссылке: [EMQX Release Notes](https://github.com/emqx/emqx/releases).
- Более подробная информация доступна на нашем сайте: [EMQX homepage](https://www.emqx.io).
## Установка
Брокер *EMQ X* кросплатформенный, и поддерживает Linux, Unix, macOS и Windows. Он может работать на серверах с архитектурой x86_64 и устройствах на архитектуре ARM, таких как Raspberry Pi.
Брокер *EMQX* кросплатформенный, и поддерживает Linux, Unix, macOS и Windows. Он может работать на серверах с архитектурой x86_64 и устройствах на архитектуре ARM, таких как Raspberry Pi.
Более подробная информация о запуске на Windows по ссылке: [Windows.md](./Windows.md)
#### Установка EMQ X с помощью Docker-образа
#### Установка EMQX с помощью Docker-образа
```
docker run -d --name emqx -p 1883:1883 -p 8081:8081 -p 8083:8083 -p 8883:8883 -p 8084:8084 -p 18083:18083 emqx/emqx
@ -34,7 +32,7 @@ docker run -d --name emqx -p 1883:1883 -p 8081:8081 -p 8083:8083 -p 8883:8883 -p
#### Установка бинарного пакета
Сборки для различных операционных систем: [Загрузить EMQ X](https://www.emqx.io/downloads).
Сборки для различных операционных систем: [Загрузить EMQX](https://www.emqx.io/downloads).
- [Установка на одном сервере](https://docs.emqx.io/en/broker/latest/getting-started/install.html)
- [Установка на кластере](https://docs.emqx.io/en/broker/latest/advanced/cluster.html)
@ -111,7 +109,7 @@ DIALYZER_ANALYSE_APP=emqx_lwm2m,emqx_auth_jwt,emqx_auth_ldap make dialyzer
### FAQ
Наиболее частые проблемы разобраны в [EMQ X FAQ](https://docs.emqx.io/en/broker/latest/faq/faq.html).
Наиболее частые проблемы разобраны в [EMQX FAQ](https://docs.emqx.io/en/broker/latest/faq/faq.html).
### Вопросы

View File

@ -1,31 +1,29 @@
# EMQ X Broker
# EMQX Broker
[![GitHub Release](https://img.shields.io/github/release/emqx/emqx?color=brightgreen)](https://github.com/emqx/emqx/releases)
[![Build Status](https://travis-ci.org/emqx/emqx.svg)](https://travis-ci.org/emqx/emqx)
[![Coverage Status](https://coveralls.io/repos/github/emqx/emqx/badge.svg?branch=master)](https://coveralls.io/github/emqx/emqx?branch=master)
[![Docker Pulls](https://img.shields.io/docker/pulls/emqx/emqx)](https://hub.docker.com/r/emqx/emqx)
[![Slack Invite](<https://slack-invite.emqx.io/badge.svg>)](https://slack-invite.emqx.io)
[![Slack](https://img.shields.io/badge/Slack-EMQ-39AE85?logo=slack)](https://slack-invite.emqx.io/)
[![Twitter](https://img.shields.io/badge/Follow-EMQ-1DA1F2?logo=twitter)](https://twitter.com/EMQTech)
[![YouTube](https://img.shields.io/badge/Subscribe-EMQ-FF0000?logo=youtube)](https://www.youtube.com/channel/UC5FjR77ErAxvZENEWzQaO5Q)
[![The best IoT MQTT open source team looks forward to your joining](https://www.emqx.io/static/img/github_readme_en_bg.png)](https://www.emqx.io/careers)
English | [简体中文](./README-CN.md) | [日本語](./README-JP.md) | [русский](./README-RU.md)
*EMQ X* broker is a fully open source, highly scalable, highly available distributed MQTT messaging broker for IoT, M2M and Mobile applications that can handle tens of millions of concurrent clients.
*EMQX* broker is a fully open source, highly scalable, highly available distributed MQTT messaging broker for IoT, M2M and Mobile applications that can handle tens of millions of concurrent clients.
Starting from 3.0 release, *EMQ X* broker fully supports MQTT V5.0 protocol specifications and backward compatible with MQTT V3.1 and V3.1.1, as well as other communication protocols such as MQTT-SN, CoAP, LwM2M, WebSocket and STOMP. The 3.0 release of the *EMQ X* broker can scaled to 10+ million concurrent MQTT connections on one cluster.
Starting from 3.0 release, *EMQX* broker fully supports MQTT V5.0 protocol specifications and backward compatible with MQTT V3.1 and V3.1.1, as well as other communication protocols such as MQTT-SN, CoAP, LwM2M, WebSocket and STOMP. The 3.0 release of the *EMQX* broker can scaled to 10+ million concurrent MQTT connections on one cluster.
- For full list of new features, please read [EMQ X Release Notes](https://github.com/emqx/emqx/releases).
- For more information, please visit [EMQ X homepage](https://www.emqx.io).
- For full list of new features, please read [EMQX Release Notes](https://github.com/emqx/emqx/releases).
- For more information, please visit [EMQX homepage](https://www.emqx.io).
## Installation
The *EMQ X* broker is cross-platform, which supports Linux, Unix, macOS and Windows. It means *EMQ X* can be deployed on x86_64 architecture servers and ARM devices like Raspberry Pi.
The *EMQX* broker is cross-platform, which supports Linux, Unix, macOS and Windows. It means *EMQX* can be deployed on x86_64 architecture servers and ARM devices like Raspberry Pi.
See more details for building and running *EMQ X* on Windows in [Windows.md](./Windows.md)
See more details for building and running *EMQX* on Windows in [Windows.md](./Windows.md)
#### Installing via EMQ X Docker Image
#### Installing via EMQX Docker Image
```
docker run -d --name emqx -p 1883:1883 -p 8081:8081 -p 8083:8083 -p 8883:8883 -p 8084:8084 -p 18083:18083 emqx/emqx
@ -33,7 +31,7 @@ docker run -d --name emqx -p 1883:1883 -p 8081:8081 -p 8083:8083 -p 8883:8883 -p
#### Installing via Binary Package
Get the binary package of the corresponding OS from [EMQ X Download](https://www.emqx.io/downloads) page.
Get the binary package of the corresponding OS from [EMQX Download](https://www.emqx.io/downloads) page.
- [Single Node Install](https://docs.emqx.io/en/broker/latest/getting-started/install.html)
- [Multi Node Install](https://docs.emqx.io/en/broker/latest/advanced/cluster.html)
@ -41,7 +39,7 @@ Get the binary package of the corresponding OS from [EMQ X Download](https://www
## Build From Source
The *EMQ X* broker requires Erlang/OTP R21+ to build since 3.0 release.
The *EMQX* broker requires Erlang/OTP R21+ to build since 3.0 release.
For 4.3 and later versions.
@ -110,7 +108,7 @@ DIALYZER_ANALYSE_APP=emqx_lwm2m,emqx_auth_jwt,emqx_auth_ldap make dialyzer
### FAQ
Visiting [EMQ X FAQ](https://docs.emqx.io/en/broker/latest/faq/faq.html) to get help of common problems.
Visiting [EMQX FAQ](https://docs.emqx.io/en/broker/latest/faq/faq.html) to get help of common problems.
### Questions

View File

@ -1,4 +1,4 @@
# Build and run EMQ X on Windows
# Build and run EMQX on Windows
NOTE: The instructions and examples are based on Windows 10.
@ -6,7 +6,7 @@ NOTE: The instructions and examples are based on Windows 10.
### Visual studio for C/C++ compile and link
EMQ X includes Erlang NIF (Native Implmented Function) components, implemented
EMQX includes Erlang NIF (Native Implmented Function) components, implemented
in C/C++. To compile and link C/C++ libraries, the easiest way is perhaps to
install Visual Studio.
@ -25,17 +25,17 @@ C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build
Depending on your visual studio version and OS, the paths may differ.
The first path is for rebar3 port compiler to find `cl.exe` and `link.exe`
The second path is for Powershell or CMD to setup environment variables.
The second path is for CMD to setup environment variables.
### Erlang/OTP
Install Erlang/OTP 23.2 from https://www.erlang.org/downloads
Install Erlang/OTP 24.2.1 from https://www.erlang.org/downloads
You may need to edit the `Path` environment variable to allow running
Erlang commands such as `erl` from powershell.
Erlang commands such as `erl` from CMD.
To validate Erlang installation in CMD or powershell:
To validate Erlang installation in CMD :
* Start (or restart) CMD or powershell
* Start (or restart) CMD
* Execute `erl` command to enter Erlang shell
@ -45,13 +45,13 @@ e.g.
```
PS C:\Users\zmsto> erl
Eshell V11.1.4 (abort with ^G)
Eshell V12.2.1 (abort with ^G)
1> halt().
```
### bash
All EMQ X build/run scripts are either in `bash` or `escript`.
All EMQX build/run scripts are either in `bash` or `escript`.
`escript` is installed as a part of Erlang. To install a `bash`
environment in Windows, there are quite a few options.
@ -63,12 +63,12 @@ Cygwin is what we tested with.
to `Path` list.
* Validate installation.
Start (restart) CMD or powershell console and execute `which bash`, it should
Start (restart) CMD console and execute `which bash`, it should
print out `/usr/bin/bash`
### Other tools
Some of the unix world tools are required to build EMQ X. Including:
Some of the unix world tools are required to build EMQX. Including:
* git
* curl
@ -84,11 +84,11 @@ When using scoop:
scoop install git curl make jq zip unzip
```
## Build EMQ X source code
## Build EMQX source code
* Clone the repo: `git clone https://github.com/emqx/emqx.git`
* Start CMD or Powershell
* Start CMD
* Execute `vcvarsall.bat x86_amd64` to load environment variables
@ -112,11 +112,11 @@ scoop install git curl make jq zip unzip
To fix it, Visual Studio's bin paths should be ordered prior to Cygwin's (or similar installation's)
bin paths in `Path` environment variable.
## Run EMQ X
## Run EMQX
To start EMQ X broker.
To start EMQX broker.
Execute `_build\emqx\rel\emqx>.\bin\emqx console` or `_build\emqx\rel\emqx>.\bin\emqx start` to start EMQ X.
Execute `_build\emqx\rel\emqx>.\bin\emqx console` or `_build\emqx\rel\emqx>.\bin\emqx start` to start EMQX.
Then execute `_build\emqx\rel\emqx>.\bin\emqx_ctl status` to check status.
If everything works fine, it should print out

View File

@ -1,7 +1,7 @@
emqx_auth_http
==============
EMQ X HTTP Auth/ACL Plugin
EMQX HTTP Auth/ACL Plugin
Build
-----
@ -96,5 +96,5 @@ Apache License Version 2.0
Author
------
EMQ X Team.
EMQX Team.

View File

@ -42,18 +42,18 @@ auth.http.auth_req.params = clientid=%c,username=%u,password=%P
## Value: URL
##
## Examples: http://127.0.0.1:80/mqtt/superuser, https://[::1]:80/mqtt/superuser
auth.http.super_req.url = http://127.0.0.1:80/mqtt/superuser
# auth.http.super_req.url = http://127.0.0.1:80/mqtt/superuser
## HTTP Request Method for SuperUser Request
##
## Value: post | get
auth.http.super_req.method = post
# auth.http.super_req.method = post
## HTTP Request Headers for SuperUser Request, Content-Type header is configured by default.
## The possible values of the Content-Type header: application/x-www-form-urlencoded, application/json
##
## Examples: auth.http.super_req.headers.accept = */*
auth.http.super_req.headers.content-type = application/x-www-form-urlencoded
# auth.http.super_req.headers.content-type = application/x-www-form-urlencoded
## Parameters used to construct the request body or query string parameters
## When the request method is GET, these parameters will be converted into query string parameters
@ -70,7 +70,7 @@ auth.http.super_req.headers.content-type = application/x-www-form-urlencoded
## - %d: subject of client TLS cert
##
## Value: <K1>=<V1>,<K2>=<V2>,...
auth.http.super_req.params = clientid=%c,username=%u
# auth.http.super_req.params = clientid=%c,username=%u
## HTTP URL API path for ACL Request
## Comment out this config to disable ACL checks
@ -136,6 +136,11 @@ auth.http.connect_timeout = 5s
## Value: Number
auth.http.pool_size = 32
## Whether to enable HTTP Pipelining
##
## See: https://en.wikipedia.org/wiki/HTTP_pipelining
auth.http.enable_pipelining = 100
##------------------------------------------------------------------------------
## SSL options
@ -163,7 +168,7 @@ auth.http.pool_size = 32
## If not specified, the server's names returned in server's certificate is validated against
## what's provided `auth.http.auth_req.url` config's host part.
## Setting to 'disable' will make EMQ X ignore unmatched server names.
## Setting to 'disable' will make EMQX ignore unmatched server names.
## If set with a host name, the server's names returned in server's certificate is validated
## against this value.
##

View File

@ -1,23 +1,20 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%--------------------------------------------------------------------
-define(APP, emqx_auth_http).
-record(auth_metrics, {
success = 'client.auth.success',
failure = 'client.auth.failure',
ignore = 'client.auth.ignore'
}).
-record(acl_metrics, {
allow = 'client.acl.allow',
deny = 'client.acl.deny',
ignore = 'client.acl.ignore'
}).
-define(METRICS(Type), tl(tuple_to_list(#Type{}))).
-define(METRICS(Type, K), #Type{}#Type.K).
-define(AUTH_METRICS, ?METRICS(auth_metrics)).
-define(AUTH_METRICS(K), ?METRICS(auth_metrics, K)).
-define(ACL_METRICS, ?METRICS(acl_metrics)).
-define(ACL_METRICS(K), ?METRICS(acl_metrics, K)).
%% equals to the default value of ehttpc
-define(DEFAULT_RETRY_TIMES, 2).

View File

@ -109,6 +109,30 @@ end}.
{datatype, integer}
]}.
{mapping, "auth.http.enable_pipelining", "emqx_auth_http.enable_pipelining", [
{default, "100"},
{datatype, string}
]}.
{translation, "emqx_auth_http.enable_pipelining", fun(Conf) ->
case cuttlefish:conf_get("auth.http.enable_pipelining", Conf, undefined) of
undefined -> 100;
Str ->
try
erlang:list_to_integer(Str)
catch _:_ ->
case erlang:list_to_atom(Str) of
true ->
100;
false ->
1;
_ ->
100
end
end
end
end}.
{mapping, "auth.http.ssl.cacertfile", "emqx_auth_http.cacertfile", [
{datatype, string}
]}.

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -24,38 +24,40 @@
-logger_header("[ACL http]").
-import(emqx_auth_http_cli,
[ request/6
[ request/7
, feedvar/2
]).
%% ACL callbacks
-export([ register_metrics/0
, check_acl/5
-export([ check_acl/5
, description/0
]).
-spec(register_metrics() -> ok).
register_metrics() ->
lists:foreach(fun emqx_metrics:ensure/1, ?ACL_METRICS).
%%--------------------------------------------------------------------
%% ACL callbacks
%%--------------------------------------------------------------------
check_acl(ClientInfo, PubSub, Topic, AclResult, Params) ->
return_with(fun inc_metrics/1,
do_check_acl(ClientInfo, PubSub, Topic, AclResult, Params)).
do_check_acl(#{username := <<$$, _/binary>>}, _PubSub, _Topic, _AclResult, _Params) ->
check_acl(#{username := <<$$, _/binary>>}, _PubSub, _Topic, _AclResult, _Params) ->
ok;
do_check_acl(ClientInfo, PubSub, Topic, _AclResult, #{acl := ACLParams = #{path := Path}}) ->
check_acl(ClientInfo, PubSub, Topic, _AclResult, #{acl := ACLParams = #{path := Path}}) ->
ClientInfo1 = ClientInfo#{access => access(PubSub), topic => Topic},
Username = maps:get(username, ClientInfo1, undefined),
case check_acl_request(ACLParams, ClientInfo1) of
{ok, 200, <<"ignore">>} -> ok;
{ok, 200, _Body} -> {stop, allow};
{ok, _Code, _Body} -> {stop, deny};
{ok, 200, <<"ignore">>} ->
?LOG(debug, "ignored, ~s to topic ~ts, username: ~ts",
[PubSub, Topic, Username]);
{ok, 200, _Body} ->
?LOG(debug, "Allow ~s to topic ~ts, username: ~ts",
[PubSub, Topic, Username]),
{stop, allow};
{ok, Code, _Body} ->
?LOG(warning, "Deny ~s to topic ~ts, username: ~ts, http response code: ~p",
[PubSub, Topic, Username, Code]),
{stop, deny};
{error, Error} ->
?LOG(error, "Request ACL path ~s, error: ~p", [Path, Error]),
?LOG(warning, "Deny ~s to topic ~ts, username: ~ts, due to request "
"http server failure, path: ~p, error: ~0p",
[PubSub, Topic, Username, Path, Error]),
ok
end.
@ -65,24 +67,15 @@ description() -> "ACL with HTTP API".
%% Internal functions
%%--------------------------------------------------------------------
inc_metrics(ok) ->
emqx_metrics:inc(?ACL_METRICS(ignore));
inc_metrics({stop, allow}) ->
emqx_metrics:inc(?ACL_METRICS(allow));
inc_metrics({stop, deny}) ->
emqx_metrics:inc(?ACL_METRICS(deny)).
return_with(Fun, Result) ->
Fun(Result), Result.
check_acl_request(#{pool_name := PoolName,
check_acl_request(ACLParams =
#{pool_name := PoolName,
path := Path,
method := Method,
headers := Headers,
params := Params,
timeout := Timeout}, ClientInfo) ->
request(PoolName, Method, Path, Headers, feedvar(Params, ClientInfo), Timeout).
Retry = maps:get(retry_times, ACLParams, ?DEFAULT_RETRY_TIMES),
request(PoolName, Method, Path, Headers, feedvar(Params, ClientInfo), Timeout, Retry).
access(subscribe) -> 1;
access(publish) -> 2.

View File

@ -1,13 +1,13 @@
{application, emqx_auth_http,
[{description, "EMQ X Authentication/ACL with HTTP API"},
{vsn, "4.3.0"}, % strict semver, bump manually!
[{description, "EMQX Authentication/ACL with HTTP API"},
{vsn, "4.3.12"}, % strict semver, bump manually!
{modules, []},
{registered, [emqx_auth_http_sup]},
{applications, [kernel,stdlib,ehttpc]},
{mod, {emqx_auth_http_app, []}},
{env, []},
{licenses, ["Apache-2.0"]},
{maintainers, ["EMQ X Team <contact@emqx.io>"]},
{maintainers, ["EMQX Team <contact@emqx.io>"]},
{links, [{"Homepage", "https://emqx.io/"},
{"Github", "https://github.com/emqx/emqx-auth-http"}
]}

View File

@ -0,0 +1,97 @@
%% -*- mode: erlang -*-
%% Unless you know what you are doing, DO NOT edit manually!!
{VSN,
[{"4.3.11",
[{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]}]},
{"4.3.10",
[{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]}]},
{"4.3.9",
[{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]}]},
{"4.3.8",
[{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]}]},
{"4.3.7",
[{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]}]},
{"4.3.6",
[{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]}]},
{"4.3.5",
[{load_module,emqx_auth_http_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]}]},
{"4.3.4",
[{load_module,emqx_auth_http_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]}]},
{"4.3.3",
[{load_module,emqx_auth_http_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]}]},
{"4.3.2",
[{apply,{application,stop,[emqx_auth_http]}},
{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_cli,brutal_purge,soft_purge,[]}]},
{<<"4.3.[0-1]">>,[{restart_application,emqx_auth_http}]},
{<<".*">>,[]}],
[{"4.3.11",
[{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]}]},
{"4.3.10",
[{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]}]},
{"4.3.9",
[{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]}]},
{"4.3.8",
[{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]}]},
{"4.3.7",
[{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]}]},
{"4.3.6",
[{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]}]},
{"4.3.5",
[{load_module,emqx_auth_http_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]}]},
{"4.3.4",
[{load_module,emqx_auth_http_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]}]},
{"4.3.3",
[{load_module,emqx_auth_http_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]}]},
{"4.3.2",
[{apply,{application,stop,[emqx_auth_http]}},
{load_module,emqx_auth_http_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_http,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_http_cli,brutal_purge,soft_purge,[]}]},
{<<"4.3.[0-1]">>,[{restart_application,emqx_auth_http}]},
{<<".*">>,[]}]}.

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -25,41 +25,37 @@
-logger_header("[Auth http]").
-import(emqx_auth_http_cli,
[ request/6
[ request/7
, feedvar/2
]).
%% Callbacks
-export([ register_metrics/0
, check/3
-export([ check/3
, description/0
]).
-spec(register_metrics() -> ok).
register_metrics() ->
lists:foreach(fun emqx_metrics:ensure/1, ?AUTH_METRICS).
check(ClientInfo, AuthResult, #{auth := AuthParms = #{path := Path},
super := SuperParams}) ->
Username = maps:get(username, ClientInfo, undefined),
case authenticate(AuthParms, ClientInfo) of
{ok, 200, <<"ignore">>} ->
emqx_metrics:inc(?AUTH_METRICS(ignore)), ok;
?LOG(debug, "Auth ignored, path: ~ts, username: ~ts", [Path, Username]);
{ok, 200, Body} ->
emqx_metrics:inc(?AUTH_METRICS(success)),
?LOG(debug, "Auth succeeded from path: ~ts, username: ~ts", [Path, Username]),
IsSuperuser = is_superuser(SuperParams, ClientInfo),
{stop, AuthResult#{is_superuser => IsSuperuser,
auth_result => success,
anonymous => false,
mountpoint => mountpoint(Body, ClientInfo)}};
{ok, Code, _Body} ->
?LOG(error, "Deny connection from path: ~s, response http code: ~p",
[Path, Code]),
emqx_metrics:inc(?AUTH_METRICS(failure)),
?LOG(warning, "Deny connection from path: ~ts, username: ~ts, http "
"response code: ~p",
[Path, Username, Code]),
{stop, AuthResult#{auth_result => http_to_connack_error(Code),
anonymous => false}};
{error, Error} ->
?LOG(error, "Request auth path: ~s, error: ~p", [Path, Error]),
emqx_metrics:inc(?AUTH_METRICS(failure)),
?LOG_SENSITIVE(warning, "Deny connection from path: ~ts, username: ~ts, due to "
"request http-server failed: ~0p", [Path, Username, Error]),
%%FIXME later: server_unavailable is not right.
{stop, AuthResult#{auth_result => server_unavailable,
anonymous => false}}
@ -71,27 +67,34 @@ description() -> "Authentication by HTTP API".
%% Requests
%%--------------------------------------------------------------------
authenticate(#{pool_name := PoolName,
authenticate(AuthParams =
#{pool_name := PoolName,
path := Path,
method := Method,
headers := Headers,
params := Params,
timeout := Timeout}, ClientInfo) ->
request(PoolName, Method, Path, Headers, feedvar(Params, ClientInfo), Timeout).
Retry = maps:get(retry_times, AuthParams, ?DEFAULT_RETRY_TIMES),
request(PoolName, Method, Path, Headers, feedvar(Params, ClientInfo), Timeout, Retry).
-spec(is_superuser(maybe(map()), emqx_types:client()) -> boolean()).
is_superuser(undefined, _ClientInfo) ->
false;
is_superuser(#{pool_name := PoolName,
is_superuser(SuperParams =
#{pool_name := PoolName,
path := Path,
method := Method,
headers := Headers,
params := Params,
timeout := Timeout}, ClientInfo) ->
case request(PoolName, Method, Path, Headers, feedvar(Params, ClientInfo), Timeout) of
{ok, 200, _Body} -> true;
{ok, _Code, _Body} -> false;
{error, Error} -> ?LOG(error, "Request superuser path ~s, error: ~p", [Path, Error]),
Retry = maps:get(retry_times, SuperParams, ?DEFAULT_RETRY_TIMES),
case request(PoolName, Method, Path, Headers, feedvar(Params, ClientInfo), Timeout, Retry) of
{ok, 200, _Body} ->
true;
{ok, _Code, _Body} ->
false;
{error, Error} ->
?LOG_SENSITIVE(warning, "Request superuser path ~s, error: ~p", [Path, Error]),
false
end.

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -50,14 +50,14 @@ translate_env(EnvName) ->
case application:get_env(?APP, EnvName) of
undefined -> ok;
{ok, Req} ->
{ok, EnablePipelining} = application:get_env(?APP, enable_pipelining),
{ok, PoolSize} = application:get_env(?APP, pool_size),
{ok, ConnectTimeout} = application:get_env(?APP, connect_timeout),
URL = proplists:get_value(url, Req),
{ok, #{host := Host,
path := Path0,
port := Port,
scheme := Scheme}} = emqx_http_lib:uri_parse(URL),
Path = path(Path0),
scheme := Scheme} = URIMap} = emqx_http_lib:uri_parse(URL),
Path = path(URIMap),
MoreOpts = case Scheme of
http ->
[{transport_opts, emqx_misc:ipv6_probe([])}];
@ -71,6 +71,7 @@ translate_env(EnvName) ->
end,
SNI = case application:get_env(?APP, server_name_indication, undefined) of
"disable" -> disable;
"" -> undefined;
SNI0 -> SNI0
end,
TLSOpts = lists:filter(
@ -89,11 +90,11 @@ translate_env(EnvName) ->
end,
PoolOpts = [{host, Host},
{port, Port},
{enable_pipelining, EnablePipelining},
{pool_size, PoolSize},
{pool_type, random},
{connect_timeout, ConnectTimeout},
{retry, 5},
{retry_timeout, 1000}] ++ MoreOpts,
{connect_timeout, ConnectTimeout}
] ++ MoreOpts,
Method = proplists:get_value(method, Req),
Headers = proplists:get_value(headers, Req),
NHeaders = ensure_content_type_header(Method, emqx_http_lib:normalise_headers(Headers)),
@ -110,7 +111,6 @@ load_hooks() ->
case application:get_env(?APP, auth_req) of
undefined -> ok;
{ok, AuthReq} ->
ok = emqx_auth_http:register_metrics(),
PoolOpts = proplists:get_value(pool_opts, AuthReq),
PoolName = proplists:get_value(pool_name, AuthReq),
{ok, _} = ehttpc_sup:start_pool(PoolName, PoolOpts),
@ -129,7 +129,6 @@ load_hooks() ->
case application:get_env(?APP, acl_req) of
undefined -> ok;
{ok, ACLReq} ->
ok = emqx_acl_http:register_metrics(),
PoolOpts2 = proplists:get_value(pool_opts, ACLReq),
PoolName2 = proplists:get_value(pool_name, ACLReq),
{ok, _} = ehttpc_sup:start_pool(PoolName2, PoolOpts2),
@ -149,10 +148,13 @@ ensure_content_type_header(Method, Headers)
when Method =:= post orelse Method =:= put ->
Headers;
ensure_content_type_header(_Method, Headers) ->
lists:keydelete("content-type", 1, Headers).
lists:keydelete(<<"content-type">>, 1, Headers).
path("") ->
path(#{path := "", 'query' := Query}) ->
"?" ++ Query;
path(#{path := Path, 'query' := Query}) ->
Path ++ "?" ++ Query;
path(#{path := ""}) ->
"/";
path(Path) ->
path(#{path := Path}) ->
Path.

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -19,6 +19,7 @@
-include("emqx_auth_http.hrl").
-export([ request/6
, request/7
, feedvar/2
, feedvar/3
]).
@ -27,18 +28,21 @@
%% HTTP Request
%%--------------------------------------------------------------------
request(PoolName, get, Path, Headers, Params, Timeout) ->
NewPath = Path ++ "?" ++ binary_to_list(cow_qs:qs(bin_kw(Params))),
reply(ehttpc:request(ehttpc_pool:pick_worker(PoolName), get, {NewPath, Headers}, Timeout));
request(PoolName, Method, Path, Headers, Params, Timeout) ->
request(PoolName, Method, Path, Headers, Params, Timeout, ?DEFAULT_RETRY_TIMES).
request(PoolName, post, Path, Headers, Params, Timeout) ->
Body = case proplists:get_value("content-type", Headers) of
request(PoolName, get, Path, Headers, Params, Timeout, Retry) ->
NewPath = Path ++ "?" ++ binary_to_list(cow_qs:qs(bin_kw(Params))),
reply(ehttpc:request(PoolName, get, {NewPath, Headers}, Timeout, Retry));
request(PoolName, post, Path, Headers, Params, Timeout, Retry) ->
Body = case proplists:get_value(<<"content-type">>, Headers) of
"application/x-www-form-urlencoded" ->
cow_qs:qs(bin_kw(Params));
"application/json" ->
emqx_json:encode(bin_kw(Params))
end,
reply(ehttpc:request(ehttpc_pool:pick_worker(PoolName), post, {Path, Headers, Body}, Timeout)).
reply(ehttpc:request(PoolName, post, {Path, Headers, Body}, Timeout, Retry)).
reply({ok, StatusCode, _Headers}) ->
{ok, StatusCode, <<>>};

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.

View File

@ -1,4 +1,4 @@
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.

View File

@ -1,7 +1,7 @@
# emqx-auth-jwt
EMQ X JWT Authentication Plugin
EMQX JWT Authentication Plugin
Build
-----
@ -46,6 +46,11 @@ auth.jwt.verify_claims = off
## - %u: username
## - %c: clientid
# auth.jwt.verify_claims.username = %u
## Name of the claim containg ACL rules
##
## Value: String
#auth.jwt.acl_claim_name = acl
```
Load the Plugin
@ -62,6 +67,33 @@ Example
mosquitto_pub -t 'pub' -m 'hello' -i test -u test -P eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiYm9iIiwiYWdlIjoyOX0.bIV_ZQ8D5nQi0LT8AVkpM4Pd6wmlbpR9S8nOLJAsA8o
```
ACL
---
JWT may contain lists of topics allowed for subscribing/publishing (ACL rules):
Payload example:
```json
{
"sub": "emqx",
"name": "John Doe",
"iat": 1516239022,
"exp": 1516239122,
"acl": {
"sub": [
"a/b",
"c/+",
"%u/%c"
],
"pub": [
"a/b",
"c/+",
"%u/%c"
]
}
}
```
Algorithms
----------
@ -87,4 +119,4 @@ Apache License Version 2.0
Author
------
EMQ X Team.
EMQX Team.

View File

@ -47,3 +47,8 @@ auth.jwt.verify_claims = off
## For example, to verify that the username in the JWT payload is the same
## as the client (MQTT protocol) username
#auth.jwt.verify_claims.username = %u
## Name of the claim containg ACL rules
##
## Value: String
#auth.jwt.acl_claim_name = acl

View File

@ -47,3 +47,12 @@
end, [], cuttlefish_variable:filter_by_prefix("auth.jwt.verify_claims", Conf))
end
end}.
{mapping, "auth.jwt.acl_claim_name", "emqx_auth_jwt.acl_claim_name", [
{default, "acl"},
{datatype, string}
]}.
{translation, "emqx_auth_jwt.acl_claim_name", fun(Conf) ->
list_to_binary(cuttlefish:conf_get("auth.jwt.acl_claim_name", Conf))
end}.

View File

@ -1,6 +1,6 @@
{deps,
[
{jose, {git, "https://github.com/potatosalad/erlang-jose", {tag, "1.11.1"}}}
{jose, {git, "https://github.com/emqx/erlang-jose", {tag, "emqx-1.11.3"}}}
]}.
{edoc_opts, [{preprocess, true}]}.

View File

@ -1,13 +1,13 @@
{application, emqx_auth_jwt,
[{description, "EMQ X Authentication with JWT"},
{vsn, "4.3.1"}, % strict semver, bump manually!
[{description, "EMQX Authentication with JWT"},
{vsn, "4.4.10"}, % strict semver, bump manually!
{modules, []},
{registered, [emqx_auth_jwt_sup]},
{applications, [kernel,stdlib,jose]},
{mod, {emqx_auth_jwt_app, []}},
{env, []},
{licenses, ["Apache-2.0"]},
{maintainers, ["EMQ X Team <contact@emqx.io>"]},
{maintainers, ["EMQX Team <contact@emqx.io>"]},
{links, [{"Homepage", "https://emqx.io/"},
{"Github", "https://github.com/emqx/emqx-auth-jwt"}
]}

View File

@ -1,15 +1,21 @@
%% -*-: erlang -*-
%% -*- mode: erlang -*-
%% Unless you know what you are doing, DO NOT edit manually!!
{VSN,
[
{"4.3.0", [
{load_module, emqx_auth_jwt_svr, brutal_purge, soft_purge, []}
]},
{<<".*">>, []}
],
[
{"4.3.0", [
{load_module, emqx_auth_jwt_svr, brutal_purge, soft_purge, []}
]},
{<<".*">>, []}
]
}.
[{"4.4.9",[{load_module,emqx_auth_jwt,brutal_purge,soft_purge,[]}]},
{"4.4.8",
[{load_module,emqx_auth_jwt,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_jwt_svr,brutal_purge,soft_purge,[]}]},
{<<"4\\.4\\.[2-7]">>,
[{load_module,emqx_auth_jwt_svr,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_jwt,brutal_purge,soft_purge,[]}]},
{<<"4\\.4\\.[0-1]">>,[{restart_application,emqx_auth_jwt}]},
{<<".*">>,[]}],
[{"4.4.9",[{load_module,emqx_auth_jwt,brutal_purge,soft_purge,[]}]},
{"4.4.8",
[{load_module,emqx_auth_jwt,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_jwt_svr,brutal_purge,soft_purge,[]}]},
{<<"4\\.4\\.[2-7]">>,
[{load_module,emqx_auth_jwt_svr,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_jwt,brutal_purge,soft_purge,[]}]},
{<<"4\\.4\\.[0-1]">>,[{restart_application,emqx_auth_jwt}]},
{<<".*">>,[]}]}.

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -18,69 +18,134 @@
-include_lib("emqx/include/emqx.hrl").
-include_lib("emqx/include/logger.hrl").
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
-logger_header("[JWT]").
-export([ register_metrics/0
-export([ check_auth/3
, check/3
, check_acl/5
, description/0
]).
-record(auth_metrics, {
success = 'client.auth.success',
failure = 'client.auth.failure',
ignore = 'client.auth.ignore'
}).
-define(METRICS(Type), tl(tuple_to_list(#Type{}))).
-define(METRICS(Type, K), #Type{}#Type.K).
-define(AUTH_METRICS, ?METRICS(auth_metrics)).
-define(AUTH_METRICS(K), ?METRICS(auth_metrics, K)).
-spec(register_metrics() -> ok).
register_metrics() ->
lists:foreach(fun emqx_metrics:ensure/1, ?AUTH_METRICS).
-export([string_to_number/1]).
%%--------------------------------------------------------------------
%% Authentication callbacks
%%--------------------------------------------------------------------
check(ClientInfo, AuthResult, #{pid := Pid,
from := From,
checklists := Checklists}) ->
%% for compatibility with old versions
check(ClientInfo, AuthResult, State) ->
?MODULE:check_auth(ClientInfo, AuthResult, State).
check_auth(ClientInfo, AuthResult, #{from := From, checklists := Checklists}) ->
case maps:find(From, ClientInfo) of
error ->
ok = emqx_metrics:inc(?AUTH_METRICS(ignore));
?LOG(debug, "Auth ignored, ~p not found in Client: ~p", [From, ClientInfo]);
{ok, undefined} ->
ok = emqx_metrics:inc(?AUTH_METRICS(ignore));
?LOG(debug, "Auth ignored, ~p undefined, Client: ~p", [From, ClientInfo]);
{ok, Token} ->
case emqx_auth_jwt_svr:verify(Pid, Token) of
case emqx_auth_jwt_svr:verify(Token) of
{error, not_found} ->
ok = emqx_metrics:inc(?AUTH_METRICS(ignore));
?LOG_SENSITIVE(debug, "Auth ignored, ~p not_found, Client: ~p", [Token, ClientInfo]);
{error, not_token} ->
ok = emqx_metrics:inc(?AUTH_METRICS(ignore));
?LOG_SENSITIVE(debug, "Auth ignored, ~p not_token, Client: ~p", [Token, ClientInfo]);
{error, Reason} ->
ok = emqx_metrics:inc(?AUTH_METRICS(failure)),
?LOG_SENSITIVE(debug,
"Auth from JWT failed, Client: ~p, Reason: ~p",
[ClientInfo, Reason]),
{stop, AuthResult#{auth_result => Reason, anonymous => false}};
{ok, Claims} ->
?LOG_SENSITIVE(debug,
"Auth from JWT succeeded, Client: ~p",
[ClientInfo]),
{stop, maps:merge(AuthResult, verify_claims(Checklists, Claims, ClientInfo))}
end
end.
check_acl(ClientInfo = #{jwt_claims := Claims},
PubSub,
Topic,
_NoMatchAction,
#{acl_claim_name := AclClaimName}) ->
case Claims of
#{AclClaimName := Acl, <<"exp">> := Exp} ->
case is_expired(Exp) of
true ->
?DEBUG("acl_deny_due_to_jwt_expired", []),
{stop, deny};
false ->
verify_acl(ClientInfo, Acl, PubSub, Topic)
end;
#{AclClaimName := Acl} ->
verify_acl(ClientInfo, Acl, PubSub, Topic);
_ ->
?DEBUG("no_acl_jwt_claim", []),
ignore
end;
check_acl(_ClientInfo,
_PubSub,
_Topic,
_NoMatchAction,
_AclEnv) ->
?tp(debug, no_jwt_claim, #{}),
ignore.
is_expired(Exp) when is_binary(Exp) ->
case string_to_number(Exp) of
{ok, Val} ->
is_expired(Val);
_ ->
?DEBUG("acl_deny_due_to_invalid_jwt_exp:~p", [Exp]),
true
end;
is_expired(Exp) when is_number(Exp) ->
Now = erlang:system_time(second),
Now > Exp;
is_expired(Exp) ->
?DEBUG("acl_deny_due_to_invalid_jwt_exp:~p", [Exp]),
true.
description() -> "Authentication with JWT".
string_to_number(Bin) when is_binary(Bin) ->
string_to_number(Bin, fun erlang:binary_to_integer/1, fun erlang:binary_to_float/1);
string_to_number(Str) when is_list(Str) ->
string_to_number(Str, fun erlang:list_to_integer/1, fun erlang:list_to_float/1);
string_to_number(_) ->
false.
%%------------------------------------------------------------------------------
%% Verify Claims
%%--------------------------------------------------------------------
verify_acl(ClientInfo, Acl, PubSub, Topic) ->
Key = case PubSub of
subscribe -> <<"sub">>;
publish -> <<"pub">>
end,
Rules0 = lists:map(
fun(K) ->
case maps:get(K, Acl, undefined) of
R when is_list(R) -> R;
_ -> []
end
end, [<<"all">>, Key]),
Rules = lists:append(Rules0),
verify_acl(ClientInfo, Rules, Topic).
verify_acl(_ClientInfo, [], _Topic) -> {stop, deny};
verify_acl(ClientInfo, [AclTopic | AclTopics], Topic) ->
case match_topic(ClientInfo, AclTopic, Topic) of
true -> {stop, allow};
false -> verify_acl(ClientInfo, AclTopics, Topic)
end.
verify_claims(Checklists, Claims, ClientInfo) ->
case do_verify_claims(feedvar(Checklists, ClientInfo), Claims) of
{error, Reason} ->
ok = emqx_metrics:inc(?AUTH_METRICS(failure)),
#{auth_result => Reason, anonymous => false};
ok ->
ok = emqx_metrics:inc(?AUTH_METRICS(success)),
#{auth_result => success, anonymous => false, jwt_claims => Claims}
end.
@ -97,3 +162,20 @@ feedvar(Checklists, #{username := Username, clientid := ClientId}) ->
({K, <<"%c">>}) -> {K, ClientId};
({K, Expected}) -> {K, Expected}
end, Checklists).
match_topic(ClientInfo, AclTopic, Topic) ->
AclTopicWords = emqx_topic:words(AclTopic),
TopicWords = emqx_topic:words(Topic),
AclTopicRendered = emqx_access_rule:feed_var(ClientInfo, AclTopicWords),
emqx_topic:match(TopicWords, AclTopicRendered).
string_to_number(Str, IntFun, FloatFun) ->
try
{ok, IntFun(Str)}
catch _:_ ->
try
{ok, FloatFun(Str)}
catch _:_ ->
false
end
end.

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -31,16 +31,19 @@
start(_Type, _Args) ->
{ok, Sup} = supervisor:start_link({local, ?MODULE}, ?MODULE, []),
{ok, Pid} = start_auth_server(jwks_svr_options()),
ok = emqx_auth_jwt:register_metrics(),
AuthEnv0 = auth_env(),
AuthEnv1 = AuthEnv0#{pid => Pid},
{ok, _} = start_auth_server(jwks_svr_options()),
_ = emqx:hook('client.authenticate', {emqx_auth_jwt, check, [AuthEnv1]}),
{ok, Sup, AuthEnv1}.
AuthEnv = auth_env(),
_ = emqx:hook('client.authenticate', {emqx_auth_jwt, check_auth, [AuthEnv]}),
stop(AuthEnv) ->
emqx:unhook('client.authenticate', {emqx_auth_jwt, check, [AuthEnv]}).
AclEnv = acl_env(),
_ = emqx:hook('client.check_acl', {emqx_auth_jwt, check_acl, [AclEnv]}),
{ok, Sup}.
stop(_State) ->
emqx:unhook('client.authenticate', {emqx_auth_jwt, check_auth}),
emqx:unhook('client.check_acl', {emqx_auth_jwt, check_acl}).
%%--------------------------------------------------------------------
%% Dummy supervisor
@ -69,6 +72,9 @@ auth_env() ->
, checklists => Checklists
}.
acl_env() ->
#{acl_claim_name => env(acl_claim_name, <<"acl">>)}.
jwks_svr_options() ->
[{K, V} || {K, V}
<- [{secret, env(secret, undefined)},

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -20,13 +20,14 @@
-include_lib("emqx/include/logger.hrl").
-include_lib("jose/include/jose_jwk.hrl").
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
-logger_header("[JWT-SVR]").
%% APIs
-export([start_link/1]).
-export([verify/2]).
-export([verify/1, trace/2]).
%% gen_server callbacks
-export([ init/1
@ -44,8 +45,9 @@
| {interval, pos_integer()}.
-define(INTERVAL, 300000).
-define(TAB, ?MODULE).
-record(state, {static, remote, addr, tref, intv}).
-record(state, {addr, tref, intv}).
%%--------------------------------------------------------------------
%% APIs
@ -55,13 +57,13 @@
start_link(Options) ->
gen_server:start_link(?MODULE, [Options], []).
-spec verify(pid(), binary())
-spec verify(binary())
-> {error, term()}
| {ok, Payload :: map()}.
verify(S, JwsCompacted) when is_binary(JwsCompacted) ->
verify(JwsCompacted) when is_binary(JwsCompacted) ->
case catch jose_jws:peek(JwsCompacted) of
{'EXIT', _} -> {error, not_token};
_ -> gen_server:call(S, {verify, JwsCompacted})
_ -> do_verify(JwsCompacted)
end.
%%--------------------------------------------------------------------
@ -70,43 +72,25 @@ verify(S, JwsCompacted) when is_binary(JwsCompacted) ->
init([Options]) ->
ok = jose:json_module(jiffy),
{Static, Remote} = do_init_jwks(Options),
_ = ets:new(?TAB, [set, protected, named_table]),
Static = do_init_jwks(Options),
to_request_jwks(Options),
true = ets:insert(?TAB, [{static, Static}, {remote, undefined}]),
Intv = proplists:get_value(interval, Options, ?INTERVAL),
{ok, reset_timer(
#state{
static = Static,
remote = Remote,
addr = proplists:get_value(jwks_addr, Options),
intv = Intv})}.
%% @private
do_init_jwks(Options) ->
K2J = fun(K, F) ->
case proplists:get_value(K, Options) of
undefined -> undefined;
V ->
try F(V) of
{error, Reason} ->
?LOG(warning, "Build ~p JWK ~p failed: {error, ~p}~n",
[K, V, Reason]),
undefined;
J -> J
catch T:R:_ ->
?LOG(warning, "Build ~p JWK ~p failed: {~p, ~p}~n",
[K, V, T, R]),
undefined
end
end
end,
OctJwk = K2J(secret, fun(V) ->
OctJwk = key2jwt_value(secret,
fun(V) ->
jose_jwk:from_oct(list_to_binary(V))
end),
PemJwk = K2J(pubkey, fun jose_jwk:from_pem_file/1),
Remote = K2J(jwks_addr, fun request_jwks/1),
{[J ||J <- [OctJwk, PemJwk], J /= undefined], Remote}.
handle_call({verify, JwsCompacted}, _From, State) ->
handle_verify(JwsCompacted, State);
end,
Options),
PemJwk = key2jwt_value(pubkey, fun jose_jwk:from_pem_file/1, Options),
[J ||J <- [OctJwk, PemJwk], J /= undefined].
handle_call(_Req, _From, State) ->
{reply, ok, State}.
@ -115,12 +99,18 @@ handle_cast(_Msg, State) ->
{noreply, State}.
handle_info({timeout, _TRef, refresh}, State = #state{addr = Addr}) ->
NState = try
State#state{remote = request_jwks(Addr)}
catch _:_ ->
State
try
true = ets:insert(?TAB, {remote, request_jwks(Addr)})
catch Err:Reason ->
?LOG_SENSITIVE(warning, "Request JWKS failed, jwks_addr: ~p, reason: ~p",
[Addr, {Err, Reason}])
end,
{noreply, reset_timer(NState)};
{noreply, reset_timer(State)};
handle_info({request_jwks, Options}, State) ->
Remote = key2jwt_value(jwks_addr, fun request_jwks/1, Options),
true = ets:insert(?TAB, {remote, Remote}),
{noreply, State};
handle_info(_Info, State) ->
{noreply, State}.
@ -136,24 +126,10 @@ code_change(_OldVsn, State, _Extra) ->
%% Internal funcs
%%--------------------------------------------------------------------
handle_verify(JwsCompacted,
State = #state{static = Static, remote = Remote}) ->
try
Jwks = case emqx_json:decode(jose_jws:peek_protected(JwsCompacted), [return_maps]) of
#{<<"kid">> := Kid} when Remote /= undefined ->
[J || J <- Remote, maps:get(<<"kid">>, J#jose_jwk.fields, undefined) =:= Kid];
_ -> Static
end,
case Jwks of
[] -> {reply, {error, not_found}, State};
_ ->
{reply, do_verify(JwsCompacted, Jwks), State}
end
catch
Class : Reason : Stk ->
?LOG(error, "Handle JWK crashed: ~p, ~p, stacktrace: ~p~n",
[Class, Reason, Stk]),
{reply, {error, invalid_signature}, State}
keys(Type) ->
case ets:lookup(?TAB, Type) of
[{_, Keys}] -> Keys;
[] -> []
end.
request_jwks(Addr) ->
@ -163,9 +139,12 @@ request_jwks(Addr) ->
{ok, {_Code, _Headers, Body}} ->
try
JwkSet = jose_jwk:from(emqx_json:decode(Body, [return_maps])),
{_, Jwks} = JwkSet#jose_jwk.keys, Jwks
{_, Jwks} = JwkSet#jose_jwk.keys,
?tp(debug, emqx_auth_jwt_svr_jwks_updated, #{jwks => Jwks, pid => self()}),
Jwks
catch _:_ ->
?LOG(error, "Invalid jwks server response: ~p~n", [Body]),
?MODULE:trace(jwks_server_reesponse, Body),
?LOG(error, "Invalid jwks server response, body is not logged for security reasons, trace it if inspection is required", []),
error(badarg)
end
end.
@ -181,6 +160,26 @@ cancel_timer(State = #state{tref = TRef}) ->
_ = erlang:cancel_timer(TRef),
State#state{tref = undefined}.
do_verify(JwsCompacted) ->
try
Remote = keys(remote),
Jwks = case emqx_json:decode(jose_jws:peek_protected(JwsCompacted), [return_maps]) of
#{<<"kid">> := Kid} when Remote /= undefined ->
[J || J <- Remote, maps:get(<<"kid">>, J#jose_jwk.fields, undefined) =:= Kid];
_ -> keys(static)
end,
case Jwks of
[] -> {error, not_found};
_ ->
do_verify(JwsCompacted, Jwks)
end
catch
Class : Reason : Stk ->
?LOG_SENSITIVE(error, "verify JWK crashed: ~p, ~p, stacktrace: ~p~n",
[Class, Reason, Stk]),
{error, invalid_signature}
end.
do_verify(_JwsCompated, []) ->
{error, invalid_signature};
do_verify(JwsCompacted, [Jwk|More]) ->
@ -190,7 +189,11 @@ do_verify(JwsCompacted, [Jwk|More]) ->
case check_claims(Claims) of
{false, <<"exp">>} ->
{error, {invalid_signature, expired}};
NClaims ->
{false, <<"iat">>} ->
{error, {invalid_signature, issued_in_future}};
{false, <<"nbf">>} ->
{error, {invalid_signature, not_valid_yet}};
{true, NClaims} ->
{ok, NClaims}
end;
{false, _, _} ->
@ -198,27 +201,64 @@ do_verify(JwsCompacted, [Jwk|More]) ->
end.
check_claims(Claims) ->
Now = os:system_time(seconds),
Checker = [{<<"exp">>, fun(ExpireTime) ->
Now < ExpireTime
end},
{<<"iat">>, fun(IssueAt) ->
IssueAt =< Now
end},
{<<"nbf">>, fun(NotBefore) ->
NotBefore =< Now
end}
Now = erlang:system_time(seconds),
Checker = [{<<"exp">>, with_num_value(
fun(ExpireTime) -> Now < ExpireTime end)},
{<<"iat">>, with_num_value(
fun(IssueAt) -> IssueAt =< Now end)},
{<<"nbf">>, with_num_value(
fun(NotBefore) -> NotBefore =< Now end)}
],
do_check_claim(Checker, Claims).
do_check_claim([], Claims) ->
Claims;
do_check_claim([{K, F}|More], Claims) ->
case maps:take(K, Claims) of
error -> do_check_claim(More, Claims);
{V, NClaims} ->
case F(V) of
true -> do_check_claim(More, NClaims);
_ -> {false, K}
with_num_value(Fun) ->
fun(Value) ->
case Value of
Num when is_number(Num) -> Fun(Num);
Bin when is_binary(Bin) ->
case emqx_auth_jwt:string_to_number(Bin) of
{ok, Num} -> Fun(Num);
_ -> false
end;
Str when is_list(Str) ->
case emqx_auth_jwt:string_to_number(Str) of
{ok, Num} -> Fun(Num);
_ -> false
end
end
end.
do_check_claim([], Claims) ->
{true, Claims};
do_check_claim([{K, F}|More], Claims) ->
case Claims of
#{K := V} ->
case F(V) of
true -> do_check_claim(More, Claims);
_ -> {false, K}
end;
_ ->
do_check_claim(More, Claims)
end.
to_request_jwks(Options) ->
erlang:send(self(), {request_jwks, Options}).
key2jwt_value(Key, Func, Options) ->
case proplists:get_value(Key, Options) of
undefined -> undefined;
V ->
try Func(V) of
{error, Reason} ->
?LOG_SENSITIVE(warning, "Build ~p JWK ~p failed: {error, ~p}~n",
[Key, V, Reason]),
undefined;
J -> J
catch T:R ->
?LOG_SENSITIVE(warning, "Build ~p JWK ~p failed: {~p, ~p}~n",
[Key, V, T, R]),
undefined
end
end.
trace(_Tag, _Data) -> ok.

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -19,29 +19,20 @@
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("emqx/include/emqx.hrl").
-include_lib("emqx/include/emqx_mqtt.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
-define(APP, emqx_auth_jwt).
all() -> emqx_ct:all(?MODULE).
all() ->
[{group, emqx_auth_jwt}].
groups() ->
[{emqx_auth_jwt, [sequence], [ t_check_auth
, t_check_claims
, t_check_claims_clientid
, t_check_claims_username
, t_check_claims_kid_in_header
]}
].
init_per_suite(Config) ->
init_per_testcase(TestCase, Config) ->
?MODULE:TestCase(init, Config),
emqx_ct_helpers:start_apps([emqx_auth_jwt], fun set_special_configs/1),
Config.
end_per_suite(_Config) ->
end_per_testcase(TestCase, Config) ->
try ?MODULE:TestCase('end', Config) catch _:_ -> ok end,
emqx_ct_helpers:stop_apps([emqx_auth_jwt]).
set_special_configs(emqx) ->
@ -78,11 +69,13 @@ sign(Payload, Alg, Key) ->
%% Testcases
%%------------------------------------------------------------------------------
t_check_auth(_) ->
t_check_auth(init, _Config) ->
application:unset_env(emqx_auth_jwt, verify_claims).
t_check_auth(_Config) ->
Plain = #{clientid => <<"client1">>, username => <<"plain">>, zone => external},
Jwt = sign([{clientid, <<"client1">>},
{username, <<"plain">>},
{exp, os:system_time(seconds) + 3}], <<"HS256">>, <<"emqxsecret">>),
{exp, erlang:system_time(seconds) + 2}], <<"HS256">>, <<"emqxsecret">>),
ct:pal("Jwt: ~p~n", [Jwt]),
Result0 = emqx_access_control:authenticate(Plain#{password => Jwt}),
@ -91,7 +84,7 @@ t_check_auth(_) ->
ct:sleep(3100),
Result1 = emqx_access_control:authenticate(Plain#{password => Jwt}),
ct:pal("Auth result after 1000ms: ~p~n", [Result1]),
ct:pal("Auth result after 3100ms: ~p~n", [Result1]),
?assertMatch({error, _}, Result1),
Jwt_Error = sign([{client_id, <<"client1">>},
@ -102,15 +95,121 @@ t_check_auth(_) ->
?assertEqual({error, invalid_signature}, Result2),
?assertMatch({error, _}, emqx_access_control:authenticate(Plain#{password => <<"asd">>})).
t_check_claims(_) ->
application:set_env(emqx_auth_jwt, verify_claims, [{sub, <<"value">>}]),
application:stop(emqx_auth_jwt), application:start(emqx_auth_jwt),
t_check_nbf(init, _Config) ->
application:unset_env(emqx_auth_jwt, verify_claims).
t_check_nbf(_Config) ->
Plain = #{clientid => <<"client1">>, username => <<"plain">>, zone => external},
Jwt = sign([{clientid, <<"client1">>},
{username, <<"plain">>},
{nbf, erlang:system_time(seconds) + 3}], <<"HS256">>, <<"emqxsecret">>),
ct:pal("Jwt: ~p~n", [Jwt]),
Result0 = emqx_access_control:authenticate(Plain#{password => Jwt}),
ct:pal("Auth result: ~p~n", [Result0]),
?assertEqual({error, {invalid_signature, not_valid_yet}}, Result0).
t_check_iat(init, _Config) ->
application:unset_env(emqx_auth_jwt, verify_claims).
t_check_iat(_Config) ->
Plain = #{clientid => <<"client1">>, username => <<"plain">>, zone => external},
Jwt = sign([{clientid, <<"client1">>},
{username, <<"plain">>},
{iat, erlang:system_time(seconds) + 3}], <<"HS256">>, <<"emqxsecret">>),
ct:pal("Jwt: ~p~n", [Jwt]),
Result0 = emqx_access_control:authenticate(Plain#{password => Jwt}),
ct:pal("Auth result: ~p~n", [Result0]),
?assertEqual({error, {invalid_signature, issued_in_future}}, Result0).
t_check_auth_invalid_exp(init, _Config) ->
application:unset_env(emqx_auth_jwt, verify_claims).
t_check_auth_invalid_exp(_Config) ->
Plain = #{clientid => <<"client1">>, username => <<"plain">>, zone => external},
Jwt0 = sign([{clientid, <<"client1">>},
{username, <<"plain">>},
{exp, [{foo, bar}]}], <<"HS256">>, <<"emqxsecret">>),
ct:pal("Jwt: ~p~n", [Jwt0]),
Result0 = emqx_access_control:authenticate(Plain#{password => Jwt0}),
ct:pal("Auth result: ~p~n", [Result0]),
?assertMatch({error, _}, Result0),
Jwt1 = sign([{clientid, <<"client1">>},
{username, <<"plain">>},
{exp, <<"foobar">>}], <<"HS256">>, <<"emqxsecret">>),
ct:pal("Jwt: ~p~n", [Jwt1]),
Result1 = emqx_access_control:authenticate(Plain#{password => Jwt1}),
ct:pal("Auth result: ~p~n", [Result1]),
?assertMatch({error, _}, Result1).
t_check_auth_str_exp(init, _Config) ->
application:unset_env(emqx_auth_jwt, verify_claims).
t_check_auth_str_exp(_Config) ->
Plain = #{clientid => <<"client1">>, username => <<"plain">>, zone => external},
Exp = integer_to_binary(erlang:system_time(seconds) + 3),
Jwt0 = sign([{clientid, <<"client1">>},
{username, <<"plain">>},
{exp, Exp}], <<"HS256">>, <<"emqxsecret">>),
ct:pal("Jwt: ~p~n", [Jwt0]),
Result0 = emqx_access_control:authenticate(Plain#{password => Jwt0}),
ct:pal("Auth result: ~p~n", [Result0]),
?assertMatch({ok, #{auth_result := success, jwt_claims := _}}, Result0),
Jwt1 = sign([{clientid, <<"client1">>},
{username, <<"plain">>},
{exp, <<"0">>}], <<"HS256">>, <<"emqxsecret">>),
ct:pal("Jwt: ~p~n", [Jwt1]),
Result1 = emqx_access_control:authenticate(Plain#{password => Jwt1}),
ct:pal("Auth result: ~p~n", [Result1]),
?assertMatch({error, _}, Result1),
Exp2 = float_to_binary(erlang:system_time(seconds) + 3.5),
Jwt2 = sign([{clientid, <<"client1">>},
{username, <<"plain">>},
{exp, Exp2}], <<"HS256">>, <<"emqxsecret">>),
ct:pal("Jwt: ~p~n", [Jwt2]),
Result2 = emqx_access_control:authenticate(Plain#{password => Jwt2}),
ct:pal("Auth result: ~p~n", [Result2]),
?assertMatch({ok, #{auth_result := success, jwt_claims := _}}, Result2).
t_check_auth_float_exp(init, _Config) ->
application:unset_env(emqx_auth_jwt, verify_claims).
t_check_auth_float_exp(_Config) ->
Plain = #{clientid => <<"client1">>, username => <<"plain">>, zone => external},
Exp = erlang:system_time(seconds) + 3.5,
Jwt0 = sign([{clientid, <<"client1">>},
{username, <<"plain">>},
{exp, Exp}], <<"HS256">>, <<"emqxsecret">>),
ct:pal("Jwt: ~p~n", [Jwt0]),
Result0 = emqx_access_control:authenticate(Plain#{password => Jwt0}),
ct:pal("Auth result: ~p~n", [Result0]),
?assertMatch({ok, #{auth_result := success, jwt_claims := _}}, Result0),
Jwt1 = sign([{clientid, <<"client1">>},
{username, <<"plain">>},
{exp, 1.5}], <<"HS256">>, <<"emqxsecret">>),
ct:pal("Jwt: ~p~n", [Jwt1]),
Result1 = emqx_access_control:authenticate(Plain#{password => Jwt1}),
ct:pal("Auth result: ~p~n", [Result1]),
?assertMatch({error, _}, Result1).
t_check_claims(init, _Config) ->
application:set_env(emqx_auth_jwt, verify_claims, [{sub, <<"value">>}]).
t_check_claims(_Config) ->
Plain = #{clientid => <<"client1">>, username => <<"plain">>, zone => external},
Jwt = sign([{client_id, <<"client1">>},
{username, <<"plain">>},
{sub, value},
{exp, os:system_time(seconds) + 3}], <<"HS256">>, <<"emqxsecret">>),
{exp, erlang:system_time(seconds) + 3}], <<"HS256">>, <<"emqxsecret">>),
Result0 = emqx_access_control:authenticate(Plain#{password => Jwt}),
ct:pal("Auth result: ~p~n", [Result0]),
?assertMatch({ok, #{auth_result := success, jwt_claims := _}}, Result0),
@ -120,13 +219,13 @@ t_check_claims(_) ->
ct:pal("Auth result for the invalid jwt: ~p~n", [Result2]),
?assertEqual({error, invalid_signature}, Result2).
t_check_claims_clientid(_) ->
application:set_env(emqx_auth_jwt, verify_claims, [{clientid, <<"%c">>}]),
application:stop(emqx_auth_jwt), application:start(emqx_auth_jwt),
t_check_claims_clientid(init, _Config) ->
application:set_env(emqx_auth_jwt, verify_claims, [{clientid, <<"%c">>}]).
t_check_claims_clientid(_Config) ->
Plain = #{clientid => <<"client23">>, username => <<"plain">>, zone => external},
Jwt = sign([{clientid, <<"client23">>},
{username, <<"plain">>},
{exp, os:system_time(seconds) + 3}], <<"HS256">>, <<"emqxsecret">>),
{exp, erlang:system_time(seconds) + 3}], <<"HS256">>, <<"emqxsecret">>),
Result0 = emqx_access_control:authenticate(Plain#{password => Jwt}),
ct:pal("Auth result: ~p~n", [Result0]),
?assertMatch({ok, #{auth_result := success, jwt_claims := _}}, Result0),
@ -136,14 +235,13 @@ t_check_claims_clientid(_) ->
ct:pal("Auth result for the invalid jwt: ~p~n", [Result2]),
?assertEqual({error, invalid_signature}, Result2).
t_check_claims_username(_) ->
application:set_env(emqx_auth_jwt, verify_claims, [{username, <<"%u">>}]),
application:stop(emqx_auth_jwt), application:start(emqx_auth_jwt),
t_check_claims_username(init, _Config) ->
application:set_env(emqx_auth_jwt, verify_claims, [{username, <<"%u">>}]).
t_check_claims_username(_Config) ->
Plain = #{clientid => <<"client23">>, username => <<"plain">>, zone => external},
Jwt = sign([{client_id, <<"client23">>},
{username, <<"plain">>},
{exp, os:system_time(seconds) + 3}], <<"HS256">>, <<"emqxsecret">>),
{exp, erlang:system_time(seconds) + 3}], <<"HS256">>, <<"emqxsecret">>),
Result0 = emqx_access_control:authenticate(Plain#{password => Jwt}),
ct:pal("Auth result: ~p~n", [Result0]),
?assertMatch({ok, #{auth_result := success, jwt_claims := _}}, Result0),
@ -153,14 +251,264 @@ t_check_claims_username(_) ->
ct:pal("Auth result for the invalid jwt: ~p~n", [Result3]),
?assertEqual({error, invalid_signature}, Result3).
t_check_claims_kid_in_header(_) ->
application:set_env(emqx_auth_jwt, verify_claims, []),
t_check_claims_kid_in_header(init, _Config) ->
application:set_env(emqx_auth_jwt, verify_claims, []).
t_check_claims_kid_in_header(_Config) ->
Plain = #{clientid => <<"client23">>, username => <<"plain">>, zone => external},
Jwt = sign([{clientid, <<"client23">>},
{username, <<"plain">>},
{exp, os:system_time(seconds) + 3}],
{exp, erlang:system_time(seconds) + 3}],
#{<<"alg">> => <<"HS256">>,
<<"kid">> => <<"a_kid_str">>}, <<"emqxsecret">>),
Result0 = emqx_access_control:authenticate(Plain#{password => Jwt}),
ct:pal("Auth result: ~p~n", [Result0]),
?assertMatch({ok, #{auth_result := success, jwt_claims := _}}, Result0).
t_keys_update(init, _Config) ->
ok = meck:new(httpc, [passthrough, no_history]),
ok = meck:expect(
httpc,
request,
fun(get, _, _, _) ->
{ok,
{200,
[],
jiffy:encode(#{<<"keys">> => []})}}
end),
application:set_env(emqx_auth_jwt, verify_claims, []),
application:set_env(emqx_auth_jwt, refresh_interval, 100),
application:set_env(emqx_auth_jwt, jwks, "http://localhost:4001/keys.json").
t_keys_update(_Config) ->
?check_trace(
snabbkaffe:block_until(
?match_n_events(2, #{?snk_kind := emqx_auth_jwt_svr_jwks_updated}),
_Timeout = infinity,
_BackInTIme = 0),
fun(_, Trace) ->
?assertMatch([#{pid := Pid}, #{pid := Pid} | _],
?of_kind(emqx_auth_jwt_svr_jwks_updated, Trace))
end).
t_check_jwt_acl(init, _Config) ->
application:set_env(emqx_auth_jwt, verify_claims, [{sub, <<"value">>}]).
t_check_jwt_acl(_Config) ->
Jwt = sign([{client_id, <<"client1">>},
{username, <<"plain">>},
{sub, value},
{acl, [{sub, [<<"a/b">>]},
{pub, [<<"c/d">>]},
{all, [<<"all">>]}]},
{exp, erlang:system_time(seconds) + 10}],
<<"HS256">>,
<<"emqxsecret">>),
{ok, C} = emqtt:start_link(
[{clean_start, true},
{proto_ver, v5},
{client_id, <<"client1">>},
{password, Jwt}]),
{ok, _} = emqtt:connect(C),
?assertMatch(
{ok, #{}, [0]},
emqtt:subscribe(C, <<"a/b">>, 0)),
?assertMatch(
ok,
emqtt:publish(C, <<"c/d">>, <<"hi">>, 0)),
?assertMatch(
{ok, #{}, [?RC_NOT_AUTHORIZED]},
emqtt:subscribe(C, <<"c/d">>, 0)),
ok = emqtt:publish(C, <<"a/b">>, <<"hi">>, 0),
receive
{publish, #{topic := <<"a/b">>}} ->
?assert(false, "Publish to `a/b` should not be allowed")
after 100 -> ok
end,
%% can pub/sub to all rules
?assertMatch(
{ok, #{}, [0]},
emqtt:subscribe(C, <<"all">>, 0)),
?assertMatch(
ok,
emqtt:publish(C, <<"all">>, <<"hi">>, 0)),
receive
{publish, #{topic := <<"all">>}} -> ok
after 2000 ->
?assert(false, "Publish to `all` should be allowed")
end,
ok = emqtt:disconnect(C).
t_check_jwt_acl_no_recs(init, _Config) ->
application:set_env(emqx_auth_jwt, verify_claims, [{sub, <<"value">>}]).
t_check_jwt_acl_no_recs(_Config) ->
Jwt = sign([{client_id, <<"client1">>},
{username, <<"plain">>},
{sub, value},
{acl, []},
{exp, erlang:system_time(seconds) + 10}],
<<"HS256">>,
<<"emqxsecret">>),
{ok, C} = emqtt:start_link(
[{clean_start, true},
{proto_ver, v5},
{client_id, <<"client1">>},
{password, Jwt}]),
{ok, _} = emqtt:connect(C),
?assertMatch(
{ok, #{}, [?RC_NOT_AUTHORIZED]},
emqtt:subscribe(C, <<"a/b">>, 0)),
ok = emqtt:disconnect(C).
t_check_jwt_acl_no_acl_claim(init, _Config) ->
application:set_env(emqx_auth_jwt, verify_claims, [{sub, <<"value">>}]).
t_check_jwt_acl_no_acl_claim(_Config) ->
Jwt = sign([{client_id, <<"client1">>},
{username, <<"plain">>},
{sub, value},
{exp, erlang:system_time(seconds) + 10}],
<<"HS256">>,
<<"emqxsecret">>),
{ok, C} = emqtt:start_link(
[{clean_start, true},
{proto_ver, v5},
{client_id, <<"client1">>},
{password, Jwt}]),
{ok, _} = emqtt:connect(C),
?assertMatch(
{ok, #{}, [?RC_NOT_AUTHORIZED]},
emqtt:subscribe(C, <<"a/b">>, 0)),
ok = emqtt:disconnect(C).
t_check_jwt_acl_no_jwt_claims_helper(_ClientInfo, _LastAuthResult) ->
{stop, #{auth_result => success, anonymous => false}}.
t_check_jwt_acl_no_jwt_claims(init, _Config) ->
ok;
t_check_jwt_acl_no_jwt_claims('end', _Config) ->
ok = emqx_hooks:del(
'client.authenticate',
{?MODULE, t_check_jwt_acl_no_jwt_claims_helper, []}
).
t_check_jwt_acl_no_jwt_claims(_Config) ->
%% bypass the jwt authentication checking
ok = emqx_hooks:add(
'client.authenticate',
{?MODULE, t_check_jwt_acl_no_jwt_claims_helper, []},
_Priority = 99999
),
{ok, C} = emqtt:start_link(
[{clean_start, true},
{proto_ver, v5},
{client_id, <<"client1">>},
{username, <<"client1">>},
{password, <<"password">>}]),
{ok, _} = emqtt:connect(C),
ok = snabbkaffe:start_trace(),
?assertMatch(
{ok, #{}, [?RC_NOT_AUTHORIZED]},
emqtt:subscribe(C, <<"a/b">>, 0)),
{ok, _} = ?block_until(#{?snk_kind := no_jwt_claim}, 1000),
Trace = snabbkaffe:collect_trace(),
?assertEqual(1, length(?of_kind(no_jwt_claim, Trace))),
snabbkaffe:stop(),
ok = emqtt:disconnect(C).
t_check_jwt_acl_expire(init, _Config) ->
application:set_env(emqx_auth_jwt, verify_claims, [{sub, <<"value">>}]).
t_check_jwt_acl_expire(_Config) ->
Jwt = sign([{client_id, <<"client1">>},
{username, <<"plain">>},
{sub, value},
{acl, [{sub, [<<"a/b">>]}]},
{exp, erlang:system_time(seconds) + 1}],
<<"HS256">>,
<<"emqxsecret">>),
{ok, C} = emqtt:start_link(
[{clean_start, true},
{proto_ver, v5},
{client_id, <<"client1">>},
{password, Jwt}]),
{ok, _} = emqtt:connect(C),
?assertMatch(
{ok, #{}, [0]},
emqtt:subscribe(C, <<"a/b">>, 0)),
?assertMatch(
{ok, #{}, [0]},
emqtt:unsubscribe(C, <<"a/b">>)),
timer:sleep(2000),
?assertMatch(
{ok, #{}, [?RC_NOT_AUTHORIZED]},
emqtt:subscribe(C, <<"a/b">>, 0)),
Default = emqx_zone:get_env(external, acl_nomatch, deny),
emqx_zone:set_env(external, acl_nomatch, allow),
try
?assertMatch(
{ok, #{}, [?RC_NOT_AUTHORIZED]},
emqtt:subscribe(C, <<"a/b">>, 0))
after
emqx_zone:set_env(external, acl_nomatch, Default)
end,
ok = emqtt:disconnect(C).
t_check_jwt_acl_no_exp(init, _Config) ->
application:set_env(emqx_auth_jwt, verify_claims, [{sub, <<"value">>}]).
t_check_jwt_acl_no_exp(_Config) ->
Jwt = sign([{client_id, <<"client1">>},
{username, <<"plain">>},
{sub, value},
{acl, [{sub, [<<"a/b">>]}]}],
<<"HS256">>,
<<"emqxsecret">>),
{ok, C} = emqtt:start_link(
[{clean_start, true},
{proto_ver, v5},
{client_id, <<"client1">>},
{password, Jwt}]),
{ok, _} = emqtt:connect(C),
?assertMatch(
{ok, #{}, [0]},
emqtt:subscribe(C, <<"a/b">>, 0)),
ok = emqtt:disconnect(C).
t_check_compatibility(init, _Config) -> ok.
t_check_compatibility(_Config) ->
%% We literary want emqx_auth_jwt:check call emqx_auth_jwt:check_auth, so check with meck
ok = meck:new(emqx_auth_jwt, [passthrough, no_history]),
ok = meck:expect(emqx_auth_jwt, check_auth, fun(a, b, c) -> ok end),
?assertEqual(
ok,
emqx_auth_jwt:check(a, b, c)
),
meck:validate(emqx_auth_jwt),
meck:unload(emqx_auth_jwt).

View File

@ -1,7 +1,7 @@
emqx_auth_ldap
==============
EMQ X LDAP Authentication Plugin
EMQX LDAP Authentication Plugin
Build
-----
@ -92,5 +92,5 @@ Apache License Version 2.0
Author
------
EMQ X Team.
EMQX Team.

View File

View File

@ -1,23 +1,17 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%--------------------------------------------------------------------
-define(APP, emqx_auth_ldap).
-record(auth_metrics, {
success = 'client.auth.success',
failure = 'client.auth.failure',
ignore = 'client.auth.ignore'
}).
-record(acl_metrics, {
allow = 'client.acl.allow',
deny = 'client.acl.deny',
ignore = 'client.acl.ignore'
}).
-define(METRICS(Type), tl(tuple_to_list(#Type{}))).
-define(METRICS(Type, K), #Type{}#Type.K).
-define(AUTH_METRICS, ?METRICS(auth_metrics)).
-define(AUTH_METRICS(K), ?METRICS(auth_metrics, K)).
-define(ACL_METRICS, ?METRICS(acl_metrics)).
-define(ACL_METRICS(K), ?METRICS(acl_metrics, K)).

View File

@ -73,6 +73,7 @@
{verify, cuttlefish:conf_get("auth.ldap.ssl.verify", Conf, undefined)},
{server_name_indication, case cuttlefish:conf_get("auth.ldap.ssl.server_name_indication", Conf, undefined) of
"disable" -> disable;
"" -> undefined;
SNI -> SNI
end}]
end,

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -19,27 +19,28 @@
-include("emqx_auth_ldap.hrl").
-include_lib("emqx/include/emqx.hrl").
-include_lib("eldap/include/eldap.hrl").
-include_lib("eldap2/include/eldap.hrl").
-include_lib("emqx/include/logger.hrl").
-export([ register_metrics/0
, check_acl/5
-export([ check_acl/5
, description/0
]).
-import(proplists, [get_value/2]).
-import(emqx_auth_ldap_cli, [search/4]).
-spec(register_metrics() -> ok).
register_metrics() ->
lists:foreach(fun emqx_metrics:ensure/1, ?ACL_METRICS).
check_acl(ClientInfo, PubSub, Topic, NoMatchAction, State) ->
case do_check_acl(ClientInfo, PubSub, Topic, NoMatchAction, State) of
ok -> emqx_metrics:inc(?ACL_METRICS(ignore)), ok;
{stop, allow} -> emqx_metrics:inc(?ACL_METRICS(allow)), {stop, allow};
{stop, deny} -> emqx_metrics:inc(?ACL_METRICS(deny)), {stop, deny}
ok -> ?LOG_SENSITIVE(debug,
"[LDAP] ACL ignored, Topic: ~p, Action: ~p for Client: ~p",
[Topic, PubSub, ClientInfo]);
{stop, allow} ->
?LOG_SENSITIVE(debug,
"[LDAP] Allow Topic: ~p, Action: ~p for Client: ~p",
[Topic, PubSub, ClientInfo]),
{stop, allow};
{stop, deny} ->
?LOG_SENSITIVE(debug,
"[LDAP] Deny Topic: ~p, Action: ~p for Client: ~p",
[Topic, PubSub, ClientInfo]),
{stop, deny}
end.
do_check_acl(#{username := <<$$, _/binary>>}, _PubSub, _Topic, _NoMatchAction, _State) ->
@ -70,14 +71,14 @@ do_check_acl(#{username := Username}, PubSub, Topic, _NoMatchAction,
BaseDN = emqx_auth_ldap:replace_vars(CustomBaseDN, ReplaceRules),
case search(Pool, BaseDN, Filter, [Attribute, Attribute1]) of
case emqx_auth_ldap_cli:search(Pool, BaseDN, Filter, [Attribute, Attribute1]) of
{error, noSuchObject} ->
ok;
{ok, #eldap_search_result{entries = []}} ->
ok;
{ok, #eldap_search_result{entries = [Entry]}} ->
Topics = get_value(Attribute, Entry#eldap_entry.attributes)
++ get_value(Attribute1, Entry#eldap_entry.attributes),
Topics = proplists:get_value(Attribute, Entry#eldap_entry.attributes, [])
++ proplists:get_value(Attribute1, Entry#eldap_entry.attributes, []),
match(Topic, Topics);
Error ->
?LOG(error, "[LDAP] search error:~p", [Error]),
@ -95,4 +96,3 @@ match(Topic, [Filter | Topics]) ->
description() ->
"ACL with LDAP".

View File

@ -1,13 +1,13 @@
{application, emqx_auth_ldap,
[{description, "EMQ X Authentication/ACL with LDAP"},
{vsn, "4.3.0"}, % strict semver, bump manually!
[{description, "EMQX Authentication/ACL with LDAP"},
{vsn, "4.3.8"}, % strict semver, bump manually!
{modules, []},
{registered, [emqx_auth_ldap_sup]},
{applications, [kernel,stdlib,eldap2,ecpool]},
{mod, {emqx_auth_ldap_app,[]}},
{env, []},
{licenses, ["Apache-2.0"]},
{maintainers, ["EMQ X Team <contact@emqx.io>"]},
{maintainers, ["EMQX Team <contact@emqx.io>"]},
{links, [{"Homepage", "https://emqx.io/"},
{"Github", "https://github.com/emqx/emqx-auth-ldap"}
]}

View File

@ -0,0 +1,55 @@
%% -*- mode: erlang -*-
%% Unless you know what you are doing, DO NOT edit manually!!
{VSN,
[{"4.3.7",
[{load_module,emqx_auth_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_ldap,brutal_purge,soft_purge,[]}]},
{"4.3.6",
[{load_module,emqx_acl_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap,brutal_purge,soft_purge,[]}]},
{"4.3.5",
[{load_module,emqx_acl_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap_cli,brutal_purge,soft_purge,[]}]},
{<<"4\\.3\\.[3-4]">>,
[{load_module,emqx_acl_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap,brutal_purge,soft_purge,[]}]},
{"4.3.2",
[{load_module,emqx_auth_ldap_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_ldap,brutal_purge,soft_purge,[]}]},
{<<"4\\.3\\.[0-1]">>,
[{load_module,emqx_auth_ldap_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap_cli,brutal_purge,soft_purge,[]}]},
{<<".*">>,[]}],
[{"4.3.7",
[{load_module,emqx_auth_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_ldap,brutal_purge,soft_purge,[]}]},
{"4.3.6",
[{load_module,emqx_acl_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap,brutal_purge,soft_purge,[]}]},
{"4.3.5",
[{load_module,emqx_acl_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap_cli,brutal_purge,soft_purge,[]}]},
{<<"4\\.3\\.[3-4]">>,
[{load_module,emqx_acl_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap,brutal_purge,soft_purge,[]}]},
{"4.3.2",
[{load_module,emqx_auth_ldap_cli,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_ldap,brutal_purge,soft_purge,[]}]},
{<<"4\\.3\\.[0-1]">>,
[{load_module,emqx_auth_ldap_app,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_acl_ldap,brutal_purge,soft_purge,[]},
{load_module,emqx_auth_ldap_cli,brutal_purge,soft_purge,[]}]},
{<<".*">>,[]}]}.

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -19,24 +19,19 @@
-include("emqx_auth_ldap.hrl").
-include_lib("emqx/include/emqx.hrl").
-include_lib("eldap/include/eldap.hrl").
-include_lib("eldap2/include/eldap.hrl").
-include_lib("emqx/include/logger.hrl").
-import(proplists, [get_value/2]).
-import(emqx_auth_ldap_cli, [search/3]).
-export([ register_metrics/0
, check/3
-export([ check/3
, description/0
, prepare_filter/4
, replace_vars/2
]).
-spec(register_metrics() -> ok).
register_metrics() ->
lists:foreach(fun emqx_metrics:ensure/1, ?AUTH_METRICS).
check(ClientInfo = #{username := Username, password := Password}, AuthResult,
State = #{password_attr := PasswdAttr, bind_as_user := BindAsUserRequired, pool := Pool}) ->
CheckResult =
@ -63,13 +58,16 @@ check(ClientInfo = #{username := Username, password := Password}, AuthResult,
end,
case CheckResult of
ok ->
ok = emqx_metrics:inc(?AUTH_METRICS(success)),
?LOG_SENSITIVE(debug,
"[LDAP] Auth succeeded, Client: ~p",
[ClientInfo]),
{stop, AuthResult#{auth_result => success, anonymous => false}};
{error, not_found} ->
emqx_metrics:inc(?AUTH_METRICS(ignore));
?LOG_SENSITIVE(debug,
"[LDAP] Auth ignored, Client: ~p",
[ClientInfo]);
{error, ResultCode} ->
ok = emqx_metrics:inc(?AUTH_METRICS(failure)),
?LOG(error, "[LDAP] Auth from ldap failed: ~p", [ResultCode]),
?LOG_SENSITIVE(error, "[LDAP] Auth failed: ~p", [ResultCode]),
{stop, AuthResult#{auth_result => ResultCode, anonymous => false}}
end.

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -49,12 +49,10 @@ stop(_State) ->
ok.
load_auth_hook(DeviceDn) ->
ok = emqx_auth_ldap:register_metrics(),
Params = maps:from_list(DeviceDn),
emqx:hook('client.authenticate', fun emqx_auth_ldap:check/3, [Params#{pool => ?APP}]).
load_acl_hook(DeviceDn) ->
ok = emqx_acl_ldap:register_metrics(),
Params = maps:from_list(DeviceDn),
emqx:hook('client.check_acl', fun emqx_acl_ldap:check_acl/5 , [Params#{pool => ?APP}]).

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -54,30 +54,30 @@ connect(Opts) ->
false ->
[{port, Port}, {timeout, Timeout}]
end,
?LOG(debug, "[LDAP] Connecting to OpenLDAP server: ~p, Opts:~p ...", [Servers, LdapOpts]),
?LOG_SENSITIVE(debug, "[LDAP] Connecting to OpenLDAP server: ~p, Opts:~p ...", [Servers, LdapOpts]),
case eldap2:open(Servers, LdapOpts) of
{ok, LDAP} ->
try eldap2:simple_bind(LDAP, BindDn, BindPassword) of
ok -> {ok, LDAP};
{error, Error} ->
?LOG(error, "[LDAP] Can't authenticated to OpenLDAP server: ~p", [Error]),
?LOG_SENSITIVE(error, "[LDAP] Can't authenticated to OpenLDAP server: ~p", [Error]),
{error, Error}
catch
error:Reason ->
?LOG(error, "[LDAP] Can't authenticated to OpenLDAP server: ~p", [Reason]),
?LOG_SENSITIVE(error, "[LDAP] Can't authenticated to OpenLDAP server: ~p", [Reason]),
{error, Reason}
end;
{error, Reason} ->
?LOG(error, "[LDAP] Can't connect to OpenLDAP server: ~p", [Reason]),
?LOG_SENSITIVE(error, "[LDAP] Can't connect to OpenLDAP server: ~p", [Reason]),
{error, Reason}
end.
search(Pool, Base, Filter) ->
ecpool:with_client(Pool,
fun(C) ->
case application:get_env(?APP, bind_as_user) of
{ok, true} ->
case application:get_env(?APP, bind_as_user, false) of
true ->
{ok, Opts} = application:get_env(?APP, ldap),
BindDn = get_value(bind_dn, Opts),
BindPassword = get_value(bind_password, Opts),
@ -91,7 +91,7 @@ search(Pool, Base, Filter) ->
catch
error:Reason -> {error, Reason}
end;
{ok, false} ->
false ->
eldap2:search(C, [{base, Base},
{filter, Filter},
{deref, eldap2:derefFindingBaseObj()}])
@ -101,8 +101,8 @@ search(Pool, Base, Filter) ->
search(Pool, Base, Filter, Attributes) ->
ecpool:with_client(Pool,
fun(C) ->
case application:get_env(?APP, bind_as_user) of
{ok, true} ->
case application:get_env(?APP, bind_as_user, false) of
true ->
{ok, Opts} = application:get_env(?APP, ldap),
BindDn = get_value(bind_dn, Opts),
BindPassword = get_value(bind_password, Opts),
@ -117,7 +117,7 @@ search(Pool, Base, Filter, Attributes) ->
catch
error:Reason -> {error, Reason}
end;
{ok, false} ->
false ->
eldap2:search(C, [{base, Base},
{filter, Filter},
{attributes, Attributes},
@ -147,4 +147,3 @@ init_args(ENVS) ->
match_objectclass => ObjectClass,
username_attr => UidAttr,
password_attr => PasswdAttr}}.

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -48,7 +48,9 @@ init_per_group(GrpName, Cfg) ->
Cfg.
end_per_group(_GrpName, _Cfg) ->
emqx_ct_helpers:stop_apps([emqx_auth_ldap]).
emqx_ct_helpers:stop_apps([emqx_auth_ldap]),
%% clear the application envs to avoid cross-suite testcase failure
application:unload(emqx_auth_ldap).
%%--------------------------------------------------------------------
%% Cases

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -40,7 +40,9 @@ init_per_suite(Config) ->
Config.
end_per_suite(_Config) ->
emqx_ct_helpers:stop_apps([emqx_auth_ldap]).
emqx_ct_helpers:stop_apps([emqx_auth_ldap]),
%% clear the application envs to avoid cross-suite testcase failure
application:unload(emqx_auth_ldap).
check_auth(_) ->
MqttUser1 = #{clientid => <<"mqttuser1">>,

View File

@ -1,38 +1,65 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%--------------------------------------------------------------------
-define(APP, emqx_auth_mnesia).
-type(login():: {clientid, binary()}
-type(login() :: {clientid, binary()}
| {username, binary()}).
-type(acl_target() :: login() | all).
-type(acl_target_type() :: clientid | username | all).
-type(access():: allow | deny).
-type(action():: pub | sub).
-type(legacy_action():: action() | pubsub).
-type(created_at():: integer()).
-record(emqx_user, {
login,
password,
created_at
}).
-type(emqx_user() :: #emqx_user{
login :: login(),
password :: binary(),
created_at :: integer()
created_at :: created_at()
}).
-record(emqx_acl, {
filter:: {login() | all, emqx_topic:topic()},
action :: pub | sub | pubsub,
access :: allow | deny,
created_at :: integer()
-define(ACL_TABLE, emqx_acl).
-define(MIGRATION_MARK_KEY, emqx_acl2_migration_started).
-record(?ACL_TABLE, {
filter :: {acl_target(), emqx_topic:topic()} | ?MIGRATION_MARK_KEY,
action :: legacy_action(),
access :: access(),
created_at :: created_at()
}).
-record(auth_metrics, {
success = 'client.auth.success',
failure = 'client.auth.failure',
ignore = 'client.auth.ignore'
-define(MIGRATION_MARK_RECORD, #?ACL_TABLE{filter = ?MIGRATION_MARK_KEY, action = pub, access = deny, created_at = 0}).
-type(rule() :: {access(), action(), emqx_topic:topic(), created_at()}).
-define(ACL_TABLE2, emqx_acl2).
-record(?ACL_TABLE2, {
who :: acl_target(),
rules :: [ rule() ]
}).
-record(acl_metrics, {
allow = 'client.acl.allow',
deny = 'client.acl.deny',
ignore = 'client.acl.ignore'
}).
-define(METRICS(Type), tl(tuple_to_list(#Type{}))).
-define(METRICS(Type, K), #Type{}#Type.K).
-define(AUTH_METRICS, ?METRICS(auth_metrics)).
-define(AUTH_METRICS(K), ?METRICS(auth_metrics, K)).
-define(ACL_METRICS, ?METRICS(acl_metrics)).
-define(ACL_METRICS(K), ?METRICS(acl_metrics, K)).
-type(acl_record() :: {acl_target(), emqx_topic:topic(), action(), access(), created_at()}).

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -17,53 +17,46 @@
-module(emqx_acl_mnesia).
-include("emqx_auth_mnesia.hrl").
-include_lib("stdlib/include/ms_transform.hrl").
-define(TABLE, emqx_acl).
-include_lib("emqx/include/logger.hrl").
%% ACL Callbacks
-export([ init/0
, register_metrics/0
, check_acl/5
, description/0
]).
init() ->
ok = ekka_mnesia:create_table(emqx_acl, [
{type, bag},
{disc_copies, [node()]},
{attributes, record_info(fields, emqx_acl)},
{storage_properties, [{ets, [{read_concurrency, true}]}]}]),
ok = ekka_mnesia:copy_table(emqx_acl, disc_copies).
-spec(register_metrics() -> ok).
register_metrics() ->
lists:foreach(fun emqx_metrics:ensure/1, ?ACL_METRICS).
ok = emqx_acl_mnesia_db:create_table(),
ok = emqx_acl_mnesia_db:create_table2().
check_acl(ClientInfo = #{ clientid := Clientid }, PubSub, Topic, _NoMatchAction, _Params) ->
Username = maps:get(username, ClientInfo, undefined),
Acls = case Username of
undefined ->
emqx_acl_mnesia_cli:lookup_acl({clientid, Clientid}) ++
emqx_acl_mnesia_cli:lookup_acl(all);
emqx_acl_mnesia_db:lookup_acl({clientid, Clientid}) ++
emqx_acl_mnesia_db:lookup_acl(all);
_ ->
emqx_acl_mnesia_cli:lookup_acl({clientid, Clientid}) ++
emqx_acl_mnesia_cli:lookup_acl({username, Username}) ++
emqx_acl_mnesia_cli:lookup_acl(all)
emqx_acl_mnesia_db:lookup_acl({clientid, Clientid}) ++
emqx_acl_mnesia_db:lookup_acl({username, Username}) ++
emqx_acl_mnesia_db:lookup_acl(all)
end,
case match(ClientInfo, PubSub, Topic, Acls) of
allow ->
emqx_metrics:inc(?ACL_METRICS(allow)),
?LOG_SENSITIVE(debug,
"[Mnesia] Allow Topic: ~p, Action: ~p for Client: ~p",
[Topic, PubSub, ClientInfo]),
{stop, allow};
deny ->
emqx_metrics:inc(?ACL_METRICS(deny)),
?LOG_SENSITIVE(debug,
"[Mnesia] Deny Topic: ~p, Action: ~p for Client: ~p",
[Topic, PubSub, ClientInfo]),
{stop, deny};
_ ->
emqx_metrics:inc(?ACL_METRICS(ignore)),
ok
?LOG_SENSITIVE(debug,
"[Mnesia] ACL ignored, Topic: ~p, Action: ~p for Client: ~p",
[Topic, PubSub, ClientInfo])
end.
description() -> "Acl with Mnesia".
@ -83,7 +76,6 @@ match(ClientInfo, PubSub, Topic, [ {_, ACLTopic, Action, Access, _} | Acls]) ->
match_topic(ClientInfo, Topic, ACLTopic) when is_binary(Topic) ->
emqx_topic:match(Topic, feed_var(ClientInfo, ACLTopic)).
match_actions(_, pubsub) -> true;
match_actions(subscribe, sub) -> true;
match_actions(publish, pub) -> true;
match_actions(_, _) -> false.

View File

@ -1,5 +1,5 @@
%c%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -16,8 +16,6 @@
-module(emqx_acl_mnesia_api).
-include("emqx_auth_mnesia.hrl").
-include_lib("stdlib/include/ms_transform.hrl").
-import(proplists, [ get_value/2
@ -98,27 +96,29 @@
, delete/2
]).
-define(CLIENTID_SCHEMA, [{<<"clientid">>, binary}, {<<"_like_clientid">>, binary}] ++ ?COMMON_SCHEMA).
-define(USERNAME_SCHEMA, [{<<"username">>, binary}, {<<"_like_username">>, binary}] ++ ?COMMON_SCHEMA).
-define(COMMON_SCHEMA, [{<<"topic">>, binary}, {<<"action">>, atom}, {<<"access">>, atom}]).
list_clientid(_Bindings, Params) ->
MatchSpec = ets:fun2ms(
fun({emqx_acl, {{clientid, Clientid}, Topic}, Action, Access, CreatedAt}) -> {{clientid,Clientid}, Topic, Action,Access, CreatedAt} end),
return({ok, emqx_auth_mnesia_api:paginate(emqx_acl, MatchSpec, Params, fun emqx_acl_mnesia_cli:comparing/2, fun format/1)}).
{_, Params1 = {_Qs, _Fuzzy}} = emqx_mgmt_api:params2qs(Params, ?CLIENTID_SCHEMA),
Table = emqx_acl_mnesia_db:login_acl_table(clientid, Params1),
return({ok, paginate_qh(Table, count(Table), Params, fun emqx_acl_mnesia_db:comparing/2, fun format/1)}).
list_username(_Bindings, Params) ->
MatchSpec = ets:fun2ms(
fun({emqx_acl, {{username, Username}, Topic}, Action, Access, CreatedAt}) -> {{username, Username}, Topic, Action,Access, CreatedAt} end),
return({ok, emqx_auth_mnesia_api:paginate(emqx_acl, MatchSpec, Params, fun emqx_acl_mnesia_cli:comparing/2, fun format/1)}).
{_, Params1 = {_Qs, _Fuzzy}} = emqx_mgmt_api:params2qs(Params, ?USERNAME_SCHEMA),
Table = emqx_acl_mnesia_db:login_acl_table(username, Params1),
return({ok, paginate_qh(Table, count(Table), Params, fun emqx_acl_mnesia_db:comparing/2, fun format/1)}).
list_all(_Bindings, Params) ->
MatchSpec = ets:fun2ms(
fun({emqx_acl, {all, Topic}, Action, Access, CreatedAt}) -> {all, Topic, Action,Access, CreatedAt}end
),
return({ok, emqx_auth_mnesia_api:paginate(emqx_acl, MatchSpec, Params, fun emqx_acl_mnesia_cli:comparing/2, fun format/1)}).
{_, Params1 = {_Qs, _Fuzzy}} = emqx_mgmt_api:params2qs(Params, ?COMMON_SCHEMA),
Table = emqx_acl_mnesia_db:login_acl_table(all, Params1),
return({ok, paginate_qh(Table, count(Table), Params, fun emqx_acl_mnesia_db:comparing/2, fun format/1)}).
lookup(#{clientid := Clientid}, _Params) ->
return({ok, format(emqx_acl_mnesia_cli:lookup_acl({clientid, urldecode(Clientid)}))});
return({ok, format(emqx_acl_mnesia_db:lookup_acl({clientid, urldecode(Clientid)}))});
lookup(#{username := Username}, _Params) ->
return({ok, format(emqx_acl_mnesia_cli:lookup_acl({username, urldecode(Username)}))}).
return({ok, format(emqx_acl_mnesia_db:lookup_acl({username, urldecode(Username)}))}).
add(_Bindings, Params) ->
[ P | _] = Params,
@ -144,15 +144,15 @@ do_add(Params) ->
Username = get_value(<<"username">>, Params, undefined),
Login = case {Clientid, Username} of
{undefined, undefined} -> all;
{_, undefined} -> {clientid, urldecode(Clientid)};
{undefined, _} -> {username, urldecode(Username)}
{_, undefined} -> {clientid, Clientid};
{undefined, _} -> {username, Username}
end,
Topic = urldecode(get_value(<<"topic">>, Params)),
Action = urldecode(get_value(<<"action">>, Params)),
Access = urldecode(get_value(<<"access">>, Params)),
Topic = get_value(<<"topic">>, Params),
Action = get_value(<<"action">>, Params),
Access = get_value(<<"access">>, Params),
Re = case validate([login, topic, action, access], [Login, Topic, Action, Access]) of
ok ->
emqx_acl_mnesia_cli:add_acl(Login, Topic, erlang:binary_to_atom(Action, utf8), erlang:binary_to_atom(Access, utf8));
emqx_acl_mnesia_db:add_acl(Login, Topic, erlang:binary_to_atom(Action, utf8), erlang:binary_to_atom(Access, utf8));
Err -> Err
end,
maps:merge(#{topic => Topic,
@ -165,15 +165,23 @@ do_add(Params) ->
end).
delete(#{clientid := Clientid, topic := Topic}, _) ->
return(emqx_acl_mnesia_cli:remove_acl({clientid, urldecode(Clientid)}, urldecode(Topic)));
return(emqx_acl_mnesia_db:remove_acl({clientid, urldecode(Clientid)}, urldecode(Topic)));
delete(#{username := Username, topic := Topic}, _) ->
return(emqx_acl_mnesia_cli:remove_acl({username, urldecode(Username)}, urldecode(Topic)));
return(emqx_acl_mnesia_db:remove_acl({username, urldecode(Username)}, urldecode(Topic)));
delete(#{topic := Topic}, _) ->
return(emqx_acl_mnesia_cli:remove_acl(all, urldecode(Topic))).
return(emqx_acl_mnesia_db:remove_acl(all, urldecode(Topic))).
%%------------------------------------------------------------------------------
%% Interval Funcs
%%------------------------------------------------------------------------------
count(QH) ->
Count = qlc:fold(fun(_, Sum) -> Sum + 1 end, 0, QH),
case is_integer(Count) of
true -> Count;
false -> 0
end.
format({{clientid, Clientid}, Topic, Action, Access, _CreatedAt}) ->
#{clientid => Clientid, topic => Topic, action => Action, access => Access};
format({{username, Username}, Topic, Action, Access, _CreatedAt}) ->
@ -224,3 +232,27 @@ format_msg(Message) when is_tuple(Message) ->
urldecode(S) ->
emqx_http_lib:uri_decode(S).
paginate_qh(Qh, Count, Params, ComparingFun, RowFun) ->
Page = page(Params),
Limit = limit(Params),
Cursor = qlc:cursor(Qh),
case Page > 1 of
true ->
_ = qlc:next_answers(Cursor, (Page - 1) * Limit),
ok;
false -> ok
end,
Rows = qlc:next_answers(Cursor, Limit),
qlc:delete_cursor(Cursor),
#{meta => #{page => Page, limit => Limit, count => Count},
data => [RowFun(Row) || Row <- lists:sort(ComparingFun, Rows)]}.
page(Params) ->
binary_to_integer(proplists:get_value(<<"_page">>, Params, <<"1">>)).
limit(Params) ->
case proplists:get_value(<<"_limit">>, Params) of
undefined -> 50;
Size -> binary_to_integer(Size)
end.

View File

@ -1,5 +1,5 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2020-2021 EMQ Technologies Co., Ltd. All Rights Reserved.
%% Copyright (c) 2020-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@ -16,110 +16,28 @@
-module(emqx_acl_mnesia_cli).
-include("emqx_auth_mnesia.hrl").
-include_lib("emqx/include/logger.hrl").
-include_lib("stdlib/include/ms_transform.hrl").
-define(TABLE, emqx_acl).
%% Acl APIs
-export([ add_acl/4
, lookup_acl/1
, all_acls/0
, all_acls/1
, remove_acl/2
]).
-export([cli/1]).
-export([comparing/2]).
%%--------------------------------------------------------------------
%% Acl API
%%--------------------------------------------------------------------
%% @doc Add Acls
-spec(add_acl(login() | all, emqx_topic:topic(), pub | sub | pubsub, allow | deny) ->
ok | {error, any()}).
add_acl(Login, Topic, Action, Access) ->
Filter = {Login, Topic},
Acl = #?TABLE{
filter = Filter,
action = Action,
access = Access,
created_at = erlang:system_time(millisecond)
},
ret(mnesia:transaction(
fun() ->
OldRecords = mnesia:wread({?TABLE, Filter}),
case Action of
pubsub ->
update_permission(pub, Acl, OldRecords),
update_permission(sub, Acl, OldRecords);
_ ->
update_permission(Action, Acl, OldRecords)
end
end)).
%% @doc Lookup acl by login
-spec(lookup_acl(login() | all) -> list()).
lookup_acl(undefined) -> [];
lookup_acl(Login) ->
MatchSpec = ets:fun2ms(fun({?TABLE, {Filter, ACLTopic}, Action, Access, CreatedAt})
when Filter =:= Login ->
{Filter, ACLTopic, Action, Access, CreatedAt}
end),
lists:sort(fun comparing/2, ets:select(?TABLE, MatchSpec)).
%% @doc Remove acl
-spec(remove_acl(login() | all, emqx_topic:topic()) -> ok | {error, any()}).
remove_acl(Login, Topic) ->
ret(mnesia:transaction(fun mnesia:delete/1, [{?TABLE, {Login, Topic}}])).
%% @doc All logins
-spec(all_acls() -> list()).
all_acls() ->
all_acls(clientid) ++
all_acls(username) ++
all_acls(all).
all_acls(clientid) ->
MatchSpec = ets:fun2ms(
fun({?TABLE, {{clientid, Clientid}, Topic}, Action, Access, CreatedAt}) ->
{{clientid, Clientid}, Topic, Action, Access, CreatedAt}
end),
lists:sort(fun comparing/2, ets:select(?TABLE, MatchSpec));
all_acls(username) ->
MatchSpec = ets:fun2ms(
fun({?TABLE, {{username, Username}, Topic}, Action, Access, CreatedAt}) ->
{{username, Username}, Topic, Action, Access, CreatedAt}
end),
lists:sort(fun comparing/2, ets:select(?TABLE, MatchSpec));
all_acls(all) ->
MatchSpec = ets:fun2ms(
fun({?TABLE, {all, Topic}, Action, Access, CreatedAt}) ->
{all, Topic, Action, Access, CreatedAt}
end
),
lists:sort(fun comparing/2, ets:select(?TABLE, MatchSpec)).
%%--------------------------------------------------------------------
%% ACL Cli
%%--------------------------------------------------------------------
cli(["list"]) ->
[print_acl(Acl) || Acl <- all_acls()];
[print_acl(Acl) || Acl <- emqx_acl_mnesia_db:all_acls()];
cli(["list", "clientid"]) ->
[print_acl(Acl) || Acl <- all_acls(clientid)];
[print_acl(Acl) || Acl <- emqx_acl_mnesia_db:all_acls(clientid)];
cli(["list", "username"]) ->
[print_acl(Acl) || Acl <- all_acls(username)];
[print_acl(Acl) || Acl <- emqx_acl_mnesia_db:all_acls(username)];
cli(["list", "_all"]) ->
[print_acl(Acl) || Acl <- all_acls(all)];
[print_acl(Acl) || Acl <- emqx_acl_mnesia_db:all_acls(all)];
cli(["add", "clientid", Clientid, Topic, Action, Access]) ->
case validate(action, Action) andalso validate(access, Access) of
true ->
case add_acl(
case emqx_acl_mnesia_db:add_acl(
{clientid, iolist_to_binary(Clientid)},
iolist_to_binary(Topic),
list_to_existing_atom(Action),
@ -135,7 +53,7 @@ cli(["add", "clientid", Clientid, Topic, Action, Access]) ->
cli(["add", "username", Username, Topic, Action, Access]) ->
case validate(action, Action) andalso validate(access, Access) of
true ->
case add_acl(
case emqx_acl_mnesia_db:add_acl(
{username, iolist_to_binary(Username)},
iolist_to_binary(Topic),
list_to_existing_atom(Action),
@ -151,7 +69,7 @@ cli(["add", "username", Username, Topic, Action, Access]) ->
cli(["add", "_all", Topic, Action, Access]) ->
case validate(action, Action) andalso validate(access, Access) of
true ->
case add_acl(
case emqx_acl_mnesia_db:add_acl(
all,
iolist_to_binary(Topic),
list_to_existing_atom(Action),
@ -165,16 +83,16 @@ cli(["add", "_all", Topic, Action, Access]) ->
end;
cli(["show", "clientid", Clientid]) ->
[print_acl(Acl) || Acl <- lookup_acl({clientid, iolist_to_binary(Clientid)})];
[print_acl(Acl) || Acl <- emqx_acl_mnesia_db:lookup_acl({clientid, iolist_to_binary(Clientid)})];
cli(["show", "username", Username]) ->
[print_acl(Acl) || Acl <- lookup_acl({username, iolist_to_binary(Username)})];
[print_acl(Acl) || Acl <- emqx_acl_mnesia_db:lookup_acl({username, iolist_to_binary(Username)})];
cli(["del", "clientid", Clientid, Topic])->
cli(["delete", "clientid", Clientid, Topic]);
cli(["delete", "clientid", Clientid, Topic])->
case remove_acl({clientid, iolist_to_binary(Clientid)}, iolist_to_binary(Topic)) of
case emqx_acl_mnesia_db:remove_acl({clientid, iolist_to_binary(Clientid)}, iolist_to_binary(Topic)) of
ok -> emqx_ctl:print("ok~n");
{error, Reason} -> emqx_ctl:print("Error: ~p~n", [Reason])
end;
@ -183,7 +101,7 @@ cli(["del", "username", Username, Topic])->
cli(["delete", "username", Username, Topic]);
cli(["delete", "username", Username, Topic])->
case remove_acl({username, iolist_to_binary(Username)}, iolist_to_binary(Topic)) of
case emqx_acl_mnesia_db:remove_acl({username, iolist_to_binary(Username)}, iolist_to_binary(Topic)) of
ok -> emqx_ctl:print("ok~n");
{error, Reason} -> emqx_ctl:print("Error: ~p~n", [Reason])
end;
@ -192,7 +110,7 @@ cli(["del", "_all", Topic])->
cli(["delete", "_all", Topic]);
cli(["delete", "_all", Topic])->
case remove_acl(all, iolist_to_binary(Topic)) of
case emqx_acl_mnesia_db:remove_acl(all, iolist_to_binary(Topic)) of
ok -> emqx_ctl:print("ok~n");
{error, Reason} -> emqx_ctl:print("Error: ~p~n", [Reason])
end;
@ -201,10 +119,11 @@ cli(_) ->
emqx_ctl:usage([ {"acl list clientid", "List clientid acls"}
, {"acl list username", "List username acls"}
, {"acl list _all", "List $all acls"}
, {"acl list ", "List all acls"}
, {"acl show clientid <Clientid>", "Lookup clientid acl detail"}
, {"acl show username <Username>", "Lookup username acl detail"}
, {"acl aad clientid <Clientid> <Topic> <Action> <Access>", "Add clientid acl"}
, {"acl add Username <Username> <Topic> <Action> <Access>", "Add username acl"}
, {"acl add clientid <Clientid> <Topic> <Action> <Access>", "Add clientid acl"}
, {"acl add username <Username> <Topic> <Action> <Access>", "Add username acl"}
, {"acl add _all <Topic> <Action> <Access>", "Add $all acl"}
, {"acl delete clientid <Clientid> <Topic>", "Delete clientid acl"}
, {"acl delete username <Username> <Topic>", "Delete username acl"}
@ -215,13 +134,6 @@ cli(_) ->
%% Internal functions
%%--------------------------------------------------------------------
comparing({_, _, _, _, CreatedAt1},
{_, _, _, _, CreatedAt2}) ->
CreatedAt1 >= CreatedAt2.
ret({atomic, ok}) -> ok;
ret({aborted, Error}) -> {error, Error}.
validate(action, "pub") -> true;
validate(action, "sub") -> true;
validate(action, "pubsub") -> true;
@ -244,27 +156,3 @@ print_acl({all, Topic, Action, Access, _}) ->
"Acl($all topic = ~p action = ~p access = ~p)~n",
[Topic, Action, Access]
).
update_permission(Action, Acl0, OldRecords) ->
Acl = Acl0 #?TABLE{action = Action},
maybe_delete_shadowed_records(Action, OldRecords),
mnesia:write(Acl).
maybe_delete_shadowed_records(_, []) ->
ok;
maybe_delete_shadowed_records(Action1, [Rec = #emqx_acl{action = Action2} | Rest]) ->
if Action1 =:= Action2 ->
ok = mnesia:delete_object(Rec);
Action2 =:= pubsub ->
%% Perform migration from the old data format on the
%% fly. This is needed only for the enterprise version,
%% delete this branch on 5.0
mnesia:delete_object(Rec),
mnesia:write(Rec#?TABLE{action = other_action(Action1)});
true ->
ok
end,
maybe_delete_shadowed_records(Action1, Rest).
other_action(pub) -> sub;
other_action(sub) -> pub.

Some files were not shown because too many files have changed in this diff Show More