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

Upgrade Hapi in legacy platform to v17 #21707

Merged
merged 123 commits into from
Oct 25, 2018
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
1ffeea5
Disable even-better monitoring
joshdover Aug 6, 2018
efcd412
Upgrade to Hapi v15
joshdover Aug 6, 2018
4145ea9
Upgrade to Hapi v16
joshdover Aug 6, 2018
3598c47
Handle optional req params correctly
joshdover Aug 7, 2018
b76feac
Update http and kbnServer
joshdover Aug 8, 2018
bc1b3dc
Get mocha tests passing
joshdover Aug 8, 2018
b29d889
Convert `reply` usages [wip]
joshdover Aug 9, 2018
eb333a4
Fix Joi and Plugin incompatibilities
joshdover Aug 13, 2018
0375953
Get server up and running
joshdover Aug 13, 2018
844d401
Get basic logging working
joshdover Aug 13, 2018
2c37a8f
Fix optimizer
joshdover Aug 13, 2018
8a6a467
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Aug 13, 2018
932784a
Fix recent route handlers
joshdover Aug 13, 2018
d4f1529
Various fixes
joshdover Aug 13, 2018
5d1a45b
Merge remote-tracking branch 'upstream/master' into hapi-upgrade-2
joshdover Aug 13, 2018
a3d4b36
Fix recent routes
joshdover Aug 13, 2018
48e5478
Upgrade wreck for async/await
joshdover Aug 13, 2018
1144116
Fix mocha tests
joshdover Aug 14, 2018
a4a5182
Fix joi issues
joshdover Aug 14, 2018
deaff7e
Fix xpack jest tests
joshdover Aug 14, 2018
d0979f3
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Aug 14, 2018
71c08ab
Fix recent routes
joshdover Aug 14, 2018
4d58f72
Fix tests
joshdover Aug 14, 2018
37cfb23
Fix index setup
joshdover Aug 14, 2018
200688c
Decouple monitoring stats collection from good plugin
joshdover Aug 14, 2018
08dd615
Update reload logging test to work
joshdover Aug 14, 2018
cb40331
Reimplement logging with updated good plugin
joshdover Aug 16, 2018
511b9fd
Fix unit tests
joshdover Aug 16, 2018
aea9afb
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Aug 16, 2018
80b22ce
Fix getConnections back
joshdover Aug 17, 2018
f4f5ab6
Make LegacyLoggingServer compatible with Hapi v17
joshdover Aug 17, 2018
40c83bc
Update joi types
joshdover Aug 17, 2018
fbdec15
Fix x-pack unit tests
joshdover Aug 17, 2018
208c2ef
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Aug 17, 2018
81a89e9
Remove stray debugger
joshdover Aug 17, 2018
e99e300
Remove hapi-compat
joshdover Aug 17, 2018
94c6b6a
Fix API integrations
joshdover Aug 17, 2018
754c418
Upgrade boom
joshdover Aug 20, 2018
59a9f36
Fix security plugin
joshdover Aug 20, 2018
4269f42
Misc fixes
joshdover Aug 20, 2018
67141f3
bump
joshdover Aug 20, 2018
0a6f23e
Fix licensePreRoutingFactory
joshdover Aug 21, 2018
9b8b379
Fix failing integration tests
joshdover Aug 21, 2018
2f166b0
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Aug 22, 2018
aa1349c
Remove unnecessary test change
joshdover Aug 22, 2018
a7be65d
Remove hapi-latest package
joshdover Aug 22, 2018
d3f5cd7
fx
joshdover Aug 22, 2018
b123769
Various cleanup
joshdover Aug 22, 2018
62ded83
Fix race condition in oppsy events
joshdover Aug 24, 2018
44484d0
Use elastic/good fork
joshdover Aug 24, 2018
9ec768e
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Aug 24, 2018
84bcd55
Fix boom.wrap and hapi-latest changes
joshdover Aug 24, 2018
d638355
Simplify LegacyLoggingServer updates
joshdover Aug 27, 2018
540b11e
package.json cleanup + test fix
joshdover Aug 28, 2018
3e86acd
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Aug 28, 2018
9a8ca1d
yarn.lock cleanup
joshdover Aug 28, 2018
d514683
Change good tag
joshdover Aug 28, 2018
9a88ed4
Fixes
joshdover Aug 28, 2018
5fdded2
Change return err -> throw err in routes
joshdover Aug 28, 2018
b8bfc87
Fix await returns
joshdover Aug 29, 2018
99f1943
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Aug 30, 2018
ebb350a
Fix new load_data test
joshdover Aug 30, 2018
93464fd
Make cookie security flags consistent
joshdover Aug 30, 2018
d5be0d1
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Sep 4, 2018
11d6206
tmp doc
joshdover Sep 5, 2018
bc09fc0
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Sep 7, 2018
058d949
Fix types
joshdover Sep 7, 2018
cab2759
Fix tests
joshdover Sep 7, 2018
08e51ce
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Sep 7, 2018
bd75e0e
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Sep 17, 2018
8409827
Upgrade canvas plugin
joshdover Sep 17, 2018
459ff04
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Sep 17, 2018
9f6da50
Move good package to published @elastic/good one
joshdover Sep 17, 2018
864125b
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Sep 17, 2018
8b5c4d9
Fix SO test
joshdover Sep 17, 2018
09db158
Fix logging reloading
joshdover Sep 18, 2018
30069b1
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Sep 21, 2018
b913b85
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Sep 25, 2018
215fb1f
Update APM apis
joshdover Sep 25, 2018
bcaf5c7
Fix error logging
joshdover Sep 25, 2018
e33c6fb
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Sep 25, 2018
3d6024e
Fix logging test
joshdover Sep 25, 2018
6e178d5
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 1, 2018
cb03a0e
Convert spaces plugin
joshdover Oct 1, 2018
03877d1
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 2, 2018
d8f3192
Add validation error shim
joshdover Oct 2, 2018
82e09a5
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 2, 2018
e1358a5
Remove 7.0 release notes
joshdover Oct 3, 2018
95375dc
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 3, 2018
aed98ff
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 4, 2018
efdd3eb
Await renderApp
joshdover Oct 5, 2018
4835ca7
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 5, 2018
f13abf3
Fix ccr routes
joshdover Oct 5, 2018
ad14fc1
Prevent header popovers from scrolling with page content (#23850)
joshdover Oct 8, 2018
140f53b
Fix spaces test
joshdover Oct 8, 2018
3645fe4
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 15, 2018
a0ad29c
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 15, 2018
93e1b11
new yarn.lock-s
joshdover Oct 15, 2018
82f9cd1
Fix spaces tests
joshdover Oct 16, 2018
ea04f0e
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 16, 2018
022427b
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 16, 2018
49df9f1
Remove h2o2-latest
joshdover Oct 16, 2018
f28634d
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 17, 2018
f5e944b
Fix @types/hapi
joshdover Oct 17, 2018
95fe3a4
Upgrade InfraOps plugin
joshdover Oct 17, 2018
ae55ff4
Fix package.json
joshdover Oct 17, 2018
56b2ccf
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 17, 2018
006c557
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 19, 2018
61d02ea
Add back isSameSite: false
joshdover Oct 19, 2018
9cc2ca1
Upgrade beats_management plugin
joshdover Oct 19, 2018
1e1e571
Update snapshot
joshdover Oct 19, 2018
709ba87
Fix InfraOps
joshdover Oct 19, 2018
4bff36c
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 19, 2018
6c2c189
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 22, 2018
729ad76
Upgrade kql_telemetry
joshdover Oct 22, 2018
47706a4
Merge upstream/master
joshdover Oct 24, 2018
bc60421
Upgrade apm and ml
joshdover Oct 24, 2018
cf3ec40
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 24, 2018
bf7ee19
Put snapshot test back
joshdover Oct 24, 2018
bb9d98d
Fx beats
joshdover Oct 25, 2018
9fb482b
Merge remote-tracking branch 'upstream/master' into hapi-upgrade
joshdover Oct 25, 2018
fa357b0
Upgrade rollups
joshdover Oct 25, 2018
b556358
Update boom usages in new plugins
joshdover Oct 25, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/development/core/development-basepath.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Append `config.get('server.basePath')` to any absolute URL path.
const basePath = server.config().get('server.basePath');
server.route({
path: '/redirect',
handler(req, reply) {
reply.redirect(`${basePath}/otherLocation`);
handler(req, h) {
return h.redirect(`${basePath}/otherLocation`);
Copy link
Contributor

@tylersmalley tylersmalley Aug 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: For examples, I would prefer to keep the long-form variable names.

  handler(req, reply) {
    return reply.redirect(`${basePath}/otherLocation`);
  }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hapi convention is to call this h now. They've removed the reply name completely. I agree it's not a great choice, but might be easier for us if we're consistent with hapi documentation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think this is fine for the old platform. In the new platform we are not interfacing with the entire router as to not expose any router internals, which is still Hapi in the new platform.

}
});
-----------
Expand Down
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"babel-polyfill": "6.20.0",
"babel-register": "6.18.0",
"bluebird": "2.9.34",
"boom": "5.2.0",
"boom": "7.2.0",
"brace": "0.11.1",
"cache-loader": "1.0.3",
"chalk": "^2.4.1",
Expand All @@ -100,25 +100,24 @@
"elasticsearch": "^14.2.1",
"elasticsearch-browser": "^14.2.1",
"encode-uri-query": "1.0.0",
"even-better": "7.0.2",
"execa": "^0.10.0",
"expiry-js": "0.1.7",
"extract-text-webpack-plugin": "3.0.1",
"file-loader": "1.1.4",
"font-awesome": "4.4.0",
"glob": "^7.1.2",
"glob-all": "^3.1.0",
"good": "github:elastic/good#17.5.3-kibana1",
"good-squeeze": "2.1.0",
"h2o2": "5.1.1",
"h2o2": "8.1.2",
"h2o2-latest": "npm:[email protected]",
"handlebars": "4.0.5",
"hapi": "14.2.0",
"hapi-latest": "npm:[email protected]",
"hapi": "17.5.3",
Copy link
Contributor

@tylersmalley tylersmalley Aug 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have been moving towards using carets for version matching and relying on the lock file. Lets go ahead and update these packages to use carets unless you see a reason not to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

"hjson": "3.1.0",
"http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.1",
"inert": "4.0.2",
"joi": "10.4.1",
"inert": "5.1.0",
"joi": "13.5.2",
"jquery": "^3.3.1",
"js-yaml": "3.4.1",
"json-stringify-pretty-compact": "1.0.4",
Expand Down Expand Up @@ -192,11 +191,11 @@
"vega-lite": "^2.4.0",
"vega-schema-url-parser": "1.0.0",
"vega-tooltip": "^0.9.14",
"vision": "4.1.0",
"vision": "5.3.3",
"webpack": "3.6.0",
"webpack-merge": "4.1.0",
"whatwg-fetch": "^2.0.3",
"wreck": "12.4.0",
"wreck": "14.0.2",
"x-pack": "link:x-pack",
"yauzl": "2.7.0"
},
Expand All @@ -222,10 +221,10 @@
"@types/fetch-mock": "^5.12.2",
"@types/getopts": "^2.0.0",
"@types/glob": "^5.0.35",
"@types/hapi-latest": "npm:@types/hapi@17.0.12",
"@types/hapi": "17.0.18",
"@types/has-ansi": "^3.0.0",
"@types/jest": "^22.2.3",
"@types/joi": "^10.4.4",
"@types/joi": "^13.4.2",
"@types/jquery": "3.3.1",
"@types/js-yaml": "^3.11.1",
"@types/listr": "^0.13.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ export default function (server) {
server.route({
path: '/api/<%= name %>/example',
method: 'GET',
handler(req, reply) {
reply({ time: (new Date()).toISOString() });
handler() {
return { time: (new Date()).toISOString() };
}
});

Expand Down
3 changes: 1 addition & 2 deletions src/cli/cluster/configure_base_path_proxy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jest.mock('../../server/logging', () => ({
setupLogging: jest.fn(),
}));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: this file will go away soon with #22190

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!


import { Server } from 'hapi';
import { createBasePathProxy as createBasePathProxyMock } from '../../core';
import { setupLogging as setupLoggingMock } from '../../server/logging';
import { configureBasePathProxy } from './configure_base_path_proxy';
Expand All @@ -49,7 +48,7 @@ describe('configureBasePathProxy()', () => {

// Check that logging is configured with the right parameters.
expect(setupLoggingMock).toHaveBeenCalledWith(
expect.any(Server),
expect.anything(),
configMock
);

Expand Down

This file was deleted.

37 changes: 11 additions & 26 deletions src/cli/serve/integration_tests/reload_logging_config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { writeFileSync } from 'fs';
import { relative, resolve } from 'path';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I was planning to revive and make these tests stable in the scope of #21140, but haven't started yet. Are you going to handle that instead? If yes, please re-assign this one to yourself. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep already done, will take that issue!

import { safeDump } from 'js-yaml';
import es from 'event-stream';
import stripAnsi from 'strip-ansi';
import { readYamlConfig } from '../read_yaml_config';

const testConfigFile = follow('__fixtures__/reload_logging_config/kibana.test.yml');
Expand All @@ -42,19 +41,7 @@ function setLoggingJson(enabled) {
writeFileSync(testConfigFile, yaml);
}

const prepareJson = obj => ({
...obj,
pid: '## PID ##',
'@timestamp': '## @timestamp ##'
});

const prepareLogLine = str =>
stripAnsi(str.replace(
/\[\d{2}:\d{2}:\d{2}.\d{3}\]/,
'[## timestamp ##]'
));

describe.skip('Server logging configuration', function () {
describe('Server logging configuration', function () {
let child;
let isJson;

Expand All @@ -80,20 +67,23 @@ describe.skip('Server logging configuration', function () {
});
} else {
it('should be reloadable via SIGHUP process signaling', function (done) {
expect.assertions(1);
expect.assertions(3);

child = spawn('node', [kibanaPath, '--config', testConfigFile]);

child.on('error', err => {
done(new Error(`error in child process while attempting to reload config. ${err.stack || err.message || err}`));
});

const lines = [];
let sawJson = false;
let sawNonjson = false;

child.on('exit', _code => {
const code = _code === null ? 0 : _code;

expect({ code, lines }).toMatchSnapshot();
expect(code).toEqual(0);
expect(sawJson).toEqual(true);
expect(sawNonjson).toEqual(true);
done();
});

Expand All @@ -107,23 +97,18 @@ describe.skip('Server logging configuration', function () {

if (isJson) {
const data = JSON.parse(line);
lines.push(prepareJson(data));
sawJson = true;

if (data.tags.includes('listening')) {
switchToPlainTextLog();
}
} else if (line.startsWith('{')) {
// We have told Kibana to stop logging json, but it hasn't completed
// the switch yet, so we verify the messages that are logged while
// switching over.

const data = JSON.parse(line);
lines.push(prepareJson(data));
// the switch yet, so we ignore before switching over.
} else {
// Kibana has successfully stopped logging json, so we verify the
// log line and kill the server.
// Kibana has successfully stopped logging json, so kill the server.

lines.push(prepareLogLine(line));
sawNonjson = true;

child.kill();
child = undefined;
Expand Down
40 changes: 17 additions & 23 deletions src/cli_plugin/install/downloaders/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import Wreck from 'wreck';
import Progress from '../progress';
import { fromNode as fn } from 'bluebird';
import { createWriteStream } from 'fs';
import HttpProxyAgent from 'http-proxy-agent';
import HttpsProxyAgent from 'https-proxy-agent';
Expand All @@ -41,32 +40,27 @@ function getProxyAgent(sourceUrl, logger) {
}
}

function sendRequest({ sourceUrl, timeout }, logger) {
async function sendRequest({ sourceUrl, timeout }, logger) {
const maxRedirects = 11; //Because this one goes to 11.
return fn(cb => {
const reqOptions = { timeout, redirects: maxRedirects };
const proxyAgent = getProxyAgent(sourceUrl, logger);
const reqOptions = { timeout, redirects: maxRedirects };
const proxyAgent = getProxyAgent(sourceUrl, logger);

if (proxyAgent) {
reqOptions.agent = proxyAgent;
}

const req = Wreck.request('GET', sourceUrl, reqOptions, (err, resp) => {
if (err) {
if (err.code === 'ECONNREFUSED') {
err = new Error('ENOTFOUND');
}

return cb(err);
}
if (proxyAgent) {
reqOptions.agent = proxyAgent;
}

if (resp.statusCode >= 400) {
return cb(new Error('ENOTFOUND'));
}
try {
const promise = Wreck.request('GET', sourceUrl, reqOptions);
const req = promise.req;
const resp = await promise;
if (resp.statusCode >= 400) {
throw new Error('ENOTFOUND');
}

cb(null, { req, resp });
});
});
return { req, resp };
} catch (err) {
throw new Error('ENOTFOUND');
spalger marked this conversation as resolved.
Show resolved Hide resolved
}
}

function downloadResponse({ resp, targetPath, progress }) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/config/schema/internals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import * as Joi from 'joi';
import Joi from 'joi';
import {
AnySchema,
JoiRoot,
Expand Down
7 changes: 1 addition & 6 deletions src/core/server/config/schema/types/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,7 @@ export abstract class Type<V> {
return error;
}

const { context = {}, type, path: rawPath, message } = error;

// Before v11.0.0 Joi reported paths as `.`-delimited strings, but more
// recent version use arrays instead. Once we upgrade Joi, we should just
// remove this split logic and use `path` provided by Joi directly.
const path = rawPath ? rawPath.split('.') : [];
const { context = {}, type, path, message } = error;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: 👍


const errorHandleResult = this.handleError(type, context, path);
if (errorHandleResult instanceof SchemaTypeError) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/base_path_proxy_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Server } from 'hapi-latest';
import { Server } from 'hapi';
import { Agent as HttpsAgent, ServerOptions as TlsOptions } from 'https';
import { sample } from 'lodash';
import { ByteSizeValue } from '../config/schema';
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/http_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Server } from 'hapi-latest';
import { Server } from 'hapi';

import { modifyUrl } from '../../utils';
import { Env } from '../config';
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/http_tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { readFileSync } from 'fs';
import { Server, ServerOptions } from 'hapi-latest';
import { Server, ServerOptions } from 'hapi';
import { ServerOptions as TLSOptions } from 'https';
import { HttpConfig } from './http_config';

Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/https_redirect_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Request, ResponseToolkit, Server } from 'hapi-latest';
import { Request, ResponseToolkit, Server } from 'hapi';
import { format as formatUrl } from 'url';

import { Logger } from '../logging';
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/router/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Request } from 'hapi-latest';
import { Request } from 'hapi';
import { ObjectType, TypeOf } from '../../config/schema';

import { filterHeaders, Headers } from './headers';
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Request, ResponseObject, ResponseToolkit } from 'hapi-latest';
import { Request, ResponseObject, ResponseToolkit } from 'hapi';
import { ObjectType, schema, TypeOf } from '../../config/schema';

import { KibanaRequest } from './request';
Expand Down
Loading