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

[Maps] fix app crash where layer details panel calls getId on undefined #31816

Merged
merged 3 commits into from
Feb 22, 2019

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Feb 22, 2019

fixes #31744

LayerPanel assumes props.selectedLayer will always be provided. There is a race condition that sometimes results in props.selectedLayer being undefined.

The layer details flyout is open and closed with an animation. The race condition occurs when the flyout is closing and selectedLayer is set to null. Sometimes, selectedLayer is set to null before the closing animation completes and props.selectedLayer is updated to null before LayerPanel is unmounted.

This PR hardens LayerPanel so props.selectedLayer can safely be set to undefined

@nreese nreese added v7.0.0 [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v6.7.0 v7.2.0 labels Feb 22, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis

removeTrackedLayerStateForSelectedLayer
} from '../../../actions/store_actions';

const mapDispatchToProps = (dispatch) => {
return {
cancelLayerPanel: async () => {
await dispatch(updateFlyout(FLYOUT_STATE.NONE));
await dispatch(rollbackToTrackedLayerStateForSelectedLayer());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the call to rollbackToTrackedLayerStateForSelectedLayer since it is already called as part of setSelectedLayer

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese
Copy link
Contributor Author

nreese commented Feb 22, 2019

flaky x-pack jest test plugins/rollup/public/crud_app/sections/job_list/job_list.test.js

jenkins, test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@nreese nreese merged commit 1ecfff1 into elastic:master Feb 22, 2019
nreese added a commit to nreese/kibana that referenced this pull request Feb 22, 2019
…ed (elastic#31816)

* [Maps] fix app crash where details panel calls getId on undefined

* add jest test ensuring no errors when selectedLayer is undefined
nreese added a commit to nreese/kibana that referenced this pull request Feb 22, 2019
…ed (elastic#31816)

* [Maps] fix app crash where details panel calls getId on undefined

* add jest test ensuring no errors when selectedLayer is undefined
nreese added a commit to nreese/kibana that referenced this pull request Feb 22, 2019
…ed (elastic#31816)

* [Maps] fix app crash where details panel calls getId on undefined

* add jest test ensuring no errors when selectedLayer is undefined
nreese added a commit that referenced this pull request Feb 22, 2019
…ed (#31816) (#31845)

* [Maps] fix app crash where details panel calls getId on undefined

* add jest test ensuring no errors when selectedLayer is undefined
nreese added a commit that referenced this pull request Feb 22, 2019
…ed (#31816) (#31842)

* [Maps] fix app crash where details panel calls getId on undefined

* add jest test ensuring no errors when selectedLayer is undefined
nreese added a commit that referenced this pull request Feb 23, 2019
…ed (#31816) (#31844)

* [Maps] fix app crash where details panel calls getId on undefined

* add jest test ensuring no errors when selectedLayer is undefined
@nreese nreese added non-issue Indicates to automation that a pull request should not appear in the release notes release_note:skip Skip the PR/issue when compiling release notes and removed non-issue Indicates to automation that a pull request should not appear in the release notes labels Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation release_note:skip Skip the PR/issue when compiling release notes v6.7.0 v7.0.0 v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Map app logs cannot read property of getid fata error sometimes
3 participants