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] geojson layer with joins and no left source matches stuck in loading state #156630

Closed
nreese opened this issue May 3, 2023 · 1 comment · Fixed by #160222
Closed

[maps] geojson layer with joins and no left source matches stuck in loading state #156630

nreese opened this issue May 3, 2023 · 1 comment · Fixed by #160222
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Maps regression Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@nreese
Copy link
Contributor

nreese commented May 3, 2023

Steps:

  • install web logs sample data
  • create new map and add documents layer. Select web logs index. Click Add and continue button
  • See scaling to limit. This switches layer from vector tiles to geojson
  • Set time range to Last 1 second to ensure no matches to left source
  • Add term join. For left source, set field to machine.os. For right source, select web logs data view and machine.os for right field.
  • Notice how layer state is stuck in loading

Screen Shot 2023-05-03 at 5 06 22 PM

@nreese nreese added bug Fixes for quality problems that affect the customer experience regression Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Feature:Maps labels May 3, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@nreese nreese changed the title [maps] geojson layer with no left source matches stuck in loading state [maps] geojson layer with joins and no left source matches stuck in loading state May 3, 2023
nreese added a commit that referenced this issue May 17, 2023
Fixes #154605

PR adds new layer wizard for spatial join. Wizard provides an easy
interface to create spatial join as well as advertising the capability
in the main layer creation work flow.
<img width="200" alt="Screen Shot 2023-05-04 at 12 16 45 PM"
src="https://user-images.githubusercontent.com/373691/236293473-8a740171-0910-4574-8e38-0ba1ab38a5fd.png">
<img width="400" alt="Screen Shot 2023-05-04 at 12 17 07 PM"
src="https://user-images.githubusercontent.com/373691/236293475-ad04cb1c-b49f-46aa-8ae6-2df62123b516.png">

PR renames `Terms joins` editor panel to `Joins` and updates panel to
accommodate spatial joins. Displays UI for creating, editing and
deleting spatial joins.
<img width="200" alt="Screen Shot 2023-05-04 at 12 17 20 PM"
src="https://user-images.githubusercontent.com/373691/236293486-49aa8063-0860-4aa7-af85-e47f899a3885.png">
<img width="400" alt="Screen Shot 2023-05-04 at 12 41 39 PM"
src="https://user-images.githubusercontent.com/373691/236298721-e237b801-0539-4960-82e6-d992f5bd8bb4.png">
<img width="300" alt="Screen Shot 2023-05-04 at 12 17 25 PM"
src="https://user-images.githubusercontent.com/373691/236293489-b18c7a0a-b339-42f0-870d-88785175c1f6.png">
<img width="300" alt="Screen Shot 2023-05-04 at 12 17 37 PM"
src="https://user-images.githubusercontent.com/373691/236293492-f4ea3b9b-d28d-46d8-a243-c0e82cb5efda.png">

PR also updates inspector request registration name and description to
provide less technical names that provide better meaning of what request
is fetching and how everything fits together. I think this really helps
understandability of join requests
<img width="500" alt="Screen Shot 2023-05-04 at 12 22 56 PM"
src="https://user-images.githubusercontent.com/373691/236294739-53d32f65-a5e5-4b6d-b41a-7f76fcd731b5.png">


#### Known issues
Issues discovered by this PR that are in main and will be resolved
separately.
* When using spatial join wizard, if there are no matches to left source
then layer gets stuck in loading state
#156630
* Term join left field change not applied as expected
#156631

#### Developer level changes

LayerDescriptor
* Changes joins from `JoinDescriptor` to `Partial<JoinDescriptor>`. This
did not change the content, just updated the type to better reflect
contents.

JoinDescriptor
* Changes right from `JoinSourceDescriptor` to
`Partial<JoinSourceDescriptor>`. This did not change the content, just
updated the type to better reflect contents.

IVectorLayer interface changes
* Remove getJoinsDisabledReason
* Remove showJoinEditor

IVectorSource interface changes
* Replaced showJoinEditor with supportsJoins
* Removed getJoinsDisabledReason

Replaced GeoIndexPatternSelect prop `value` with `dataView`.
1) provides better symmetry since on change return DataView
2) First time GeoIndexPatternSelect need to use a pre-loaded data view.
By passing in DataView, loading state can be more easily handled.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Nick Peihl <[email protected]>
jasonrhodes pushed a commit that referenced this issue May 17, 2023
Fixes #154605

