Commit Graph

12600 Commits

Author SHA1 Message Date
Zaiming (Stone) Shi b5b7d92aeb build: if uname -m prints arm64, we use arm64 (instead of just arm) 2022-12-14 23:17:41 +01:00
Zaiming (Stone) Shi f704c4c96b ci: no need to set python2 for yum for el8 2022-12-14 22:50:07 +01:00
Zaiming (Stone) Shi 9e3da5b661 chore: bump app versions 2022-12-14 20:07:41 +01:00
Zaiming (Stone) Shi 56066a03b5 Merge remote-tracking branch 'origin/release-50' into 1214-sync-master-upstreams 2022-12-14 20:04:20 +01:00
Zaiming (Stone) Shi 82db73c3f7 chore: bump version to v5.0.12 2022-12-14 20:02:42 +01:00
Zaiming (Stone) Shi 586b06d8eb docs: update change log, record fix with the right PR 2022-12-14 20:01:17 +01:00
Zaiming (Stone) Shi 74ce4ec606 fix(bin/emqx): typo in bin/emqx usage info 2022-12-14 20:01:17 +01:00
Ivan Dyachkov 3f058d76b6
Merge pull request #9552 from id/chore-fix-distro-detection-for-amzn2
chore: fix distro detection for amazon linux 2
2022-12-14 19:59:27 +01:00
Zaiming (Stone) Shi 3705ff7a9e
Merge pull request #9547 from emqx/1214-upgrade-to-hocon-0.32.0
1214 upgrade to hocon 0.32.0
2022-12-14 19:10:52 +01:00
Ivan Dyachkov d8b1809cfc chore: fix distro detection for amazon linux 2 2022-12-14 19:09:14 +01:00
Zaiming (Stone) Shi 90326f895e
Merge pull request #9551 from zmstone/1214-remove-unnecessary-test-matrix
ci: no need to run ct with static profile matrix
2022-12-14 18:19:22 +01:00
Zaiming (Stone) Shi 416990bd8f ci: no need to run ct with static profile matrix 2022-12-14 16:42:44 +01:00
Zaiming (Stone) Shi 7137a422df refactor(emqx_authn): make error messages more readable 2022-12-14 15:53:42 +01:00
Zaiming (Stone) Shi abef881a73 refactor(config): no need to explicitly remove env metadata
after upgraded to honcon 0.32.0, the env meta is removed
by default.
2022-12-14 15:53:42 +01:00
Zaiming (Stone) Shi 34f7fff97d chore: pin hocon 0.32.0 2022-12-14 15:53:42 +01:00
Zaiming (Stone) Shi 2d7099e3ae refactor(emqx_bridge_resource): rename a variable 2022-12-14 15:53:42 +01:00
Zaiming (Stone) Shi 42c58e2a91 Merge remote-tracking branch 'origin/release-50' into 1214-sync-master-upstreams 2022-12-14 15:29:13 +01:00
Zaiming (Stone) Shi d2cc7d3258
Merge pull request #9549 from zmstone/1214-chore-update-erl-shell-prompt
refactor: change ce | ee to v | prefix for shell prompt
2022-12-14 14:59:37 +01:00
Ivan Dyachkov a3a640d777
Merge pull request #9530 from id/ci-update-docker-hub-short-description
ci: update short description on docker hub page for emqx/emqx
2022-12-14 14:55:17 +01:00
Thales Macedo Garitezi f827062f0b
Merge pull request #9449 from thalesmg/gcp-pubsub-ee50
feat(gcp_pubsub): implement GCP PubSub bridge (ee5.0)
2022-12-14 10:31:12 -03:00
Zaiming (Stone) Shi 0412826dd5 refactor: change ce | ee to v | prefix for shell prompt
reason: 'ce' (Community Edition) is only for internal use,
when it comes to user/customer facing descriptions,
we should use Opensource edition and Enterprise edition.

