Closed NeonDaniel closed 4 months ago
I see that disabling a plugin that has a validator method isn't working in upstream PHAL, sending a PR there
this was a per-plugin thing (except for admin plugins), not universal, but this is a good change!
Does this mean that the plugin config MUST contain "enabled": true
?
If the "enabled" key is not in the config, won't it return False?
Does this mean that the plugin config MUST contain
"enabled": true
? If the "enabled" key is not in the config, won't it return False?
Only if there isn't a validator (matching existing behavior).
If the enabled
key is False
, then the plugin won't try to validate or load. If enabled
is unset, then it follows the existing behavior where it will try to load if EITHER:
enabled
config is set to True
it should load if enabled is not set and validator doesnt exist, ie, by default instaling a plugin is all that is needed to load it
only admin plugins have the extra checks
enabled: false
should be respected universally and thats what i thought this PR was doing
it should load if enabled is not set and validator doesnt exist, ie, by default instaling a plugin is all that is needed to load it
only admin plugins have the extra checks
enabled: false
should be respected universally and thats what i thought this PR was doing
Without (and with) this PR, the default is enabled=False
if there is no validator. This PR just adds support for the enabled
config param when there is a validator.
I'm not opposed to changing the default behavior to load plugins without validators though; this would match the behavior for skills where the default is to load anything that is installed. @mikejgray does this change seem good to you since you already approved the changes as they are now?
Refactor plugin load logic to respect plugins disabled in config Adds unit test coverage for PHAL plugin load Relates to https://github.com/NeonGeckoCom/NeonCore/issues/686