Commit Graph

12883 Commits

Author SHA1 Message Date
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
Erik Timan 0242d5f360 test: rename return_body to return_all in emqx_mgmt api test util 2022-12-12 13:29:11 +01:00
Erik Timan d22756d99e chore: update changes 2022-12-12 13:29:08 +01:00
Erik Timan 8009f0a3a8 test: api returns for lwm2m client posts
Add test coverage for HTTP 204 returns from lwm2m client API
posts. This includes a small refactoring of the request functionality
in emqx_mgmt_api_test_util.
2022-12-12 13:28:24 +01:00
Erik Timan a8c9d02871 fix(emqx_gateway): return 204 for lwm2m client posts
Change the return for lwm2m client API posts from 200 to 204 since
they contain no content.
2022-12-12 13:28:24 +01:00
Stefan Strigler 6b22a074f0 refactor: move `/mqtt/sys_topics` to generic `/configs/sys_topics` 2022-12-12 13:25:42 +01:00
Rory faafeba2cd
Merge pull request #9528 from Rory-Z/release-50
chore: helm chart support externalTrafficPolicy
2022-12-12 19:17:24 +08:00
Ivan Dyachkov 9f83c54e21 ci: update short description on docker hub page for emqx/emqx 2022-12-12 11:35:27 +01:00
Ivan Dyachkov a5624ebd30
Merge pull request #9522 from id/docs-update-docker-readme
docs: update docker readme
2022-12-12 11:16:23 +01:00
Ivan Dyachkov d8cc05ffc2
Merge pull request #9524 from id/ci-fix-logs-artefact-name
ci: fix logs artefact name
2022-12-12 10:09:14 +01:00
Rory Z b3aa3ac360 chore: helm chart support externalTrafficPolicy
Fix https://github.com/emqx/emqx/issues/9515
2022-12-12 16:47:34 +08:00
Zaiming (Stone) Shi c2eabfe5f7
Merge pull request #9523 from qzhuyan/fix/william/bridges-ingress-and-egress
Fix/william/bridges ingress and egress
2022-12-12 09:36:08 +01:00
Zaiming (Stone) Shi 622ac68bfa
Merge pull request #9502 from emqx/1207-fix-emqx_schema-handshake_timeout
fix(emqx_schema): handshake_timeout is common for all listeners
2022-12-12 09:14:55 +01:00
Ivan Dyachkov 926fd6e0b3 docs: automatically update readme for emqx/emqx image on docker hub 2022-12-12 09:13:36 +01:00
Zaiming (Stone) Shi 61da68ff40 fix(emqx_schema): handshake_timeout is common for all listeners 2022-12-09 16:47:19 +01:00
Ivan Dyachkov 93789fb872 ci: fix logs artefact name 2022-12-09 16:13:53 +01:00
William Yang 36c37cc78c chore: update release notes 2022-12-09 15:48:42 +01:00
Ivan Dyachkov f16513794c docs: update docker readme 2022-12-09 15:39:48 +01:00