Similary, for user/customer facing shell prompt,
use `v` for Opensource edition and `e` for Enterprise
2022-12-14 13:05:44 +01:00
Stefan Strigler 948d417085
Merge pull request #9533 from sstrigler/EMQX-8373-5-0-refactor-put-users-username-change-pwd
refactor: use POST not PUT for `/users/{name}/change_pwd`
2022-12-13 15:41:32 +01:00
Zaiming (Stone) Shi ff429fe4e5
Merge pull request #9537 from id/ci-build-amzn2-package-50
build amzn2 packages
2022-12-13 14:33:12 +01:00
Rory 922ba1772d
Merge pull request #9536 from Rory-Z/release-50
fix(helm): chart using incorrect secret values with custom credentials
2022-12-13 19:51:59 +08:00
Stefan Strigler 7bdb029745 refactor: use POST not PUT for `/users/{name}/change_pwd` 2022-12-13 11:08:54 +01:00
Zaiming (Stone) Shi d9f39873e1
docs: translate change log in changes/v5.0.12-zh.md 2022-12-13 09:23:57 +01:00
Ivan Dyachkov 3b84dc5a31 docs: update changelog 2022-12-13 09:12:07 +01:00
Ivan Dyachkov 2dfaf9c449 ci: keep building el7 in slim packages 2022-12-13 09:05:18 +01:00
Ivan Dyachkov 4f0cf167ec chore: switch to python2 to use yum in tests 2022-12-13 09:04:57 +01:00
Ivan Dyachkov 3013b982cc ci: build amzn2 package
also
- upgrade emqx-builder to 5.0.24
- use amzn2 instead of el8 by default
- cross-cover emqx and emqx-enterprise in slim packages
2022-12-13 09:04:45 +01:00
Rory Z 5e76183901 fix(helm): chart using incorrect secret values with custom credentials 2022-12-13 10:24:27 +08:00
Zaiming (Stone) Shi 068e1c7e92 docs: update release note for authn env override fix 2022-12-12 22:52:11 +01:00
Thales Macedo Garitezi 2932aceaf9 refactor: rename and move `emqx_ee_bridge_gcp_pubsub_resource` to `emqx_ee_connector_gcp_pubsub` 2022-12-12 17:18:19 -03:00
Thales Macedo Garitezi 464d0a5057 refactor(test): use a linked janitor for test teardown 2022-12-12 17:18:19 -03:00
Thales Macedo Garitezi b66d2904be docs: improve descriptions
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-12-12 17:18:19 -03:00
Thales Macedo Garitezi b9bc82f87a feat(gcp_pubsub): add `local_topic` config
Given the implicit convention that an egress bridge containing the
`local_topic` config will forward messages without the need for a rule
action, this was added to avoid needing a rule action.
2022-12-12 17:18:19 -03:00
Thales Macedo Garitezi ac048dbafa docs(gcp_pubsub): describe where to get credentials 2022-12-12 17:18:19 -03:00
Thales Macedo Garitezi a095867358 test(refactor): add ids to namespace `on_exit` callbacks 2022-12-12 17:18:19 -03:00
Thales Macedo Garitezi 697b3ecf2d docs: improve descriptions
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-12-12 17:18:19 -03:00
Thales Macedo Garitezi 1cd91a24e9 feat(gcp_pubsub): implement GCP PubSub bridge (ee5.0) 2022-12-12 17:18:19 -03:00
Thales Macedo Garitezi 82be9d878d test(flaky): avoid inter-suite flakiness 2022-12-12 17:18:19 -03:00
Thales Macedo Garitezi fffce9316c test(fix): avoid trying to connect to system_monitor db in tests
When `system_monitor`'s application is loaded, it sets a default
hostname:

```erlang
1> application:get_env(system_monitor, db_hostname).
undefined
2> application:load(system_monitor).
ok
3> application:get_env(system_monitor, db_hostname).
{ok,"localhost"}
```

And that makes tests crash when somehow it gets loaded.

By having a semantic `enable` field, we could avoid starting this
application by checking if the hostname is filled or not.

