[task manager] Kibana should start without task manager#48568
[task manager] Kibana should start without task manager#48568wylieconlon merged 6 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-stack-services (Team:Stack Services) |
|
Being able to record telemetry shouldn't be a hard requirement for any plugin, so I am in favor of this change. |
💚 Build Succeeded |
nreese
left a comment
There was a problem hiding this comment.
Looks like you need to return early for null task_manager in one more location
initTelemetryCollection passes server.plugins.task_manager and scheduleTask does not expect taskManager to be null.
nreese
left a comment
There was a problem hiding this comment.
Maps changes look good
lgtm
code review
💚 Build Succeeded |
| const taskManager = server.plugins.task_manager; | ||
|
|
||
| if (!taskManager) { | ||
| server.log(['warning', 'telemetry'], `Task manager is not available`); |
There was a problem hiding this comment.
I dont think we should be logging a warning if the task manager is not available, maybe a debug
💚 Build Succeeded |
chrisdavies
left a comment
There was a problem hiding this comment.
LGTM w/ possible unimportant, nit-picky tweak.
| state: { byDate: {}, suggestionsByDate: {}, saved: {}, runs: 0 }, | ||
| params: {}, | ||
| }); | ||
| if (taskManager) { |
There was a problem hiding this comment.
I'd lift this up to line 67 or thereabouts, so we don't even register an afterPluginsInit if there is no task manager.
💚 Build Succeeded |
* [task manager] Kibana should not fail to start without task manager * Check for task manager in maps * Lower log level * Update task registration
* [task manager] Kibana should not fail to start without task manager * Check for task manager in maps * Lower log level * Update task registration
Closes #48451
The task manager is indicated as a hard dependency of
mapsandoss_telemetry, and those apps will fail to start whenxpack.task_manager.enabled: falseis set. This causes Kibana to fail to start in those scenarios.This PR removes the task_manager dependency from the
requiresproperty, and adds a more dynamic check for whether the task manager is enabled. This allow the server to start in these scenarios.