Commit Graph

7986 Commits

Author SHA1 Message Date
Thales Macedo Garitezi cc02b04875
deleteme: test branch 2021-12-29 16:51:23 -03:00
Thales Macedo Garitezi 3fc8d4049f
Merge pull request #6571 from emqx/fix-sticky-shared-sub-conf
fix(config): add missing enum constructors for `shared_subscription_strategy`

Currently, there's [code](048afa6d2d/apps/emqx/src/emqx_shared_sub.erl (L270-L279)) and tests that expect the possibility of
values `sticky`, `hash_topic` and `hash_clientid` in the
`node.shared_subscritpion_strategy` configuration, but the schema enum
does not contain those constructors.

There's also a `hash` constructor expected, but apparently it's just for backwards compatibility (same as `hash_clientid`), so maybe we can skip it in 5.0
2021-12-29 15:08:49 -03:00
Zaiming (Stone) Shi fe338ca904
Merge pull request #6569 from zmstone/add-bsl
Add BSL
2021-12-29 15:53:54 +01:00
Thales Macedo Garitezi 048afa6d2d
fix(config): add missing enum constructors for `shared_subscription_strategy`
Currently, there's code and tests that expect the possibility of a
value `sticky`, `hash_topic` and `hash_clientid` in the
`node.shared_subscritpion_strategy` configuration, but the schema enum
does not contain those constructors.
2021-12-29 10:34:20 -03:00
Zaiming (Stone) Shi 7f49934216 chore: add BSL.txt 2021-12-29 13:35:49 +01:00
Zaiming (Stone) Shi f5049b696a docs: fix a misspell in emqx_mgmt_cli 2021-12-29 13:29:51 +01:00
Thales Macedo Garitezi 3c966d77ca
Merge pull request #6560 from emqx/improve-update-appup-50
chore(update_appup): Improve `update_appup.escript` (5.0)

Port of #6480 .

* Make the script regex-aware

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.

* Do not use `load_module` instructions if `restart_application` is present

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.

* Do not force `.appup.src` 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.

* Insert `load_module`s after `application:stop`, if present

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.

* 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-28 14:58:27 -03:00
Thales Macedo Garitezi ecbb28fedf
Merge pull request #6540 from emqx/fix-bin-vm-args
fix(bin_emqx): remove `vm_args` backup in `install`

The `install_upgrade.escript` depended on being able to retrieve the
`vm_args` argument from `init`, but that options has been removed
recently.  Since this backup was unused, we also remove it here.

Also, the `cuttlefish` script reference is removed, since it is no longer 
present in the release.
2021-12-28 11:27:02 -03:00
Thales Macedo Garitezi 8342b3711d
chore(update_appup): Improve `update_appup.escript` (5.0)
Port of #6480 .

* Make the script regex-aware

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.

* Do not use `load_module` instructions if `restart_application` is present

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.

* Do not force `.appup.src` 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.

* Insert `load_module`s after `application:stop`, if present

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.