PR adds new layer wizard for spatial join. Wizard provides an easy
interface to create spatial join as well as advertising the capability
in the main layer creation work flow.
<img width="200" alt="Screen Shot 2023-05-04 at 12 16 45 PM"
src="https://user-images.githubusercontent.com/373691/236293473-8a740171-0910-4574-8e38-0ba1ab38a5fd.png">
<img width="400" alt="Screen Shot 2023-05-04 at 12 17 07 PM"
src="https://user-images.githubusercontent.com/373691/236293475-ad04cb1c-b49f-46aa-8ae6-2df62123b516.png">

PR renames `Terms joins` editor panel to `Joins` and updates panel to
accommodate spatial joins. Displays UI for creating, editing and
deleting spatial joins.
<img width="200" alt="Screen Shot 2023-05-04 at 12 17 20 PM"
src="https://user-images.githubusercontent.com/373691/236293486-49aa8063-0860-4aa7-af85-e47f899a3885.png">
<img width="400" alt="Screen Shot 2023-05-04 at 12 41 39 PM"
src="https://user-images.githubusercontent.com/373691/236298721-e237b801-0539-4960-82e6-d992f5bd8bb4.png">
<img width="300" alt="Screen Shot 2023-05-04 at 12 17 25 PM"
src="https://user-images.githubusercontent.com/373691/236293489-b18c7a0a-b339-42f0-870d-88785175c1f6.png">
<img width="300" alt="Screen Shot 2023-05-04 at 12 17 37 PM"
src="https://user-images.githubusercontent.com/373691/236293492-f4ea3b9b-d28d-46d8-a243-c0e82cb5efda.png">

PR also updates inspector request registration name and description to
provide less technical names that provide better meaning of what request
is fetching and how everything fits together. I think this really helps
understandability of join requests
<img width="500" alt="Screen Shot 2023-05-04 at 12 22 56 PM"
src="https://user-images.githubusercontent.com/373691/236294739-53d32f65-a5e5-4b6d-b41a-7f76fcd731b5.png">


#### Known issues
Issues discovered by this PR that are in main and will be resolved
separately.
* When using spatial join wizard, if there are no matches to left source
then layer gets stuck in loading state
#156630
* Term join left field change not applied as expected
#156631

#### Developer level changes

LayerDescriptor
* Changes joins from `JoinDescriptor` to `Partial<JoinDescriptor>`. This
did not change the content, just updated the type to better reflect
contents.

JoinDescriptor
* Changes right from `JoinSourceDescriptor` to
`Partial<JoinSourceDescriptor>`. This did not change the content, just
updated the type to better reflect contents.

IVectorLayer interface changes
* Remove getJoinsDisabledReason
* Remove showJoinEditor

IVectorSource interface changes
* Replaced showJoinEditor with supportsJoins
* Removed getJoinsDisabledReason

Replaced GeoIndexPatternSelect prop `value` with `dataView`.
1) provides better symmetry since on change return DataView
2) First time GeoIndexPatternSelect need to use a pre-loaded data view.
By passing in DataView, loading state can be more easily handled.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Nick Peihl <[email protected]>
@nreese nreese self-assigned this Jun 21, 2023
nreese added a commit that referenced this issue Jun 26, 2023
…in loading state (#160222)

closes #156630

---------

Co-authored-by: kibanamachine <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jun 26, 2023
…in loading state (elastic#160222)

closes elastic#156630

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit c947427)
kibanamachine referenced this issue Jun 26, 2023
…stuck in loading state (#160222) (#160541)

# Backport

This will backport the following commits from `main` to `8.9`:
- [[maps] fix geojson layer with joins and no left source matches stuck
in loading state
(#160222)](#160222)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-26T15:27:28Z","message":"[maps]
fix geojson layer with joins and no left source matches stuck in loading
state (#160222)\n\ncloses
https://github.com/elastic/kibana/issues/156630\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"c9474270d1d513784fb21d61603567adfc66f1aa","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","Feature:Maps","v8.9.0","v8.10.0"],"number":160222,"url":"https://github.com/elastic/kibana/pull/160222","mergeCommit":{"message":"[maps]
fix geojson layer with joins and no left source matches stuck in loading
state (#160222)\n\ncloses
https://github.com/elastic/kibana/issues/156630\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"c9474270d1d513784fb21d61603567adfc66f1aa"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160222","number":160222,"mergeCommit":{"message":"[maps]
fix geojson layer with joins and no left source matches stuck in loading
state (#160222)\n\ncloses
https://github.com/elastic/kibana/issues/156630\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"c9474270d1d513784fb21d61603567adfc66f1aa"}}]}]
BACKPORT-->

Co-authored-by: Nathan Reese <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Maps regression Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants