[Maps] handle case where fit to bounds does not match any documents#66307
Merged
nreese merged 2 commits intoelastic:masterfrom May 13, 2020
Merged
[Maps] handle case where fit to bounds does not match any documents#66307nreese merged 2 commits intoelastic:masterfrom
nreese merged 2 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/kibana-gis (Team:Geo) |
thomasneirynck
approved these changes
May 12, 2020
| @@ -163,16 +163,12 @@ export class AbstractESSource extends AbstractVectorSource { | |||
| const esResp = await searchSource.fetch(); | |||
| esBounds = _.get(esResp, 'aggregations.fitToBounds.bounds'); | |||
Contributor
There was a problem hiding this comment.
rather than keep hiding the root-cause, could we remove use of lodash here?
esBonds = aggregations.fitToBounds.bounds ? aggregations.fitToBounds.bounds : null;
or
if (!aggregations.fitToBounds.bounds) {
return null;
}
esBounds = aggregations.fitToBounds.bounds;
which helps clarity
nreese
added a commit
to nreese/kibana
that referenced
this pull request
May 13, 2020
…lastic#66307) * [Maps] handle case where fit to bounds does not match any documents * review feedback
nreese
added a commit
to nreese/kibana
that referenced
this pull request
May 13, 2020
…lastic#66307) * [Maps] handle case where fit to bounds does not match any documents * review feedback # Conflicts: # x-pack/plugins/maps/public/classes/sources/es_source/es_source.js
v1v
added a commit
to v1v/kibana
that referenced
this pull request
May 13, 2020
* upstream/master: (223 commits) [Ingest] Support root level yaml variables in agent stream template (elastic#66120) [Snapshot Restore] Fix error when deleting snapshots behind reverse proxy (elastic#66147) [Lens] fix empty state for pie (elastic#66206) [APM] Improve e2e tests (elastic#66373) [ML] Data Frame Analytics: Fix steps to be named phases. (elastic#65855) [Discover] Encode context link filter part (elastic#63831) [APM] Scope APM alert creation to environment (elastic#65681) Move Kibana Usage collectors outside the telemetry plugin (elastic#65663) [ML] Data Frame Analytics: Fix confusion matrix data grid width. (elastic#65818) Switch to core application service (elastic#63443) Removes use of prefer_v2_templates (elastic#66316) [Maps] handle case where fit to bounds does not match any documents (elastic#66307) log error instead of throw (elastic#66254) [plugin-helpers] remove outdated postinstall task (elastic#66324) Spaces - migrate default space and enter space view to KP (elastic#66098) [APM] Change plugin id for `apm_oss` to `apmOss` (elastic#66164) [Maps] convert map_selectors to TS (elastic#65905) [uptime/usage-collector] add missing await (elastic#66079) [Ingest] Add additional attributes to the Datasources Saved Object (elastic#66127) [Endpoint]EMT-339: add new policy response schema (elastic#66264) ...
Contributor
💔 Build Failed
Failed CI StepsTest FailuresKibana Pipeline / kibana-xpack-agent / X-Pack API Integration Tests.x-pack/test/api_integration/apis/endpoint/policy·ts.apis Endpoint plugin Endpoint policy api GET /api/endpoint/policy_response "before all" hook for "should return one policy response for host"Standard OutStack TraceKibana Pipeline / kibana-xpack-agent / X-Pack API Integration Tests.x-pack/test/api_integration/apis/endpoint/policy·ts.apis Endpoint plugin Endpoint policy api GET /api/endpoint/policy_response "before all" hook for "should return one policy response for host"Standard OutStack TraceKibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/reporting_management/report_delete_pagination·ts.reporting management app Delete reports "before all" hook for "Confirm single report deletion works"Standard OutStack TraceHistory
To update your PR or re-run it, just comment with: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #67500
Steps to view bug:
Empty geo_bounds aggregation response

This PR fixes the above bug by properly handling the case where there are no matching documents and therefore no bounds can be calculaged.