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>
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}]
```
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.
(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}]
```
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.
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.
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