-
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
Use TS to discourage SO mappings with dynamic: false / dynamic: true #69927
Conversation
@@ -37,8 +37,8 @@ export const mapsTelemetrySavedObjects: SavedObjectsType = { | |||
avg: { type: 'long' }, | |||
}, | |||
}, | |||
layerTypesCount: { dynamic: 'true', properties: {} }, | |||
emsVectorLayersCount: { dynamic: 'true', properties: {} }, | |||
layerTypesCount: { type: 'object', enabled: false }, |
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 will prevent any queries on fields inside layerTypesCount
. If we do need to be able to query this data we will have to change the data that's being indexed so that it conforms to a fixed schema instead of dynamically adding new fields.
Pinging @elastic/kibana-platform (Team:Platform) |
Pinging @elastic/ingest-management (Team:Ingest Management) |
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.
Ingest changes LGTM
cc @jonathan-buttner since that setting came in with https://github.com/elastic/kibana/pull/63016/files#diff-fc9ba47c2406eee475f1329c61a23227
💔 Build Failed
Failed CI StepsBuild metrics
History
To update your PR or re-run it, just comment with: |
Merging because the typescript failure happens on master too. |
…lastic#69927) * Use TS to discourage SO mappings with dynamic * Some unrelated docs changes
…lastic#69927) * Use TS to discourage SO mappings with dynamic * Some unrelated docs changes # Conflicts: # x-pack/plugins/ingest_manager/server/saved_objects/index.ts
…t-pipelines/editor-error-messages * ingest-pipelines/editor-dropzone-refinement: (122 commits) Fixes for monaco XJSON grammar parser and update form copy Added cancel move button Refactor SCSS values to variables use classNames as it is intended to be used Remove box shadow on all nested tree items Rename variables and prefix booleans with "is" Fixes bug on color picker defaults on TSVB (elastic#69889) [DOCS] Fixes wording in Upload a CSV section (elastic#69969) [Discover] Validate timerange before submitting query to ES (elastic#69363) [Maps] avoid using MAP_SAVED_OBJECT_TYPE constant when defining URL paths (elastic#69723) [Maps] Fix icon palettes are not working (elastic#69937) [Ingest Manager] Fix typo in constant name (elastic#69919) [test] skip status.allowAnonymous tests on cloud (elastic#69017) Fix backport (elastic#70003) [Reporting] ReportingStore module (elastic#69426) Add reporting assets to the eslint ignore file (elastic#69968) [Discover] set minBarHeight for high cardinality data (elastic#69875) Add featureUsage API to licensing context provider (elastic#69838) Fix uncaught typecheck merge conflict (elastic#70001) Use TS to discourage SO mappings with dynamic: false / dynamic: true (elastic#69927) ...
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
… true (#69927) (#70062) * Use TS to discourage SO mappings with dynamic: false / dynamic: true (#69927) * Use TS to discourage SO mappings with dynamic * Some unrelated docs changes # Conflicts: # x-pack/plugins/ingest_manager/server/saved_objects/index.ts * @ts-ignore instead of @ts-expect-error * ingest_manager PACKAGES_SAVED_OBJECT_TYPE enabled: false Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
When Saved Object types are registered with a mapping of
dynamic: true
there's a big risk that indexing will add hundreds of fields and eventually push the.kibana
index over the default ES field limit of 1000. Althoughdynamic: false
won't cause a mappings explosion it's preferable to simply usetype: "object", enabled: false
so that no fields are being indexed.We should probably add runtime validation as well, but this provides a quick stop gap for #69985
Checklist
Delete any items that are not applicable to this PR.
For maintainers