-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 to hapi version 20 #85406
Upgrade to hapi version 20 #85406
Conversation
77f5e05
to
b25262f
Compare
Hapi handles `{ validate: undefined }` differently from `{}` for route options. Having the `validate` key set to `undefined` on the `options` object resulted in the following error Cannot use 'in' operator to search for 'headers' in undefined This was because the key names were iterated over and their value expected to be an object.
Pinging @elastic/ingest-management (Team:Ingest Management) |
Pinging @elastic/apm-ui (Team:apm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for Fleet changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APM changes look good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kibana app changes LGTM, type changes only. Didn't test locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ML and Transform changes LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this patch now that Hapi supports SameSite=None
natively:
kibana/src/core/server/http/cookie_session_storage.ts
Lines 162 to 177 in 7002250
// A hack to support SameSite: 'None'. | |
// Remove it after update Hapi to v19 that supports SameSite: 'None' out of the box. | |
if (cookieOptions.sameSite === 'None') { | |
log.debug('Patching Statehood.prepareValue'); | |
const originalPrepareValue = Statehood.prepareValue; | |
Statehood.prepareValue = function kibanaStatehoodPrepareValueWrapper( | |
name: string, | |
value: unknown, | |
options: any | |
) { | |
if (name === cookieOptions.name) { | |
options.isSameSite = cookieOptions.sameSite; | |
} | |
return originalPrepareValue(name, value, options); | |
}; | |
} |
@@ -73,10 +73,6 @@ | |||
"url": "https://github.com/elastic/kibana.git" | |||
}, | |||
"resolutions": { | |||
"**/@hapi/iron": "^5.1.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
@legrego I'm going to take care of it as soon as the PR is merged |
This fixes a TypeScript error which means we can get rid of a few ts-expect-error comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on green CI!
💚 Build SucceededMetrics [docs]Async chunks
Distributable file count
Page load bundle
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security Solution changes LGTM!
* master: (48 commits) Fix request with disabled aggregation (elastic#85696) [Security Solution][Detections][Threshold Rules] Threshold Rule Bug Fixes (elastic#84918) Removed a possibility to define two different names for Alert types on API and UI level. (elastic#86236) Bump Node.js from version 14.15.2 to 14.15.3 (elastic#86593) [index patterns] Fleep app - Keep saved object field list until field caps provides fields (elastic#85370) [Security Solutions] fix timeline tabs + layout (elastic#86581) Upgrade to hapi version 20 (elastic#85406) App Services: Remove remaining uiActions, expressions, data, embeddable circular dependencies. (elastic#82791) Rename chartLibrary setting to legacyChartsLibrary (elastic#86529) [CI] TeamCity updates (elastic#85843) [Maps] Use Json for mvt-tests (elastic#86492) [Rollup Jobs] Added autofocus to cron editor (elastic#86324) [Monitoring][Alerting] CCR read exceptions alert (elastic#85908) [CI] Bump memory for main CI workers (elastic#86541) Explicitly set Elasticsearch heap size during CI and local development (elastic#86513) [App Search] Updates to results on the documents view (elastic#86181) [Discover] Change default sort handling (elastic#85561) [App Search] Convert DocumentCreationModal to DocumentCreationFlyout (elastic#86508) [App Search] Sample Engines should have access to the Crawler (elastic#86502) Fixed duplication of create new modal (elastic#86489) ...
Support for this was lost in elastic#85406. Fixes elastic#86716
Closes #82805
This PR upgrades from hapi v18 to v20 (and related packages).
breaking changes
Upgraded modules
@hapi/hapi
hapijs/hapi#4138
@hapi/boom
hapijs/boom#252
hapijs/boom#253
hapijs/boom#262
@hapi/cookie
@hapi/good-squeeze
@hapi/h2o2
hapijs/h2o2#111
hapijs/h2o2#112
hapijs/h2o2#113
@hapi/hoek
hapijs/hoek#347
@hapi/inert
hapijs/inert#138
hapijs/inert#139
hapijs/inert#140
@hapi/podium
@hapi/statehood
hapijs/statehood#67
@hapi/vision
hapijs/vision#191
hapijs/vision#192
@hapi/wreck
hapijs/wreck#263
hapijs/wreck#270
We're still using our own fork of
@hapi/good
(@elastic/good
) andjoi
hasn't been upgraded to the newest version.Remaining todo's before review