Merge pull request #9425 from zmstone/1126-chore-merge-release-v43-back-to-main
1126 chore merge release v43 back to main
This commit is contained in:
commit
d166d217ca
|
@ -9,7 +9,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
erl_otp:
|
erl_otp:
|
||||||
- erl23.3.4.9-3
|
- erl23.3.4.18-1
|
||||||
os:
|
os:
|
||||||
- ubuntu20.04
|
- ubuntu20.04
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
# avoid building when syncing to ee repo
|
# avoid building when syncing to ee repo
|
||||||
if: endsWith(github.repository, 'emqx')
|
if: endsWith(github.repository, 'emqx')
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: emqx/build-env:erl23.3.4.9-3-ubuntu20.04
|
container: emqx/build-env:erl23.3.4.18-1-ubuntu20.04
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
profiles: ${{ steps.detect-profiles.outputs.profiles}}
|
profiles: ${{ steps.detect-profiles.outputs.profiles}}
|
||||||
|
@ -58,7 +58,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
|
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
|
||||||
otp:
|
otp:
|
||||||
- 23.3.4.13
|
- 23.3.4.17
|
||||||
exclude:
|
exclude:
|
||||||
- profile: emqx-edge
|
- profile: emqx-edge
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
otp:
|
otp:
|
||||||
- 23.3.4.9-3
|
- 23.3.4.18-1
|
||||||
os:
|
os:
|
||||||
- macos-11
|
- macos-11
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -145,7 +145,7 @@ jobs:
|
||||||
apple_developer_id_bundle_password: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE_PASSWORD }}
|
apple_developer_id_bundle_password: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE_PASSWORD }}
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ env.EMQX_NAME }}-${{ matrix.otp }}
|
name: ${{ env.EMQX_NAME }}
|
||||||
path: _packages/${{ env.EMQX_NAME }}/
|
path: _packages/${{ env.EMQX_NAME }}/
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
|
@ -174,7 +174,7 @@ jobs:
|
||||||
# - raspbian9
|
# - raspbian9
|
||||||
otp_version:
|
otp_version:
|
||||||
#- 23.2.7.2-emqx-3
|
#- 23.2.7.2-emqx-3
|
||||||
- 23.3.4.9-3
|
- 23.3.4.18-1
|
||||||
exclude:
|
exclude:
|
||||||
- os: centos6
|
- os: centos6
|
||||||
arch: arm64
|
arch: arm64
|
||||||
|
@ -330,7 +330,7 @@ jobs:
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
BUILD_FROM=emqx/build-env:erl23.3.4.9-3-alpine
|
BUILD_FROM=emqx/build-env:erl23.3.4.18-1-alpine
|
||||||
RUN_FROM=alpine:3.12
|
RUN_FROM=alpine:3.12
|
||||||
EMQX_NAME=${{ matrix.profile }}
|
EMQX_NAME=${{ matrix.profile }}
|
||||||
file: source/deploy/docker/Dockerfile
|
file: source/deploy/docker/Dockerfile
|
||||||
|
@ -346,7 +346,7 @@ jobs:
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
BUILD_FROM=emqx/build-env:erl23.3.4.9-3-alpine
|
BUILD_FROM=emqx/build-env:erl23.3.4.18-1-alpine
|
||||||
RUN_FROM=alpine:3.12
|
RUN_FROM=alpine:3.12
|
||||||
EMQX_NAME=${{ matrix.profile }}
|
EMQX_NAME=${{ matrix.profile }}
|
||||||
file: source/deploy/docker/Dockerfile.enterprise
|
file: source/deploy/docker/Dockerfile.enterprise
|
||||||
|
|
|
@ -12,10 +12,10 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
otp:
|
otp:
|
||||||
- erl23.3.4.9-3
|
- erl23.3.4.18-1
|
||||||
os:
|
os:
|
||||||
- ubuntu20.04
|
- ubuntu20.04
|
||||||
- centos7
|
- centos8
|
||||||
runs-on:
|
runs-on:
|
||||||
- aws-amd64
|
- aws-amd64
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
|
@ -31,9 +31,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: AutoModality/action-clean@v1
|
- uses: AutoModality/action-clean@v1
|
||||||
# keep using v1 for now as the otp-23 image has an old version git
|
- uses: actions/checkout@v3
|
||||||
# TODO: change to v3 after OTP is upgraded to 23.3.4.18-1
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # clone full git history
|
fetch-depth: 0 # clone full git history
|
||||||
- name: fix-git-unsafe-repository
|
- name: fix-git-unsafe-repository
|
||||||
|
@ -75,7 +73,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
otp:
|
otp:
|
||||||
- 23.3.4.9-3
|
- 23.3.4.18-1
|
||||||
os:
|
os:
|
||||||
- macos-11
|
- macos-11
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
|
@ -5,7 +5,7 @@ on: [pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
check_deps_integrity:
|
check_deps_integrity:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: emqx/build-env:erl23.3.4.9-3-ubuntu20.04
|
container: emqx/build-env:erl23.3.4.18-1-ubuntu20.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
|
@ -7,7 +7,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: emqx/build-env:erl23.3.4.9-3-ubuntu20.04
|
container: emqx/build-env:erl23.3.4.18-1-ubuntu20.04
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
profiles: ${{ steps.detect-profiles.outputs.profiles}}
|
profiles: ${{ steps.detect-profiles.outputs.profiles}}
|
||||||
|
|
|
@ -5,7 +5,7 @@ on: workflow_dispatch
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: emqx/build-env:erl23.3.4.9-3-ubuntu20.04
|
container: emqx/build-env:erl23.3.4.18-1-ubuntu20.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -29,7 +29,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
with:
|
with:
|
||||||
otp-version: "23.3.4.13"
|
otp-version: "23.3.4.17"
|
||||||
- name: build docker
|
- name: build docker
|
||||||
id: build_docker
|
id: build_docker
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
with:
|
with:
|
||||||
otp-version: "23.3.4.9"
|
otp-version: "23.3.4.17"
|
||||||
- name: make docker
|
- name: make docker
|
||||||
run: |
|
run: |
|
||||||
if make emqx-ee --dry-run > /dev/null 2>&1; then
|
if make emqx-ee --dry-run > /dev/null 2>&1; then
|
||||||
|
@ -67,7 +67,7 @@ jobs:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
with:
|
with:
|
||||||
otp-version: "23.3.4.9"
|
otp-version: "23.3.4.17"
|
||||||
- name: prepare
|
- name: prepare
|
||||||
run: |
|
run: |
|
||||||
if make emqx-ee --dry-run > /dev/null 2>&1; then
|
if make emqx-ee --dry-run > /dev/null 2>&1; then
|
||||||
|
@ -154,7 +154,7 @@ jobs:
|
||||||
|
|
||||||
relup_test_plan:
|
relup_test_plan:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: emqx/build-env:erl23.3.4.9-3-ubuntu20.04
|
container: emqx/build-env:erl23.3.4.18-1-ubuntu20.04
|
||||||
outputs:
|
outputs:
|
||||||
profile: ${{ steps.profile-and-versions.outputs.profile }}
|
profile: ${{ steps.profile-and-versions.outputs.profile }}
|
||||||
vsn: ${{ steps.profile-and-versions.outputs.vsn }}
|
vsn: ${{ steps.profile-and-versions.outputs.vsn }}
|
||||||
|
@ -200,7 +200,7 @@ jobs:
|
||||||
relup_test_build:
|
relup_test_build:
|
||||||
needs: relup_test_plan
|
needs: relup_test_plan
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: emqx/build-env:erl23.3.4.9-3-ubuntu20.04
|
container: emqx/build-env:erl23.3.4.18-1-ubuntu20.04
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -235,7 +235,7 @@ jobs:
|
||||||
- relup_test_plan
|
- relup_test_plan
|
||||||
- relup_test_build
|
- relup_test_build
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: emqx/relup-test-env:erl23.2.7.2-emqx-3-ubuntu20.04
|
container: emqx/relup-test-env:erl23.3.4.18-1-ubuntu20.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|
|
@ -12,7 +12,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
runs-on: aws-amd64
|
runs-on: aws-amd64
|
||||||
container: emqx/build-env:erl23.3.4.9-3-ubuntu20.04
|
container: emqx/build-env:erl23.3.4.18-1-ubuntu20.04
|
||||||
outputs:
|
outputs:
|
||||||
fast_ct_apps: ${{ steps.run_find_apps.outputs.fast_ct_apps }}
|
fast_ct_apps: ${{ steps.run_find_apps.outputs.fast_ct_apps }}
|
||||||
docker_ct_apps: ${{ steps.run_find_apps.outputs.docker_ct_apps }}
|
docker_ct_apps: ${{ steps.run_find_apps.outputs.docker_ct_apps }}
|
||||||
|
@ -58,7 +58,7 @@ jobs:
|
||||||
eunit_and_proper:
|
eunit_and_proper:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
runs-on: aws-amd64
|
runs-on: aws-amd64
|
||||||
container: emqx/build-env:erl23.3.4.9-3-ubuntu20.04
|
container: emqx/build-env:erl23.3.4.18-1-ubuntu20.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -86,7 +86,7 @@ jobs:
|
||||||
fast_ct:
|
fast_ct:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
runs-on: ${{ matrix.runs-on }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
container: emqx/build-env:erl23.3.4.9-3-ubuntu20.04
|
container: emqx/build-env:erl23.3.4.18-1-ubuntu20.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -249,7 +249,7 @@ jobs:
|
||||||
- fast_ct
|
- fast_ct
|
||||||
- docker_ct
|
- docker_ct
|
||||||
runs-on: aws-amd64
|
runs-on: aws-amd64
|
||||||
container: emqx/build-env:erl23.3.4.9-3-ubuntu20.04
|
container: emqx/build-env:erl23.3.4.18-1-ubuntu20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: AutoModality/action-clean@v1
|
- uses: AutoModality/action-clean@v1
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_auth_jwt,
|
{application, emqx_auth_jwt,
|
||||||
[{description, "EMQ X Authentication with JWT"},
|
[{description, "EMQ X Authentication with JWT"},
|
||||||
{vsn, "4.3.8"}, % strict semver, bump manually!
|
{vsn, "4.3.9"}, % strict semver, bump manually!
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, [emqx_auth_jwt_sup]},
|
{registered, [emqx_auth_jwt_sup]},
|
||||||
{applications, [kernel,stdlib,jose]},
|
{applications, [kernel,stdlib,jose]},
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
%% -*- mode: erlang -*-
|
%% -*- mode: erlang -*-
|
||||||
%% Unless you know what you are doing, DO NOT edit manually!!
|
%% Unless you know what you are doing, DO NOT edit manually!!
|
||||||
{VSN,
|
{VSN,
|
||||||
[{"4.3.7",
|
[{"4.3.8",[{load_module,emqx_auth_jwt,brutal_purge,soft_purge,[]}]},
|
||||||
|
{"4.3.7",
|
||||||
[{load_module,emqx_auth_jwt_svr,brutal_purge,soft_purge,[]},
|
[{load_module,emqx_auth_jwt_svr,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_auth_jwt,brutal_purge,soft_purge,[]}]},
|
{load_module,emqx_auth_jwt,brutal_purge,soft_purge,[]}]},
|
||||||
{<<"4\\.3\\.[3-6]">>,
|
{<<"4\\.3\\.[3-6]">>,
|
||||||
|
@ -9,7 +10,8 @@
|
||||||
{load_module,emqx_auth_jwt_svr,brutal_purge,soft_purge,[]}]},
|
{load_module,emqx_auth_jwt_svr,brutal_purge,soft_purge,[]}]},
|
||||||
{<<"4\\.3\\.[0-2]">>,[{restart_application,emqx_auth_jwt}]},
|
{<<"4\\.3\\.[0-2]">>,[{restart_application,emqx_auth_jwt}]},
|
||||||
{<<".*">>,[]}],
|
{<<".*">>,[]}],
|
||||||
[{"4.3.7",
|
[{"4.3.8",[{load_module,emqx_auth_jwt,brutal_purge,soft_purge,[]}]},
|
||||||
|
{"4.3.7",
|
||||||
[{load_module,emqx_auth_jwt_svr,brutal_purge,soft_purge,[]},
|
[{load_module,emqx_auth_jwt_svr,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_auth_jwt,brutal_purge,soft_purge,[]}]},
|
{load_module,emqx_auth_jwt,brutal_purge,soft_purge,[]}]},
|
||||||
{<<"4\\.3\\.[3-6]">>,
|
{<<"4\\.3\\.[3-6]">>,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_rule_engine,
|
{application, emqx_rule_engine,
|
||||||
[{description, "EMQ X Rule Engine"},
|
[{description, "EMQ X Rule Engine"},
|
||||||
{vsn, "4.3.17"}, % strict semver, bump manually!
|
{vsn, "4.3.18"}, % strict semver, bump manually!
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, [emqx_rule_engine_sup, emqx_rule_registry]},
|
{registered, [emqx_rule_engine_sup, emqx_rule_registry]},
|
||||||
{applications, [kernel,stdlib,rulesql,getopt]},
|
{applications, [kernel,stdlib,rulesql,getopt]},
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
%% -*- mode: erlang -*-
|
%% -*- mode: erlang -*-
|
||||||
%% Unless you know what you are doing, DO NOT edit manually!!
|
%% Unless you know what you are doing, DO NOT edit manually!!
|
||||||
{VSN,
|
{VSN,
|
||||||
[{"4.3.16",
|
[{"4.3.17",[{load_module,emqx_rule_registry,brutal_purge,soft_purge,[]}]},
|
||||||
|
{"4.3.16",
|
||||||
[{load_module,emqx_rule_registry,brutal_purge,soft_purge,[]},
|
[{load_module,emqx_rule_registry,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_rule_actions,brutal_purge,soft_purge,[]},
|
{load_module,emqx_rule_actions,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_rule_engine_cli,brutal_purge,soft_purge,[]},
|
{load_module,emqx_rule_engine_cli,brutal_purge,soft_purge,[]},
|
||||||
|
@ -314,7 +315,8 @@
|
||||||
{load_module,emqx_rule_monitor,brutal_purge,soft_purge,[]},
|
{load_module,emqx_rule_monitor,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_rule_engine_api,brutal_purge,soft_purge,[]}]},
|
{load_module,emqx_rule_engine_api,brutal_purge,soft_purge,[]}]},
|
||||||
{<<".*">>,[]}],
|
{<<".*">>,[]}],
|
||||||
[{"4.3.16",
|
[{"4.3.17",[{load_module,emqx_rule_registry,brutal_purge,soft_purge,[]}]},
|
||||||
|
{"4.3.16",
|
||||||
[{load_module,emqx_rule_registry,brutal_purge,soft_purge,[]},
|
[{load_module,emqx_rule_registry,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_rule_actions,brutal_purge,soft_purge,[]},
|
{load_module,emqx_rule_actions,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_rule_engine_cli,brutal_purge,soft_purge,[]},
|
{load_module,emqx_rule_engine_cli,brutal_purge,soft_purge,[]},
|
||||||
|
|
|
@ -95,6 +95,9 @@
|
||||||
end
|
end
|
||||||
end()).
|
end()).
|
||||||
|
|
||||||
|
-define(GET_RES_ALIVE_TIMEOUT, 60000).
|
||||||
|
-define(PROBE_RES_PREFIX, "__probe__:").
|
||||||
|
|
||||||
%%------------------------------------------------------------------------------
|
%%------------------------------------------------------------------------------
|
||||||
%% Load resource/action providers from all available applications
|
%% Load resource/action providers from all available applications
|
||||||
%%------------------------------------------------------------------------------
|
%%------------------------------------------------------------------------------
|
||||||
|
@ -363,7 +366,7 @@ test_resource(#{type := Type} = Params) ->
|
||||||
{ok, #resource_type{}} ->
|
{ok, #resource_type{}} ->
|
||||||
%% Resource will be deleted after test.
|
%% Resource will be deleted after test.
|
||||||
%% Use random resource id, ensure test func will not delete the resource in used.
|
%% Use random resource id, ensure test func will not delete the resource in used.
|
||||||
ResId = resource_id(),
|
ResId = probe_resource_id(),
|
||||||
try
|
try
|
||||||
case create_resource(maps:put(id, ResId, Params), no_retry) of
|
case create_resource(maps:put(id, ResId, Params), no_retry) of
|
||||||
{ok, _} ->
|
{ok, _} ->
|
||||||
|
@ -405,7 +408,7 @@ is_resource_alive(Nodes, ResId, _Opts = #{fetch := true}) ->
|
||||||
{ok, #resource_type{on_status = {Mod, OnStatus}}}
|
{ok, #resource_type{on_status = {Mod, OnStatus}}}
|
||||||
= emqx_rule_registry:find_resource_type(ResType),
|
= emqx_rule_registry:find_resource_type(ResType),
|
||||||
case rpc:multicall(Nodes,
|
case rpc:multicall(Nodes,
|
||||||
?MODULE, fetch_resource_status, [Mod, OnStatus, ResId], 5000) of
|
?MODULE, fetch_resource_status, [Mod, OnStatus, ResId], ?GET_RES_ALIVE_TIMEOUT) of
|
||||||
{ResL, []} ->
|
{ResL, []} ->
|
||||||
is_resource_alive_(ResL);
|
is_resource_alive_(ResL);
|
||||||
{_, _Error} ->
|
{_, _Error} ->
|
||||||
|
@ -420,7 +423,7 @@ is_resource_alive(Nodes, ResId, _Opts = #{fetch := true}) ->
|
||||||
end;
|
end;
|
||||||
is_resource_alive(Nodes, ResId, _Opts = #{fetch := false}) ->
|
is_resource_alive(Nodes, ResId, _Opts = #{fetch := false}) ->
|
||||||
try
|
try
|
||||||
case rpc:multicall(Nodes, ?MODULE, get_resource_status, [ResId], 5000) of
|
case rpc:multicall(Nodes, ?MODULE, get_resource_status, [ResId], ?GET_RES_ALIVE_TIMEOUT) of
|
||||||
{ResL, []} ->
|
{ResL, []} ->
|
||||||
is_resource_alive_(ResL);
|
is_resource_alive_(ResL);
|
||||||
{_, _Errors} ->
|
{_, _Errors} ->
|
||||||
|
@ -532,10 +535,15 @@ refresh_rule(#rule{id = RuleId, for = Topics, actions = Actions}) ->
|
||||||
refresh_resource_status() ->
|
refresh_resource_status() ->
|
||||||
lists:foreach(
|
lists:foreach(
|
||||||
fun(#resource{id = ResId, type = ResType}) ->
|
fun(#resource{id = ResId, type = ResType}) ->
|
||||||
case emqx_rule_registry:find_resource_type(ResType) of
|
case is_prober(ResId) of
|
||||||
{ok, #resource_type{on_status = {Mod, OnStatus}}} ->
|
false ->
|
||||||
fetch_resource_status(Mod, OnStatus, ResId);
|
case emqx_rule_registry:find_resource_type(ResType) of
|
||||||
_ -> ok
|
{ok, #resource_type{on_status = {Mod, OnStatus}}} ->
|
||||||
|
fetch_resource_status(Mod, OnStatus, ResId);
|
||||||
|
_ -> ok
|
||||||
|
end;
|
||||||
|
true ->
|
||||||
|
ok
|
||||||
end
|
end
|
||||||
end, emqx_rule_registry:get_resources()).
|
end, emqx_rule_registry:get_resources()).
|
||||||
|
|
||||||
|
@ -662,6 +670,9 @@ ignore_lib_apps(Apps) ->
|
||||||
resource_id() ->
|
resource_id() ->
|
||||||
gen_id("resource:", fun emqx_rule_registry:find_resource/1).
|
gen_id("resource:", fun emqx_rule_registry:find_resource/1).
|
||||||
|
|
||||||
|
probe_resource_id() ->
|
||||||
|
gen_id(?PROBE_RES_PREFIX, fun emqx_rule_registry:find_resource/1).
|
||||||
|
|
||||||
rule_id() ->
|
rule_id() ->
|
||||||
gen_id("rule:", fun emqx_rule_registry:get_rule/1).
|
gen_id("rule:", fun emqx_rule_registry:get_rule/1).
|
||||||
|
|
||||||
|
@ -811,4 +822,9 @@ find_type(ResId) ->
|
||||||
{ok, Type}.
|
{ok, Type}.
|
||||||
|
|
||||||
alarm_name_of_resource_down(Type, ResId) ->
|
alarm_name_of_resource_down(Type, ResId) ->
|
||||||
list_to_binary(io_lib:format("resource/~s/~s/down", [Type, ResId])).
|
unicode:characters_to_binary(io_lib:format("resource/~ts/~ts/down", [Type, ResId])).
|
||||||
|
|
||||||
|
is_prober(<<?PROBE_RES_PREFIX, _/binary>>) ->
|
||||||
|
true;
|
||||||
|
is_prober(_ResId) ->
|
||||||
|
false.
|
||||||
|
|
|
@ -62,7 +62,8 @@ groups() ->
|
||||||
t_create_rule,
|
t_create_rule,
|
||||||
t_reset_metrics,
|
t_reset_metrics,
|
||||||
t_reset_metrics_fallbacks,
|
t_reset_metrics_fallbacks,
|
||||||
t_create_resource
|
t_create_resource,
|
||||||
|
t_clean_resource_alarms
|
||||||
]},
|
]},
|
||||||
{actions, [],
|
{actions, [],
|
||||||
[t_inspect_action
|
[t_inspect_action
|
||||||
|
@ -307,21 +308,29 @@ t_create_resource(_Config) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
t_clean_resource_alarms(_Config) ->
|
t_clean_resource_alarms(_Config) ->
|
||||||
|
lists:foreach(fun(ResId) ->
|
||||||
|
clean_resource_alarms(ResId)
|
||||||
|
end, [<<"abc">>, <<"哈喽"/utf8>>]).
|
||||||
|
|
||||||
|
clean_resource_alarms(ResId) ->
|
||||||
|
emqx_rule_registry:register_resource_types(
|
||||||
|
[make_simple_debug_resource_type()]),
|
||||||
ok = emqx_rule_engine:load_providers(),
|
ok = emqx_rule_engine:load_providers(),
|
||||||
{ok, #resource{id = ResId}} = emqx_rule_engine:create_resource(
|
{ok, #resource{id = ResId}} = emqx_rule_engine:create_resource(
|
||||||
#{type => built_in,
|
#{id => ResId,
|
||||||
|
type => built_in,
|
||||||
config => #{},
|
config => #{},
|
||||||
description => <<"debug resource">>}),
|
description => <<"debug resource">>}),
|
||||||
?assert(true, is_binary(ResId)),
|
|
||||||
Name = emqx_rule_engine:alarm_name_of_resource_down(ResId, built_in),
|
Name = emqx_rule_engine:alarm_name_of_resource_down(ResId, built_in),
|
||||||
_ = emqx_alarm:activate(Name, #{id => ResId, type => built_in}),
|
_ = emqx_alarm:activate(Name, #{id => ResId, type => built_in}),
|
||||||
AlarmExist = fun(#{name := AName}) -> AName == Name end,
|
AlarmExist = fun(#{name := AName}) -> AName == Name end,
|
||||||
Len = length(lists:filter(AlarmExist, emqx_alarm:get_alarms())),
|
Len = length(lists:filter(AlarmExist, emqx_alarm:get_alarms(activated))),
|
||||||
?assert(Len == 1),
|
?assertEqual(1, Len),
|
||||||
|
emqx_rule_engine:ensure_resource_deleted(ResId),
|
||||||
|
emqx_alarm:deactivate(Name),
|
||||||
|
LenAfterRemove = length(lists:filter(AlarmExist, emqx_alarm:get_alarms(activated))),
|
||||||
|
?assertEqual(0, LenAfterRemove),
|
||||||
ok = emqx_rule_engine:unload_providers(),
|
ok = emqx_rule_engine:unload_providers(),
|
||||||
emqx_rule_registry:remove_resource(ResId),
|
|
||||||
LenAfterRemove = length(lists:filter(AlarmExist, emqx_alarm:get_alarms())),
|
|
||||||
?assert(LenAfterRemove == 0),
|
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
%%------------------------------------------------------------------------------
|
%%------------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# v4.3.22
|
# v4.3.22
|
||||||
|
|
||||||
## Enhancements
|
This marks the last release of EMQX v4.3 Opensource Edition.
|
||||||
|
|
||||||
|
## Enhancements
|
||||||
|
|
||||||
- Make sure listener's `tls_versions` config value is one or more of `tlsv1`, `tlsv1.1`, `tlsv1.2`, `tlsv1.3` [#9260](https://github.com/emqx/emqx/pull/9260).
|
- Make sure listener's `tls_versions` config value is one or more of `tlsv1`, `tlsv1.1`, `tlsv1.2`, `tlsv1.3` [#9260](https://github.com/emqx/emqx/pull/9260).
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# v4.3.22
|
# v4.3.22
|
||||||
|
|
||||||
|
这是 EMQX 开原版 v4.3 系列的最后一个版本。
|
||||||
|
|
||||||
## 增强
|
## 增强
|
||||||
|
|
||||||
- 检查监听器的 `tls_versions` 配置值是 `tlsv1`,`tlsv1.1`,`tlsv1.2`,`tlsv1.3` 中的一个或多个组合 [#9260](https://github.com/emqx/emqx/pull/9260)。
|
- 检查监听器的 `tls_versions` 配置值是 `tlsv1`,`tlsv1.1`,`tlsv1.2`,`tlsv1.3` 中的一个或多个组合 [#9260](https://github.com/emqx/emqx/pull/9260)。
|
||||||
|
|
|
@ -13,8 +13,8 @@ type: application
|
||||||
|
|
||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
version: 4.3.22
|
version: 4.3.23
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application.
|
# incremented each time you make changes to the application.
|
||||||
appVersion: 4.3.22
|
appVersion: 4.3.23
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
-ifndef(EMQX_ENTERPRISE).
|
-ifndef(EMQX_ENTERPRISE).
|
||||||
|
|
||||||
-define(EMQX_RELEASE, {opensource, "4.3.22-alpha.1"}).
|
-define(EMQX_RELEASE, {opensource, "4.3.23-alhpa.1"}).
|
||||||
|
|
||||||
-else.
|
-else.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_dashboard,
|
{application, emqx_dashboard,
|
||||||
[{description, "EMQ X Web Dashboard"},
|
[{description, "EMQ X Web Dashboard"},
|
||||||
{vsn, "4.3.18"}, % strict semver, bump manually!
|
{vsn, "4.3.19"}, % strict semver, bump manually!
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, [emqx_dashboard_sup]},
|
{registered, [emqx_dashboard_sup]},
|
||||||
{applications, [kernel,stdlib,mnesia,minirest]},
|
{applications, [kernel,stdlib,mnesia,minirest]},
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
, {getopt, "1.0.1"}
|
, {getopt, "1.0.1"}
|
||||||
, {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "1.0.1"}}}
|
, {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "1.0.1"}}}
|
||||||
, {lc, {git, "https://github.com/emqx/lc.git", {tag, "0.3.2"}}}
|
, {lc, {git, "https://github.com/emqx/lc.git", {tag, "0.3.2"}}}
|
||||||
, {mongodb, {git,"https://github.com/emqx/mongodb-erlang", {tag, "v3.0.14"}}}
|
, {mongodb, {git,"https://github.com/emqx/mongodb-erlang", {tag, "v3.0.15"}}}
|
||||||
, {epgsql, {git, "https://github.com/emqx/epgsql.git", {tag, "4.6.0"}}}
|
, {epgsql, {git, "https://github.com/emqx/epgsql.git", {tag, "4.6.0"}}}
|
||||||
, {grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.7"}}}
|
, {grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.7"}}}
|
||||||
]}.
|
]}.
|
||||||
|
|
|
@ -42,11 +42,11 @@ for keychain in ${keychains}; do
|
||||||
done
|
done
|
||||||
security -v list-keychains -s "${keychain_names[@]}" "${KEYCHAIN}"
|
security -v list-keychains -s "${keychain_names[@]}" "${KEYCHAIN}"
|
||||||
|
|
||||||
# sign
|
# known runtime executables and binaries
|
||||||
codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime "${REL_DIR}"/erts-*/bin/{beam.smp,dyn_erl,epmd,erl,erl_call,erl_child_setup,erlexec,escript,heart,inet_gethost,run_erl,to_erl}
|
codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime "${REL_DIR}"/erts-*/bin/{beam.smp,dyn_erl,epmd,erl,erl_call,erl_child_setup,erlexec,escript,heart,inet_gethost,run_erl,to_erl}
|
||||||
codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime "${REL_DIR}"/lib/asn1-*/priv/lib/asn1rt_nif.so
|
|
||||||
codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime "${REL_DIR}"/lib/bcrypt-*/priv/bcrypt_nif.so
|
|
||||||
codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime "${REL_DIR}"/lib/crypto-*/priv/lib/{crypto.so,otp_test_engine.so}
|
|
||||||
codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime "${REL_DIR}"/lib/jiffy-*/priv/jiffy.so
|
|
||||||
codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime "${REL_DIR}"/lib/os_mon-*/priv/bin/{cpu_sup,memsup}
|
|
||||||
codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime "${REL_DIR}"/lib/runtime_tools-*/priv/lib/{dyntrace.so,trace_ip_drv.so,trace_file_drv.so}
|
codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime "${REL_DIR}"/lib/runtime_tools-*/priv/lib/{dyntrace.so,trace_ip_drv.so,trace_file_drv.so}
|
||||||
|
codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime "${REL_DIR}"/lib/os_mon-*/priv/bin/{cpu_sup,memsup}
|
||||||
|
# other files from runtime and dependencies
|
||||||
|
for f in asn1rt_nif.so bcrypt_nif.so crypto.so otp_test_engine.so crypto_callback.so jiffy.so crc32cer_nif.so sasl_auth.so snappyer.so odbcserver; do
|
||||||
|
find "${REL_DIR}"/lib/ -name "$f" -exec codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime {} \;
|
||||||
|
done
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
%% the emqx `release' version, which in turn is comprised of several
|
%% the emqx `release' version, which in turn is comprised of several
|
||||||
%% apps, one of which is this. See `emqx_release.hrl' for more
|
%% apps, one of which is this. See `emqx_release.hrl' for more
|
||||||
%% info.
|
%% info.
|
||||||
{vsn, "4.3.23"}, % strict semver, bump manually!
|
{vsn, "4.3.24"}, % strict semver, bump manually!
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [ kernel
|
{applications, [ kernel
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
%% -*- mode: erlang -*-
|
%% -*- mode: erlang -*-
|
||||||
%% Unless you know what you are doing, DO NOT edit manually!!
|
%% Unless you know what you are doing, DO NOT edit manually!!
|
||||||
{VSN,
|
{VSN,
|
||||||
[{"4.3.22",
|
[{"4.3.23",
|
||||||
|
[{load_module,emqx_channel,brutal_purge,soft_purge,[]},
|
||||||
|
{load_module,emqx_app,brutal_purge,soft_purge,[]},
|
||||||
|
{load_module,emqx_cm,brutal_purge,soft_purge,[]}]},
|
||||||
|
{"4.3.22",
|
||||||
[{load_module,emqx_hooks,brutal_purge,soft_purge,[]},
|
[{load_module,emqx_hooks,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_misc,brutal_purge,soft_purge,[]},
|
{load_module,emqx_misc,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_cm,brutal_purge,soft_purge,[]},
|
{load_module,emqx_cm,brutal_purge,soft_purge,[]},
|
||||||
|
@ -877,7 +881,11 @@
|
||||||
{load_module,emqx_message,brutal_purge,soft_purge,[]},
|
{load_module,emqx_message,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_limiter,brutal_purge,soft_purge,[]}]},
|
{load_module,emqx_limiter,brutal_purge,soft_purge,[]}]},
|
||||||
{<<".*">>,[]}],
|
{<<".*">>,[]}],
|
||||||
[{"4.3.22",
|
[{"4.3.23",
|
||||||
|
[{load_module,emqx_channel,brutal_purge,soft_purge,[]},
|
||||||
|
{load_module,emqx_app,brutal_purge,soft_purge,[]},
|
||||||
|
{load_module,emqx_cm,brutal_purge,soft_purge,[]}]},
|
||||||
|
{"4.3.22",
|
||||||
[{load_module,emqx_hooks,brutal_purge,soft_purge,[]},
|
[{load_module,emqx_hooks,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_misc,brutal_purge,soft_purge,[]},
|
{load_module,emqx_misc,brutal_purge,soft_purge,[]},
|
||||||
{load_module,emqx_cm,brutal_purge,soft_purge,[]},
|
{load_module,emqx_cm,brutal_purge,soft_purge,[]},
|
||||||
|
|
|
@ -643,7 +643,6 @@ after_message_acked(ClientInfo, Msg, PubAckProps) ->
|
||||||
%% Process Subscribe
|
%% Process Subscribe
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
-compile({inline, [process_subscribe/3]}).
|
|
||||||
process_subscribe(TopicFilters, SubProps, Channel) ->
|
process_subscribe(TopicFilters, SubProps, Channel) ->
|
||||||
process_subscribe(TopicFilters, SubProps, Channel, []).
|
process_subscribe(TopicFilters, SubProps, Channel, []).
|
||||||
|
|
||||||
|
|
|
@ -321,11 +321,17 @@ t_handle_in_pubcomp_not_found_error(_) ->
|
||||||
t_handle_in_subscribe(_) ->
|
t_handle_in_subscribe(_) ->
|
||||||
ok = meck:expect(emqx_session, subscribe,
|
ok = meck:expect(emqx_session, subscribe,
|
||||||
fun(_, _, _, Session) -> {ok, Session} end),
|
fun(_, _, _, Session) -> {ok, Session} end),
|
||||||
Channel = channel(#{conn_state => connected}),
|
meck:new(emqx_mqtt_caps),
|
||||||
TopicFilters = [{<<"+">>, ?DEFAULT_SUBOPTS}],
|
ok = meck:expect(emqx_mqtt_caps, check_sub, fun(_, _, _) -> ok end),
|
||||||
Subscribe = ?SUBSCRIBE_PACKET(1, #{}, TopicFilters),
|
try
|
||||||
Replies = [{outgoing, ?SUBACK_PACKET(1, [?QOS_0])}, {event, updated}],
|
Channel = channel(#{conn_state => connected}),
|
||||||
{ok, Replies, _Chan} = emqx_channel:handle_in(Subscribe, Channel).
|
TopicFilters = [{<<"+">>, ?DEFAULT_SUBOPTS}],
|
||||||
|
Subscribe = ?SUBSCRIBE_PACKET(1, #{}, TopicFilters),
|
||||||
|
Replies = [{outgoing, ?SUBACK_PACKET(1, [?QOS_0])}, {event, updated}],
|
||||||
|
{ok, Replies, _Chan} = emqx_channel:handle_in(Subscribe, Channel)
|
||||||
|
after
|
||||||
|
meck:unload(emqx_mqtt_caps)
|
||||||
|
end.
|
||||||
|
|
||||||
t_handle_in_unsubscribe(_) ->
|
t_handle_in_unsubscribe(_) ->
|
||||||
ok = meck:expect(emqx_session, unsubscribe,
|
ok = meck:expect(emqx_session, unsubscribe,
|
||||||
|
@ -394,9 +400,15 @@ t_process_publish_qos1(_) ->
|
||||||
|
|
||||||
t_process_subscribe(_) ->
|
t_process_subscribe(_) ->
|
||||||
ok = meck:expect(emqx_session, subscribe, fun(_, _, _, Session) -> {ok, Session} end),
|
ok = meck:expect(emqx_session, subscribe, fun(_, _, _, Session) -> {ok, Session} end),
|
||||||
TopicFilters = [ TopicFilter = {<<"+">>, ?DEFAULT_SUBOPTS}],
|
meck:new(emqx_mqtt_caps),
|
||||||
{[{TopicFilter, ?RC_SUCCESS}], _Channel} =
|
ok = meck:expect(emqx_mqtt_caps, check_sub, fun(_, _, _) -> ok end),
|
||||||
emqx_channel:process_subscribe(TopicFilters, #{}, channel()).
|
try
|
||||||
|
TopicFilters = [ TopicFilter = {<<"+">>, ?DEFAULT_SUBOPTS}],
|
||||||
|
{[{TopicFilter, ?RC_SUCCESS}], _Channel} =
|
||||||
|
emqx_channel:process_subscribe(TopicFilters, #{}, channel())
|
||||||
|
after
|
||||||
|
meck:unload(emqx_mqtt_caps)
|
||||||
|
end.
|
||||||
|
|
||||||
t_process_unsubscribe(_) ->
|
t_process_unsubscribe(_) ->
|
||||||
ok = meck:expect(emqx_session, unsubscribe, fun(_, _, _, Session) -> {ok, Session} end),
|
ok = meck:expect(emqx_session, unsubscribe, fun(_, _, _, Session) -> {ok, Session} end),
|
||||||
|
|
Loading…
Reference in New Issue