-
Notifications
You must be signed in to change notification settings - Fork 27
[DPE-2903] Toggle plugins in one go #322
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
Conversation
| self.unit.status = original_status | ||
| extension = plugins_exception.get(extension, extension) | ||
| extensions[extension] = enable | ||
| self.unit.status = WaitingStatus("Updating extensions") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can no longer tell if we are enabling or disabling and which plugin.
| # Enable/disable extensions in the new database. | ||
| self.charm.enable_disable_extensions(database) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be done anyway on line 153
taurus-forever
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Can we improve the test to make sure at least some extension(s) are enabled?
marceloneppel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the great improvement!
Will add additional test for this as part of DPE-2844, since I want to unblock pending plugin PRs. |
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Issue
Starting a connection for each db to enable or disable plugins will take more and more time as the number of plugins increases.
Solution
Open a single connection per db and enable or disable the plugins in one go.