```
=ERROR REPORT==== 1-Dec-2022::13:57:20.855070 ===
** Generic server <0.7646.3> terminating
** Last message in was {command,epgsql_cmd_connect,
                                #{codecs => [],database => "postgres",
                                  host => [],
                                  password =>
                                      #Fun<epgsql_cmd_connect.0.29916615>,
                                  port => 5432,timeout => 5000,
                                  username => "system_monitor"}}
** When Server state == {state,undefined,undefined,<<>>,undefined,on_message,
                               undefined,
                               {[],[]},
                               undefined,undefined,undefined,undefined,[],
                               information_redacted,[],undefined,undefined,
                               undefined,undefined,undefined,#{}}
** Reason for termination ==
** {badarg,
       [{gen_tcp,connect_0,4,[{file,"gen_tcp.erl"},{line,207}]},
        {epgsql_cmd_connect,open_socket,2,
            [{file,
                 "/emqx/_build/default/lib/epgsql/src/commands/epgsql_cmd_connect.erl"},
             {line,94}]},
        {epgsql_cmd_connect,execute,2,
            [{file,
                 "/emqx/_build/default/lib/epgsql/src/commands/epgsql_cmd_connect.erl"},
             {line,54}]},
        {epgsql_sock,command_exec,4,
            [{file,"/emqx/_build/default/lib/epgsql/src/epgsql_sock.erl"},
             {line,338}]},
        {gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,721}]},
        {gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,750}]},
        {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}
** Client system_monitor_pg stacktrace
** [{gen,do_call,4,[{file,"gen.erl"},{line,214}]},
    {gen_server,call,3,[{file,"gen_server.erl"},{line,243}]},
    {epgsql,call_connect,2,
            [{file,"/emqx/_build/default/lib/epgsql/src/epgsql.erl"},
             {line,203}]},
    {system_monitor_pg,connect,0,
                       [{file,"/emqx/_build/default/lib/system_monitor/src/system_monitor_pg.erl"},
                        {line,151}]},
    {system_monitor_pg,initialize,0,
                       [{file,"/emqx/_build/default/lib/system_monitor/src/system_monitor_pg.erl"},
                        {line,142}]},
    {system_monitor_pg,handle_info,2,
                       [{file,"/emqx/_build/default/lib/system_monitor/src/system_monitor_pg.erl"},
                        {line,92}]},
    {gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,695}]},
    {gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,771}]},
    {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]

=CRASH REPORT==== 1-Dec-2022::13:57:20.855697 ===
  crasher:
    initial call: epgsql_sock:init/1
    pid: <0.7646.3>
    registered_name: []
    exception exit: badarg
      in function  gen_tcp:connect_0/4 (gen_tcp.erl, line 207)
      in call from epgsql_cmd_connect:open_socket/2 (/emqx/_build/default/lib/epgsql/src/commands/epgsql_cmd_connect.erl, line 94)
      in call from epgsql_cmd_connect:execute/2 (/emqx/_build/default/lib/epgsql/src/commands/epgsql_cmd_connect.erl, line 54)
      in call from epgsql_sock:command_exec/4 (/emqx/_build/default/lib/epgsql/src/epgsql_sock.erl, line 338)
      in call from gen_server:try_handle_call/4 (gen_server.erl, line 721)
      in call from gen_server:handle_msg/6 (gen_server.erl, line 750)
    ancestors: [system_monitor_pg,system_monitor2_sup,system_monitor_sup,
                  <0.4297.3>]
    message_queue_len: 0
    messages: []
    links: [<0.4303.3>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 1598
    stack_size: 29
    reductions: 734
  neighbours:
```
2022-12-12 17:18:19 -03:00
Thales Macedo Garitezi cdae451a84 ci(fix): ensure directory for i18n output exists
```
Run make eunit
escript: exception error: no match of right hand side value {error,enoent}
  in function  'merge-i18n_escript__escript__1669__814803__620426__2':main/1 (/__w/emqx/emqx/source/scripts/merge-i18n.escript, line 13)
  in call from escript:run/2 (escript.erl, line 750)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1
  in call from init:do_boot/3
make: *** [Makefile:225: conf-segs] Error 127
```
2022-12-12 17:18:19 -03:00
Thales Macedo Garitezi c69022f3c4 test(ci): clean config after test
Trying to fix this error for profile `emqx`:

