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 to hapi version 20 #85406

Merged
merged 15 commits into from
Dec 19, 2020
Merged

Upgrade to hapi version 20 #85406

merged 15 commits into from
Dec 19, 2020

Conversation

watson
Copy link
Contributor

@watson watson commented Dec 9, 2020

Closes #82805

This PR upgrades from hapi v18 to v20 (and related packages).

Upgraded modules

Module Old version New version Risk Changelog Breaking Changes
@hapi/hapi 18.4.1 20.0.3 ❤️ Changelog hapijs/hapi#4017
hapijs/hapi#4138
@hapi/boom 7.4.11 9.1.1 💛 Changelog hapijs/boom#251
hapijs/boom#252
hapijs/boom#253
hapijs/boom#262
@hapi/cookie 10.1.2 11.0.2 💚 Changelog hapijs/cookie#227
@hapi/good-squeeze 5.2.1 6.0.0 💚 hapijs/good-squeeze#39
@hapi/h2o2 8.3.2 9.0.2 💛 Changelog hapijs/h2o2#110
hapijs/h2o2#111
hapijs/h2o2#112
hapijs/h2o2#113
@hapi/hoek 8.5.1 9.1.0 ❤️ Changelog hapijs/hoek#343
hapijs/hoek#347
@hapi/inert 5.2.2 6.0.3 💛 Changelog hapijs/inert#137
hapijs/inert#138
hapijs/inert#139
hapijs/inert#140
@hapi/podium 3.4.3 4.1.1 💚 Changelog hapijs/podium#57
@hapi/statehood 6.1.2 7.0.3 💚 Changelog hapijs/statehood#66
hapijs/statehood#67
@hapi/vision 5.4.0 6.0.1 💛 Changelog hapijs/vision#190
hapijs/vision#191
hapijs/vision#192
@hapi/wreck 15.1.0 17.1.0 💚 Changelog hapijs/wreck#262
hapijs/wreck#263
hapijs/wreck#270

We're still using our own fork of @hapi/good (@elastic/good) and joi hasn't been upgraded to the newest version.

Remaining todo's before review

  • Address TODOs in code
  • Make sure all tests pass

@watson watson added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.11.0 labels Dec 9, 2020
@watson watson self-assigned this Dec 9, 2020
@watson watson added v7.12.0 and removed v7.11.0 labels Dec 9, 2020
@watson watson mentioned this pull request Dec 10, 2020
@watson watson force-pushed the bump-hapi branch 2 times, most recently from 77f5e05 to b25262f Compare December 10, 2020 16:33
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

Copy link
Contributor

@jfsiii jfsiii left a comment

Choose a reason for hiding this comment

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

👍 for Fleet changes

Copy link
Contributor

@smith smith left a 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.

Copy link
Contributor

@flash1293 flash1293 left a 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

Copy link
Contributor

@darnautov darnautov left a 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

@legrego legrego self-requested a review December 18, 2020 01:54
Copy link
Member

@legrego legrego left a 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:

// 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",
Copy link
Member

Choose a reason for hiding this comment

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

🎉

@mshustov
Copy link
Contributor

I think we can remove this patch now that Hapi supports SameSite=None natively:

@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.
Copy link
Member

@legrego legrego left a 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!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 1.7MB 1.7MB -211.0B

Distributable file count

id before after diff
default 47287 47885 +598
oss 27863 27701 -162

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
upgradeAssistant 60.1KB 59.9KB -211.0B

History

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

Copy link
Contributor

@rylnd rylnd left a 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!

@watson watson merged commit e8b21bc into elastic:master Dec 19, 2020
@watson watson deleted the bump-hapi branch December 19, 2020 12:10
watson added a commit that referenced this pull request Dec 20, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Dec 21, 2020
* 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)
  ...
watson added a commit to watson/kibana that referenced this pull request Dec 22, 2020
watson added a commit that referenced this pull request Dec 22, 2020
watson added a commit that referenced this pull request Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Fleet Team label for Observability Data Collection Fleet team v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Hapi to v20