Commit Graph

1459 Commits

Author SHA1 Message Date
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
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
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 5b14d7f709 test(mqtt_sn): improve test coverage of `emqx_sn_gateway` 2022-09-26 16:37:33 +08:00
JianBo He c05ce82933 refactor(psk): create the ets table in supervisor process 2022-09-23 11:16:31 +08:00
Thales Macedo Garitezi f94c5ee40a feat(auth_mongo): use `with_timeout` for `query` 2022-09-22 11:28:59 -03: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
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 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
Zaiming (Stone) Shi e6603548d7 chore: generate appups after bumped new version 2022-09-17 18:50:28 +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
JianBo He 89ed4a350f chore: avoid generating crash logs for hook execution 2022-09-16 17:53:49 +08: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 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
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
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 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
Zaiming (Stone) Shi 2c54190479 fix: revert 'accepted' state of exproto plugin 2022-09-09 12:27:02 +02: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 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
firest d5494897c7 fix(jwt): make jwt support float timestamp claims 2022-09-06 11:51:39 +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
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 6f28e0eb83 chore: update appup files 2022-08-31 08:07:42 +02:00
zhongwencool e4992b8f59 chore: update mnesia_acl appup.src 2022-08-30 15:41:23 +08:00
zhongwencool 78ec03f23b chore: add emqx_ctl acl list to show all acls 2022-08-30 15:03:21 +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
Thales Macedo Garitezi 977ac04d24 chore: fix dialyzer errors 2022-08-26 16:09:39 -03: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
JianBo He efdde6e107 test(exproto): fix timeout cases 2022-08-19 18:13:59 +08:00
JianBo He f4ad7acd06 chore: update appup.src 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 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
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
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
zhongwencool a583c221f0 fix: list_listener crash with invaild json 2022-08-17 23:12:51 +08:00
Xinyu Liu 88cf427ecc
Merge branch 'main-v4.3' into fix_sql_compare 2022-08-17 18:24:03 +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
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
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 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
zhongwencool e6a98524b5 chore: improve retainer ct init between ce and ee 2022-08-15 09:42:21 +08:00
Ilya Averyanov a19fbe214f feat(node_rebalance): implement node evacuation and rebalancing 2022-08-13 11:32:14 +03: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 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 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 25228ed248 test: fix compile warning 2022-08-09 09:37:05 +08:00
zhongwencool 4869c94e97 chore: replace / with _ in match_spec 2022-08-08 10:25:01 +08: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 616a2235f2 fix(lwm2m): improve error logging for bad lwm2m requests 2022-08-04 19:14:53 +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
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
Zaiming (Stone) Shi 744af708f1 chore: update appup files for 4.3.18 2022-08-02 15:58:04 +02: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
zhongwencool 91a7022e83 fix: duplicate rule when query by page 2022-07-26 11:13:29 +08:00
Ilya Averyanov afbb3f295b fix(lua_hooks): fix on_message_publish lua hook 2022-07-21 13:52:52 +03:00
Shawn 691407f9fd fix: add type binary_file to emqx_rule_validator 2022-07-20 11:16:44 +08:00