Skip to content

[8.5] [Discover] Prevent agg based visualizations of Discover saved objects with adhoc data views (#145583)#146412

Merged
dimaanj merged 2 commits intoelastic:8.5from
dimaanj:backport/8.5/pr-145583
Nov 28, 2022
Merged

[8.5] [Discover] Prevent agg based visualizations of Discover saved objects with adhoc data views (#145583)#146412
dimaanj merged 2 commits intoelastic:8.5from
dimaanj:backport/8.5/pr-145583

Conversation

@dimaanj
Copy link
Contributor

@dimaanj dimaanj commented Nov 28, 2022

Backport

This will backport the following commits from main to 8.5:

Questions ?

Please refer to the Backport tool documentation

\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by: Dmitry Tomashevich <39378793+dimaanj@users.noreply.github.com>"}},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com//pull/145583","number":145583,"mergeCommit":{"message":"[Discover] Prevent agg based visualizations of Discover saved objects with adhoc data views (#145583)\n\n## Summary\r\n\r\nFixes #141812\r\n\r\nThis PR preventing using Discover saved objects with adhoc data views in\r\naggregation based visualisations.\r\n\r\n### Test notes \r\n- Create Saved search based on adhoc data view in Discover\r\n- Open new Agg based visualisations list and choose one\r\n- Created Saved search shouldn't appear in the list. \r\n\r\n### Checklist\r\n\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"2c9043ab431cebbbdeb77c96aa2a5c0bc5b0ddf4"}},{"branch":"8.5","label":"v8.5.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->

… with adhoc data views (elastic#145583)

## Summary

Fixes elastic#141812

This PR preventing using Discover saved objects with adhoc data views in
aggregation based visualisations.

### Test notes
- Create Saved search based on adhoc data view in Discover
- Open new Agg based visualisations list and choose one
- Created Saved search shouldn't appear in the list.

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 2c9043a)

# Conflicts:
#	src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts
@dimaanj dimaanj added the backport This PR is a backport of another PR label Nov 28, 2022
@dimaanj dimaanj enabled auto-merge (squash) November 28, 2022 15:13
@dimaanj dimaanj disabled auto-merge November 28, 2022 15:14
@dimaanj
Copy link
Contributor Author

dimaanj commented Nov 28, 2022

@elasticmachine merge upstream

@kibana-ci
Copy link

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
visualizations 327 328 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
discover 80 81 +1
savedObjects 152 156 +4
savedSearch 43 44 +1
total +6

Async chunks

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

id before after diff
discover 478.1KB 478.2KB +37.0B
visualizations 218.9KB 219.0KB +81.0B
total +118.0B

Page load bundle

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

id before after diff
savedSearch 5.1KB 5.2KB +76.0B

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/saved-objects-service.html#_mappings

id before after diff
search 22 23 +1
Unknown metric groups

API count

id before after diff
discover 97 98 +1
savedObjects 193 197 +4
savedSearch 43 44 +1
total +6

History

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

@dimaanj dimaanj merged commit 8af4e2e into elastic:8.5 Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants