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

Allow users to disable plugins via config #5031

Merged
merged 4 commits into from Mar 12, 2019

Conversation

Projects
None yet
2 participants
@zenweasel
Copy link
Member

commented Mar 11, 2019

Resolves #NA
Impact: minor
Type: feature

Issue

There is no good and easy way to disable a plugin through configuration

Solution

Keep a list of disabled plugins and don't load/import any of those

Breaking changes

None

Testing

  1. Start Reaction and observe no problems
  2. Edit .reaction/pluginConfigs and add search-mongo to the array for disabledPlugins.
  3. Restart Reaction
  4. Observe that the mongo search is disabled

@zenweasel zenweasel requested a review from aldeed Mar 11, 2019

@@ -0,0 +1,5 @@
const disabledPlugins = [];

This comment has been minimized.

Copy link
@aldeed

aldeed Mar 11, 2019

Member

Can you add a comment above here explaining what goes in the array? At first glance I would have thought the plugin's name, but it looks like actually the directory name.

Also, should we gitignore this file? (after this initial commit)

@zenweasel

This comment has been minimized.

Copy link
Member Author

commented Mar 11, 2019

@aldeed I wonder if sort of tangential to this if we should move all the collection creation stuff for search-mongo so that those Collections are never created if the plugin is disabled?

@aldeed

This comment has been minimized.

Copy link
Member

commented Mar 11, 2019

@zenweasel Yes as a general rule we need to get all collection creation moved into the related plugin startup. It would be done soon as part of #4996 if not now

@zenweasel

This comment has been minimized.

Copy link
Member Author

commented Mar 12, 2019

@aldeed Requested changes made

@zenweasel zenweasel requested a review from aldeed Mar 12, 2019

@aldeed

aldeed approved these changes Mar 12, 2019

@aldeed aldeed merged commit 985c471 into develop Mar 12, 2019

5 checks passed

DCO DCO
Details
WIP ready for review
Details
build_and_test Workflow: build_and_test
Details
security/snyk - package.json (Reaction Commerce) No manifest changes detected
security/snyk - package.json (reactioncommerce) No manifest changes detected

@aldeed aldeed deleted the feat-brent-disable-plugins-take-three branch Mar 12, 2019

@jeffcorpuz jeffcorpuz referenced this pull request Mar 19, 2019

Merged

Release v2.0.0-rc.11 #5049

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.