-
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
Updates react to 16.6 (latest) #24707
Conversation
💔 Build Failed |
retest |
💔 Build Failed |
Thanks @jasonrhodes for doing this. also @sqren was interested in doing this. About the The x-pack failures are a bit strange, seems that they are requiring the adapter but it's loaded via |
Can't wait for the hooks either? :D |
Suspennnnnnnnnse |
I tried to do basically the same thing but was concerned by some of the snapshot changes I was seeing, which led me to find the change in
All other uses of |
@jasonrhodes All those issues are closed now, want to take another shot at this upgrade? |
💔 Build Failed |
@spalger absolutely, will give this a shot tomorrow -- thanks for the heads up! |
I rebased this against master and re-ran tests, here are the results. In the Kibana root:
In x-pack:
In both cases, these are primarily due to |
96b6dee
to
0eb1d50
Compare
💔 Build Failed |
After fixing/updating snapshots where For Kibana root:
and for x-pack:
So that's roughly 30 snapshots and 2 unit tests that need some review. A lot of those 30 snapshots are still related to @spalger @chandlerprall @sqren @ogupte @markov00 or anyone else wanna have a go? |
Also note: the "+12000" lines in the diff is almost entirely because the yarn.lock file was missing from the x-pack folder for some reason, and this PR added it back since I ran |
^^ @joshdover did your work on yarn workspaces intentionally remove this? I seem to remember you mentioning something about it, but I might be making that up |
@@ -1,7 +1,7 @@ | |||
// Jest Snapshot v1, https://goo.gl/fbAQLP | |||
|
|||
exports[`<ImpactedSpacesFlyout> renders without crashing 1`] = ` | |||
<React.Fragment> | |||
<Fragment> |
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.
question: Why do some of the snapshot differences change <React.Fragment>
=> <Fragment>
, whereas others just remove the fragment altogether, like this example?
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.
This is a good question. I looked into it a bit and couldn't find a solid answer. I looked at some of the source and nothing changed, it seemed like possibly when there is a single fragment inside of another single element, the fragment may disappear since it's "not needed" but I'm not totally sure if that's true.
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.
Enzyme has removed fragments from rendered output since roughly 3.3.5 or 3.3.6 - https://github.com/airbnb/enzyme/blame/master/packages/enzyme/src/RSTTraversal.js#L25
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.
Dug in a bit more; in cases where the Fragment
is the top-level/ROOT/HOST node (as it is in ImpactedSpacesFlyout> renders without crashing 1), then the Fragment is never seen as a child so it doesn't get expanded.
💔 Build Failed |
Really awesome work on upgrading React! Would it make sense to bump it to the latest (16.7) now you are at it? 16.7 is supposedly fully backwards compatible with 16.6, and was only labelled as a minor release (instead of patch) to err on the side of caution. |
@legrego @jasonrhodes Right, there should only be a single yarn.lock file now. If you had started this before yarn-workspaces was merged you probably got a conflict on the x-pack/yarn.lock. That file should be removed from your PR. |
But I think running |
@jasonrhodes That shouldn't be the case. If you delete the file and run bootstrap again, is it re-appearing? |
@joshdover i'll try when I have a minute to get back on this branch. All I know is that the file was already missing for me when I rebased this branch, I believe, and running bootstrap to update the react deps seemed to re-create it. I'll try again and confirm, though. |
@jasonrhodes Definitely seems strange. We've updated other dependencies since workspaces went in and this hasn't happened. I think what happened here is that this work was started before workspaces went in and git may have put the file back when you merged/rebased with master. If it does reappear after deleting/bootstrap again, lmk and I can help investigate. |
…oduced by accident during a rebase in this branch
4356fd3
to
a5bfbcc
Compare
💔 Build Failed |
@Bargs @chandlerprall this commit is pushed 4893cba That fixes the issue with the query_bar blocking state updates due to the 16.4 changes with |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
@jasonrhodes same snapshot update needed for x-pack tests (executeQueryOptions prop appearing) |
8d41dbb
to
0bf729e
Compare
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.
Changes + snapshot updates look great
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.
Query bar change LGTM
💚 Build Succeeded |
@joshdover / @legrego you all have commented here in the past so I'm pinging you for a last look/approval :D |
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!
@stacey-gammon do you want to look at anything here, with a React upgrade? |
* Updates react to 16.6 (latest) * Updated fragment-based snapshots for Kibana root unit tests * Updated fragment-based snapshots for x-pack unit tests * Removed xpack yarn.lock file bc it is no longer needed, it was reintroduced by accident during a rebase in this branch * React 16.6 snapshot updates, round 2 (mostly Fragment snapshot diffs) * Updated last round of React 16.6 snapshots * Fixes query bar issue with 16.4 gDSFP lifecycle * Updated yarn lock (arraybuffer.slice updated) * Updates snapshots where executeQueryOptions prop appears
* Updates react to 16.6 (latest) * Updated fragment-based snapshots for Kibana root unit tests * Updated fragment-based snapshots for x-pack unit tests * Removed xpack yarn.lock file bc it is no longer needed, it was reintroduced by accident during a rebase in this branch * React 16.6 snapshot updates, round 2 (mostly Fragment snapshot diffs) * Updated last round of React 16.6 snapshots * Fixes query bar issue with 16.4 gDSFP lifecycle * Updated yarn lock (arraybuffer.slice updated) * Updates snapshots where executeQueryOptions prop appears
Summary
Upgrades the following packages to "latest" in order to keep our React dependencies up to date.
These deps have been updated in the kibana root as well as in the x-pack directory. I'm not sure if it needs to be upgraded in other places or if there is a
kbn
command to do these kinds of upgrades across the project.NOTES:
<React.Fragment>
in snapshot tests, or in some cases renders as<Fragment>
instead of<React.Fragment>
.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
[ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)[ ] This includes a feature addition or change that requires a release note and was labeled appropriately