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 to @hapi/hapi 18.4.1 #61959

Closed
wants to merge 19 commits into from
Closed

Conversation

watson
Copy link
Contributor

@watson watson commented Mar 31, 2020

Replaced by #80468

List of upgraded modules:

Old module. New module Old version New version Risk
hapi @hapi/hapi 17.6.0 18.4.1 Major ❤️
boom @hapi/boom 7.2.2 7.4.11 Minor 💛
hapi-auth-cookie @hapi/cookie 9.0.0 10.1.2 Major ❤️
@elastic/good @hapi/good 8.1.1-kibana2 8.2.4 Minor 💛
h2o2 @hapi/h2o2 8.1.2 8.3.2 Minor 💛
hoek @hapi/hoek 5.0.4 8.5.1 Major ❤️
inert @hapi/inert 5.1.0 5.2.2 Minor 💛
podium @hapi/podium 3.1.2 3.4.3 Minor 💛
vision @hapi/vision 5.4.0 5.4.4 Patch 💚

Blocked by

@watson watson self-assigned this Mar 31, 2020
@botelastic botelastic bot added Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) Team:AppArch labels Mar 31, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@watson watson force-pushed the bump-hapi branch 3 times, most recently from 2213ab2 to c67ae3e Compare March 31, 2020 13:16
The `ApplicationState` interface has in the new version of
`@types/hapi__hapi` been split up into:

- `RequestApplicationState`
- `ResponeApplicationState`
- `ServerApplicationState`

See PR for more info:
DefinitelyTyped/DefinitelyTyped#36361

It looks like the one we want to use is `RequestApplicationState`.
Without this change we would get the following TypeScript error:

    This condition will always return 'false' since the types
    'AuthSettings' and 'boolean' have no overlap.

According to the types, `authOptions` can either be an object,
`undefined` (bot of which we already check for), or the litteral value
`false`. Previously the types were a bit more loose and also allow a
string since it was re-using the `RouteOptions` interface (which does
allow you to specify the `auth` as a string). When reading it back from
`request.route.settings.auth` it doesn't appear to be possible for the
value to be a string however.
@watson
Copy link
Contributor Author

watson commented May 11, 2020

A lot of the legacy plugin code needs updating to support this new version of hapi, so I've put this on the back burner for now, while I'm waiting for more plugins to be migrated to the New Platform. This will make the migration to hapi 18 much easier.

However, hapi 18 is a pre-requisite for upgrading to Node.js 12 as it seems like that version 17 isn't compatible with Node.js 11+, even though it's stated on the hapi website. If this is true, we need to push on with this despite all the legacy plugins (upstream issue: hapijs/hapi#3898, fix: hapijs/hapi@a3a5ca9).

@watson watson added v7.9.0 and removed v7.8.0 labels May 28, 2020
@mshustov mshustov added v7.10.0 and removed v7.9.0 labels Jul 17, 2020
@mshustov mshustov added this to Pending Review in kibana-core [DEPRECATED] via automation Jul 17, 2020
@mshustov mshustov moved this from Pending Review to 7.10 in kibana-core [DEPRECATED] Jul 17, 2020
@watson watson added the blocked label Aug 13, 2020
@joshdover joshdover removed this from 7.10 in kibana-core [DEPRECATED] Aug 20, 2020
@watson watson added v7.11.0 and removed v7.10.0 labels Oct 8, 2020
@joshdover
Copy link
Contributor

@watson Hey Thomas, are you planning to pick this back up anytime soon?

@watson
Copy link
Contributor Author

watson commented Oct 13, 2020

@joshdover yeah I'm working on it together with the Node.js upgrade currently. However I'll most likely do another PR as this has gotten pretty stale... I'll update this PR with more information when I'm there

@watson
Copy link
Contributor Author

watson commented Oct 14, 2020

Closing in favour of #80468

@watson watson closed this Oct 14, 2020
@kibanamachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@watson watson deleted the bump-hapi branch October 14, 2020 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants