Merge pull request #11366 from thalesmg/fix-load-ee-module-20230728

fix(schema): ensure enterprise module is correctly loaded
This commit is contained in:
Thales Macedo Garitezi 2023-07-31 09:58:40 -03:00 committed by GitHub
commit b24e7e2559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 2 deletions

View File

@ -2,7 +2,7 @@
{application, emqx, [
{id, "emqx"},
{description, "EMQX Core"},
{vsn, "5.1.3"},
{vsn, "5.1.4"},
{modules, []},
{registered, []},
{applications, [

View File

@ -1,7 +1,7 @@
%% -*- mode: erlang -*-
{application, emqx_bridge, [
{description, "EMQX bridges"},
{vsn, "0.1.24"},
{vsn, "0.1.25"},
{registered, [emqx_bridge_sup]},
{mod, {emqx_bridge_app, []}},
{applications, [

View File

@ -87,12 +87,18 @@ bridge_api_union(Refs) ->
-if(?EMQX_RELEASE_EDITION == ee).
enterprise_api_schemas(Method) ->
%% We *must* do this to ensure the module is really loaded, especially when we use
%% `call_hocon' from `nodetool' to generate initial configurations.
_ = emqx_bridge_enterprise:module_info(),
case erlang:function_exported(emqx_bridge_enterprise, api_schemas, 1) of
true -> emqx_bridge_enterprise:api_schemas(Method);
false -> []
end.
enterprise_fields_bridges() ->
%% We *must* do this to ensure the module is really loaded, especially when we use
%% `call_hocon' from `nodetool' to generate initial configurations.
_ = emqx_bridge_enterprise:module_info(),
case erlang:function_exported(emqx_bridge_enterprise, fields, 1) of
true -> emqx_bridge_enterprise:fields(bridges);
false -> []

View File

@ -0,0 +1 @@
Fixed an issue that could prevent a pod from starting if some bridge configuration were specified in `bootstrapConfig` using EMQX Operator.