```
=CRASH REPORT==== 30-Nov-2022::13:25:46.763989 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.9682.1>
    registered_name: []
    exception exit: {bad_return,
                        {{emqx_conf_app,start,[normal,[]]},
                         {emqx_conf_schema,
                             [#{kind => validation_error,path => "bridges",
                                reason => unknown_fields,
                                unknown => <<"influxdb_api_v1">>,
                                unmatched => <<"mqtt,webhook">>}]}}}
      in function  application_master:init/4 (application_master.erl, line 142)
    ancestors: [<0.9681.1>]
    message_queue_len: 1
    messages: [{'EXIT',<0.9683.1>,normal}]
    links: [<0.9681.1>,<0.44.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 610
    stack_size: 29
    reductions: 195
  neighbours:

=INFO REPORT==== 30-Nov-2022::13:25:46.777895 ===
    application: emqx_conf
    exited: {bad_return,
                {{emqx_conf_app,start,[normal,[]]},
                 {emqx_conf_schema,
                     [#{kind => validation_error,path => "bridges",
                        reason => unknown_fields,
                        unknown => <<"influxdb_api_v1">>,
                        unmatched => <<"mqtt,webhook">>}]}}}
    type: temporary

%%% emqx_plugins_SUITE ==> init_per_suite: FAILED
%%% emqx_plugins_SUITE ==> {{failed_to_start_app,emqx_conf,
     {emqx_conf,
         {bad_return,
             {{emqx_conf_app,start,[normal,[]]},
              {emqx_conf_schema,
                  [#{kind => validation_error,path => "bridges",
                     reason => unknown_fields,
                     unknown => <<"influxdb_api_v1">>,
                     unmatched => <<"mqtt,webhook">>}]}}}}},
 [{emqx_common_test_helpers,start_app,4,
      [{file,
           "/__w/emqx/emqx/source/apps/emqx/test/emqx_common_test_helpers.erl"},
       {line,227}]},
  {lists,foreach,2,[{file,"lists.erl"},{line,1342}]},
  {emqx_plugins_SUITE,init_per_suite,1,
      [{file,
           "/__w/emqx/emqx/source/apps/emqx_plugins/test/emqx_plugins_SUITE.erl"},
       {line,34}]},
  {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}]}]}

%%% emqx_plugins_SUITE ==> t_bad_info_json: SKIPPED
%%% emqx_plugins_SUITE ==> {tc_auto_skip,
    {failed,
        {emqx_plugins_SUITE,init_per_suite,
            {'EXIT',
                {{failed_to_start_app,emqx_conf,
                     {emqx_conf,
                         {bad_return,
                             {{emqx_conf_app,start,[normal,[]]},
                              {emqx_conf_schema,
                                  [#{kind => validation_error,
                                     path => "bridges",
                                     reason => unknown_fields,
                                     unknown => <<"influxdb_api_v1">>,
                                     unmatched => <<"mqtt,webhook">>}]}}}}},
                 [{emqx_common_test_helpers,start_app,4,
                      [{file,
                           "/__w/emqx/emqx/source/apps/emqx/test/emqx_common_test_helpers.erl"},
                       {line,227}]},
                  {lists,foreach,2,[{file,"lists.erl"},{line,1342}]},
                  {emqx_plugins_SUITE,init_per_suite,1,
                      [{file,
                           "/__w/emqx/emqx/source/apps/emqx_plugins/test/emqx_plugins_SUITE.erl"},
                       {line,34}]},
                  {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-12-12 17:18:13 -03:00
Thales Macedo Garitezi 34e9056779 refactor: fix typo in variable name
Might confuse people to think it's related to `replayq`.
2022-12-12 17:17:51 -03:00
Zaiming (Stone) Shi f8685e3a58
Merge pull request #9437 from zhongwencool/authn-env-failed
fix: set authentication array from ENV failed
2022-12-12 19:12:27 +01:00
Stefan Strigler 1ddfa92119
Merge pull request #9511 from sstrigler/EMQX-7987-move-mqtt-sys-topics-under-config
refactor: move `/mqtt/sys_topics` to generic `/configs/sys_topics`
2022-12-12 15:02:31 +01:00
Erik Timan 3a31088942
Merge pull request #9480 from olcai/fix-status-code-for-lwm2m-clients-in-api
Fix status code for lwm2m clients in api
2022-12-12 14:20:26 +01:00
Zhongwen Deng e57a1f2c8b fix: set authentication array from ENV failed 2022-12-12 14:18:30 +01:00
Erik Timan 272337cceb chore: update changes 2022-12-12 13:29:11 +01:00