Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(machine_boot): inject connector/bridge apps as dependencies to emqx_connector app #12359

Merged

Conversation

thalesmg
Copy link
Contributor

@thalesmg thalesmg commented Jan 19, 2024

For the same reasons as we inject emqx_bridge_* applications as dependencies to emqx_bridge when starting the node. Already configured connectors are started when emqx_connector application starts, and may lead to crashes and noise in the logs. One example is to configure a mongodb bridge and restart the node.

Thanks to @SergeTupchiy for noticing this. 🍻

Fixes https://emqx.atlassian.net/browse/EMQX-11771

Release version: v/e5.5

Summary

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • Change log has been added to changes/(ce|ee)/(feat|perf|fix|breaking)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • If changed package build workflow, pass this action (manual trigger)
  • Change log has been added to changes/ dir for user-facing artifacts update

@thalesmg
Copy link
Contributor Author

Now only these apps depend on emqx_connector (which starts before emqx_auth according to reboot_lists.eterm):

e5.5.0-alpha.1-g15e3f85e(emqx@127.0.0.1)1> [{App, Deps} || {App, _, _} <- application:which_applications(), {ok, Deps} <- [application:get_key(App, applications)], lists:member(emqx_connector, Deps)].
[{emqx_rule_engine,[kernel,stdlib,getopt,emqx_ctl,
                    emqx_utils,emqx,emqx_connector,emqx_bridge,rulesql,uuid]},
 {emqx_bridge,[kernel,stdlib,emqx,emqx_resource,
               emqx_connector]},
 {emqx_auth_ldap,[kernel,stdlib,emqx_resource,emqx_connector,
                  emqx_auth]},
 {emqx_ldap,[kernel,stdlib,emqx_resource,emqx_connector,
             eldap]},
 {emqx_auth_jwt,[kernel,stdlib,emqx,emqx_resource,jose,
                 emqx_connector,emqx_auth]},
 {emqx_auth_http,[kernel,stdlib,emqx_resource,emqx_connector,
                  emqx_auth]}]

@thalesmg thalesmg force-pushed the fix-connector-app-deps-r55-20240119 branch from 15e3f85 to 7114296 Compare January 22, 2024 12:22
…mqx_connector` app

Fixes https://emqx.atlassian.net/browse/EMQX-11771

For the same reasons as we inject `emqx_bridge_*` applications as dependencies to
`emqx_bridge` when starting the node.  Already configured connectors are started when
`emqx_connector` application starts, and may lead to crashes and noise in the logs.  One
example is to configure a mongodb bridge and restart the node.
@thalesmg thalesmg force-pushed the fix-connector-app-deps-r55-20240119 branch from 7114296 to 3207f0e Compare January 22, 2024 14:13
@thalesmg thalesmg marked this pull request as ready for review January 22, 2024 14:53
@thalesmg thalesmg requested review from lafirest and a team as code owners January 22, 2024 14:53
ieQu1
ieQu1 previously approved these changes Jan 24, 2024
changes/ce/fix-12359.en.md Outdated Show resolved Hide resolved
Co-authored-by: ieQu1 <99872536+ieQu1@users.noreply.github.com>
@thalesmg thalesmg merged commit a19cf25 into emqx:release-55 Jan 24, 2024
164 checks passed
@thalesmg thalesmg deleted the fix-connector-app-deps-r55-20240119 branch January 24, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants