[Watcher] Disable watcher using contextRef (#163407)

This commit is contained in:
Alison Goryachev 2023-08-08 12:06:47 -04:00 committed by GitHub
parent c249c30d3b
commit ba3284ea3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -14,6 +14,13 @@ export const plugin = (ctx: PluginInitializerContext) => new WatcherServerPlugin
export const config = {
schema: schema.object({
enabled: schema.boolean({ defaultValue: true }),
enabled: schema.conditional(
schema.contextRef('serverless'),
true,
// Watcher is disabled in serverless; refer to the serverless.yml file as the source of truth
// We take this approach in order to have a central place (serverless.yml) to view disabled plugins across Kibana
schema.boolean({ defaultValue: true }),
schema.never()
),
}),
};

View file

@ -50,6 +50,10 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
appName: 'License Management',
url: 'stack/license_management',
},
{
appName: 'Watcher',
url: 'insightsAndAlerting/watcher',
},
];
DISABLED_PLUGINS.forEach(({ appName, url }) => {