Implement LegacyService. Use core to start legacy Kibana. #22190
Implement LegacyService. Use core to start legacy Kibana. #22190azasypkin merged 19 commits intoelastic:masterfrom
LegacyService. Use core to start legacy Kibana. #22190Conversation
de1c380 to
22d0f4e
Compare
a3bd81c to
ab19b31
Compare
LegacyService. Use core to start legacy Kibana. LegacyService. Use core to start legacy Kibana.
ab19b31 to
3c03da9
Compare
This comment has been minimized.
This comment has been minimized.
3c03da9 to
f9103f3
Compare
This comment has been minimized.
This comment has been minimized.
f9103f3 to
5ce283a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5ce283a to
d4f49aa
Compare
This comment has been minimized.
This comment has been minimized.
d4f49aa to
dbeae23
Compare
💚 Build Succeeded |
dbeae23 to
b8ecb64
Compare
|
@spalger resolved conflicts, handled some comments and left questions for the others :) |
There was a problem hiding this comment.
Code is looking great, but I'm getting the following when running this locally:
~/kbn-dev/master/kibana (pr/22190) $ node scripts/kibana --dev
watching for changes (1735 files)
(node:39180) UnhandledPromiseRejectionWarning: Error: listen EADDRINUSE 127.0.0.1:5601
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at Server.setupListenHandle [as _listen2] (net.js:1355:14)
at listenInCluster (net.js:1396:12)
at GetAddrInfoReqWrap.doListen (net.js:1505:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)
(node:39180) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:39180) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:39181) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
(node:39182) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
update: Turns out this was caused by an SSH tunnel I had running on 5601, but it seems like an issue that this caused a bunch of unhandled promise rejections
src/cli/cluster/cluster_manager.js
Outdated
| this.addedCount = 0; | ||
| this.inReplMode = !!opts.repl; | ||
| this.basePathProxy = basePathProxy; | ||
| this.config = config; |
There was a problem hiding this comment.
Looks like we don't use this.config
src/cli/serve/integration_tests/__snapshots__/invalid_config.test.js.snap
Show resolved
Hide resolved
| async function makeRequest(opts) { | ||
| return await kbnTestServer.makeRequest(kbnServer, opts); | ||
| } | ||
| }, 30000); |
There was a problem hiding this comment.
I'd say move it to integration tests, just not sure why it would take 16 seconds to start a server...
I believe this behavior was always like that, at least I see it in 6.3 and it's only related to the cluster manager that doesn't handle failures of the base path proxy, e.g. if I run You should see a much clearer message if Kibana main server fails because of the same reason either on 6.3/6.4/master or in this PR. Having said that we can eventually properly handle errors that are coming from the main cluster master process if we want to. |
…nd new `tutorial mixins` tests to the latest approach used by `test_utils\kbn_server`.
This comment has been minimized.
This comment has been minimized.
|
There is some flakiness in tests that I've touched (worker tests and new tutorial mixins), will figure that out. For the latter it's likely that Kibana server initialization takes more than 5 sec (I see locally it takes ~2.8-3.4s, with 95% of times spent on the LegacyService and |
…from auto restart on shutdown.
This comment has been minimized.
This comment has been minimized.
|
Okay, in this particular case there is no reason to use full blown kibana server to test But nevertheless I tried to figure out where From a total of ~4.5s of Kibana server initialization ~1.77s were spent in |
💚 Build Succeeded |
|
6.x/6.5: b076716 |
This PR implements
LegacyServicethat will bridgecorewith "legacy" Kibana. And nowcorestarts "legacy" Kibana!How to test: everything should work as before, if you notice a difference - that's probably a bug.
Blocked by #21956Unblocks #19994
Fixes #19324
Fixes #15888