* 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-28 10:06:42 -03:00
Ilya Averyanov f8ffb9c021
Merge pull request #6506 from savonarola/test-authz-mnezia
Test HTTP, Mria, File authorization
2021-12-28 15:53:37 +03:00
Thales Macedo Garitezi 5c615e583f
fix(install_upgrade): remove `cuttlefish` reference
This file is not present in the current release anymore.
2021-12-28 09:09:21 -03:00
Thales Macedo Garitezi dd36bef3bb
fix(install_upgrade): remove `vm_args` backup in `install`
The `install_upgrade.escript` depended on being able to retrieve the
`vm_args` argument from `init`, but that options has been removed
recently.  Since this backup was unused, we also remove it here.
2021-12-28 09:07:40 -03:00
Zaiming (Stone) Shi 0f14f73a50
Merge pull request #6552 from zmstone/fix-5.0-portable-shebang
fix: portable shebang
2021-12-28 10:51:15 +01:00
Ilya Averyanov 9363b6110e chore(authz): make test http server more robust 2021-12-28 11:06:52 +03:00
lafirest e48df910d8
Merge pull request #6493 from lafirest/refactor/exhook
refactor(emqx_exhook): refactore exhook and add api module
2021-12-28 14:00:19 +08:00
Zaiming (Stone) Shi 68eb13d478 fix: portable shebang 2021-12-27 15:45:12 +01:00
JianBo He 523b5761b7
Merge pull request #6527 from HJianBo/fix-receive-maximum-50
fix: disconnect the client due to exceed receive-maximum packets
2021-12-27 09:13:24 +08:00
Ilya Averyanov 2bada0bab8 chore(authz): test Mria authz 2021-12-24 16:18:46 +03:00
Ilya Averyanov d75e0104cc chore(authz): test file authz with real files 2021-12-24 16:18:41 +03:00
Ilya Averyanov e0f860d7d9 chore(authz): fix HTTP authz, cover with tests 2021-12-24 16:18:36 +03:00
tigercl 41694b7b34
Merge pull request #6526 from emqx/release-5.0-beta.3
Sync 5.0-beta.3 fixes into master
2021-12-24 13:49:13 +08:00
lafirest 9c9f9886d1
Merge pull request #6534 from lafirest/fix/retain_api
fix(emqx_retainer): use base64 to encode payload in api's result
2021-12-24 10:49:21 +08:00
lafirest d2d50443ce fix(emqx_retainer): use base64 to encode payload in api's result 2021-12-24 10:48:12 +08:00
lafirest 8c42b623c6
Merge pull request #6529 from lafirest/fix/retain_payload
fix(emqx_retainer): use base64 to encode payload in api's result
2021-12-24 10:26:00 +08:00
lafirest b6755d5953 fix(emqx_retainer): use base64 to encode payload in api's result 2021-12-24 10:22:10 +08:00
k32 28a69852dc
Merge pull request #6531 from k32/ekka-0-11-2
chore(ekka): Bump version to 0.11.2
2021-12-23 19:28:19 +01:00
k32 bd31b52e35 chore(ekka): Bump version to 0.11.2 2021-12-23 15:29:35 +01:00
Spycsh 41e373dbc4
Merge pull request #6478 from Spycsh/slog
chore: refactor ?SLOG
2021-12-23 22:21:33 +08:00
lafirest 7c9c7b6a60 refactor(emqx_exhook): refactore exhook and add api module 2021-12-23 17:51:13 +08:00
JianBo He 52502e29c3 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 14:06:11 +08:00
JimMoen 4d7f001bfe
Merge pull request #6517 from JimMoen/update-dashboard
chore(dashboard): update dashboard version
2021-12-23 10:54:29 +08:00
JianBo He 967989075c
Merge pull request #6512 from terry-xiaoyu/fix_rule_api_swagger
Fix rule api swagger
2021-12-23 10:37:53 +08:00
JimMoen e2804ab29d chore(dashboard): update dashboard version, ignore v0.9.0 2021-12-23 09:25:58 +08:00
JimMoen 2130d5ca8e chore(dashboard): update dashboard version 2021-12-23 09:25:58 +08:00
JianBo He b846193556
Merge pull request #6518 from HJianBo/gw-review-r2 2021-12-22 22:10:18 +08:00
k32 5497e01f4c
Merge pull request #6520 from k32/fix-sysmon-warning-spam
fix(system_monitor): Fix warning spam
2021-12-22 13:54:28 +01:00
k32 af023b16c6 fix(system_monitor): Fix warning spam 2021-12-22 11:16:35 +01:00
JianBo He 1bcdbf3a06 chore(gw): make some fields required 2021-12-22 16:49:34 +08:00
JianBo He 6d4aac1600 chore(gw): improve http error messages 2021-12-22 16:49:33 +08:00
JianBo He 3fd9061418 fix(gw): save coap channel info 2021-12-22 16:49:33 +08:00
zhongwencool 2e10a5700c
Merge pull request #6515 from zhongwencool/fix-bann-utf8
fix(banned): create banned with utf8 failed by 500 response
2021-12-22 16:08:34 +08:00
zhongwencool b11a15fa00 fix(banned): create banned with utf8 failed by 500 2021-12-22 14:29:15 +08:00
Shawn cd4227b851 fix(rules): don't show the module name 'emqx_rule_outputs' in outputs 2021-12-22 10:26:22 +08:00
Shawn 9b4b3d2e8c fix(rules): make the 'name' field of POST /rules mandatory 2021-12-22 10:26:22 +08:00
Shawn 5f050b149b fix(rules): the schema for unsubscribe is messing from rule_test API 2021-12-22 10:26:22 +08:00
JimMoen bbe223b4ad
Merge pull request #6501 from JimMoen/fix-telemetry
fix(telemetry): use required fields, rolling distro use PRETTY_NAME
2021-12-22 09:38:54 +08:00
JimMoen 99a5f14301 fix(telemetry): use required fields, rolling distro use PRETTY_NAME 2021-12-21 10:44:54 +08:00
JimMoen 6d2c83af7b
Merge pull request #6495 from JimMoen/fix-dashboard-diagram-time
fix(dashobard): statistical diagram timestamp use UTC time
2021-12-21 09:42:05 +08:00
JimMoen 6f28e103d0 fix(dashobard): statistical diagram timestamp use UTC time 2021-12-20 19:21:19 +08:00
tigercl a9b443ae34
Merge pull request #6491 from tigercl/chore/dashboard-vsn
chore(dashboard): update dashboard version
2021-12-20 15:34:09 +08:00