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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(plugins): update plugin order on whole cluster #11548

Merged

Conversation

thalesmg
Copy link
Contributor

@thalesmg thalesmg commented Aug 30, 2023

targeting release-52

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

Summary

馃 Generated by Copilot at 8e51162

This pull request adds a new feature of global plugin configuration to the emqx_plugins application and updates the test code and the command line interface to support it. It also improves the dashboard API test code by introducing a new helper function and refactoring an existing one.

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
  • [na] 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)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • [na] Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • [na] Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

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

@thalesmg thalesmg force-pushed the fix-plugin-order-update-r52-20230830 branch from 8e51162 to a546fee Compare August 30, 2023 18:35
@thalesmg thalesmg force-pushed the fix-plugin-order-update-r52-20230830 branch from a546fee to 4dfbc85 Compare August 30, 2023 19:40
@thalesmg thalesmg marked this pull request as ready for review August 31, 2023 12:10
@@ -240,28 +241,34 @@ ensure_enabled(NameVsn) ->
%% @doc Ensure a plugin is enabled at the given position of the plugin list.
-spec ensure_enabled(name_vsn(), position()) -> ok | {error, any()}.
ensure_enabled(NameVsn, Position) ->
ensure_state(NameVsn, Position, true).
ensure_state(NameVsn, Position, _Enabled = true, _ConfLocation = local).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: is when do one need local?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current state of the code is already to use local here, and some places like management API do a multicall RPC. So the default is local to keep this change minimally invasive.

Also, post_config_update might also call some of those functions, and it should be local as well. See #8254 for a related issue that was fixed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multicall for conf change is maybe unintentional and should be fixed to use cluster-call

@thalesmg thalesmg merged commit bf0f77b into emqx:release-52 Aug 31, 2023
130 checks passed
@thalesmg thalesmg deleted the fix-plugin-order-update-r52-20230830 branch August 31, 2023 19:18
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