Merge pull request #12359 from thalesmg/fix-connector-app-deps-r55-20240119
fix(machine_boot): inject connector/bridge apps as dependencies to `emqx_connector` app
This commit is contained in:
commit
a19cf253ae
|
@ -10,8 +10,7 @@
|
|||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_connector
|
||||
emqx_resource
|
||||
]},
|
||||
{env, []},
|
||||
{licenses, ["Business Source License 1.1"]},
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{description, "EMQX HTTP Bridge and Connector Application"},
|
||||
{vsn, "0.2.2"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, emqx_connector, emqx_resource, ehttpc]},
|
||||
{applications, [kernel, stdlib, emqx_resource, ehttpc]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_http_action_info]}]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
%% for module emqx_connector_http
|
||||
emqx_connector
|
||||
emqx_resource
|
||||
]},
|
||||
{env, []},
|
||||
{licenses, ["Business Source License 1.1"]},
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_connector,
|
||||
emqx_resource,
|
||||
emqx_mongodb
|
||||
]},
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_connector,
|
||||
emqx_resource,
|
||||
emqx_mysql
|
||||
]},
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_connector,
|
||||
emqx_resource,
|
||||
emqx_redis
|
||||
]},
|
||||
|
|
|
@ -178,6 +178,11 @@ app_deps(App, RebootApps) ->
|
|||
%% `emqx_bridge' is special in that it needs all the bridges apps to
|
||||
%% be started before it, so that, when it loads the bridges from
|
||||
%% configuration, the bridge app and its dependencies need to be up.
|
||||
%%
|
||||
%% `emqx_connector' also needs to start all connector dependencies for the same reason.
|
||||
%% Since standalone apps like `emqx_mongodb' are already dependencies of `emqx_bridge_*'
|
||||
%% apps, we may apply the same tactic for `emqx_connector' and inject individual bridges
|
||||
%% as its dependencies.
|
||||
inject_bridge_deps(RebootAppDeps) ->
|
||||
BridgeApps = [
|
||||
App
|
||||
|
@ -188,6 +193,8 @@ inject_bridge_deps(RebootAppDeps) ->
|
|||
fun
|
||||
({emqx_bridge, Deps0}) when is_list(Deps0) ->
|
||||
{emqx_bridge, Deps0 ++ BridgeApps};
|
||||
({emqx_connector, Deps0}) when is_list(Deps0) ->
|
||||
{emqx_connector, Deps0 ++ BridgeApps};
|
||||
(App) ->
|
||||
App
|
||||
end,
|
||||
|
|
|
@ -392,7 +392,7 @@ t_create_webhook_v1_bridges_api({'init', Config}) ->
|
|||
lists:foreach(
|
||||
fun(App) ->
|
||||
_ = application:stop(App),
|
||||
{ok, [App]} = application:ensure_all_started(App)
|
||||
{ok, _} = application:ensure_all_started(App)
|
||||
end,
|
||||
[emqx_connector, emqx_bridge]
|
||||
),
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{application, emqx_mongodb, [
|
||||
{description, "EMQX MongoDB Connector"},
|
||||
{vsn, "0.1.4"},
|
||||
{vsn, "0.1.5"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
mongodb,
|
||||
emqx_connector,
|
||||
emqx_resource
|
||||
]},
|
||||
{env, []},
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{application, emqx_mysql, [
|
||||
{description, "EMQX MySQL Database Connector"},
|
||||
{vsn, "0.1.6"},
|
||||
{vsn, "0.1.7"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
mysql,
|
||||
emqx_connector,
|
||||
emqx_resource
|
||||
]},
|
||||
{env, []},
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{application, emqx_postgresql, [
|
||||
{description, "EMQX PostgreSQL Database Connector"},
|
||||
{vsn, "0.1.1"},
|
||||
{vsn, "0.1.2"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
epgsql,
|
||||
emqx_connector,
|
||||
emqx_resource
|
||||
]},
|
||||
{env, []},
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
{application, emqx_redis, [
|
||||
{description, "EMQX Redis Database Connector"},
|
||||
{vsn, "0.1.4"},
|
||||
{vsn, "0.1.5"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
eredis,
|
||||
eredis_cluster,
|
||||
emqx_connector,
|
||||
emqx_resource
|
||||
]},
|
||||
{env, []},
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fixed an issue that could lead to error messages when restarting a node configured with some types of data bridges. Said bridges could also start in a failed state, requiring manual restart.
|
Loading…
Reference in New Issue