**Ticket:** https://github.com/elastic/kibana/issues/109815
## Summary
**Background:** `siem-detection-engine-rule-status` documents stores the `lastFailureMessage` a string which is indexed as `type: "text"` but some failure messages are so large that these documents are up to 26MB. These large documents cause migrations to fail because a batch of 1000 documents easily exceed Elasticsearch's `http.max_content_length` which defaults to 100mb.
This PR truncates `lastFailureMessage` and `lastSuccessMessage` in the following cases:
1. When we write new or update existing status SOs:
- The lists of errors/warnings are deduped -> truncated to max `20` items -> joined to a string
- The resulting strings are truncated to max `10240` characters
2. When we migrate `siem-detection-engine-rule-status` SOs to 7.15.2:
- The two message fields are truncated to max `10240` characters
### Checklist
Delete any items that are not applicable to this PR.
- [ ] [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
* [Reporting] Functional test structure & improvements
* show the error of the report generation failure in the test failure
* update snapshot
* remove import to non-existent functional app test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* ✨ compute the default threshold based on data bounds
* 🐛 Fix multi layer types issue
* ✅ Fix test
* ✅ Fix other test
* 🐛 Fix computation bug for the initial static value
* ✅ Add new suite of test for static value computation
* 🐛 Fix extents bug and refactor in a single function + tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* WIP replacing indexPattern.flattenHit by tabify
* Fix jest tests
* Read metaFields from index pattern
* Remove old test code
* remove unnecessary changes
* Remove flattenHitWrapper APIs
* Fix imports
* Fix missing metaFields
* Add all meta fields to allowlist
* Improve inline comments
* Move flattenHit test to new implementation
* Add deprecation comment to implementation
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Enabled auto policy upgrades for APM and Synthetics
* fixup! Enabled auto policy upgrades for APM and Synthetics
* Rework preconfiguration policy upgrade flow + report errors
* Fix type error in test
* Fix type errors + tests
* wip
* Remove keep policies up to date checks
* Remove references to KEEP_POLICIES_UP_TO_DATE_PACKAGES
* Move package policy upgrade results to nonFatalErrors
* Fix types
* Fix type error
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
A change in the ES range agg no longer accepts numbers with decimals if the underlying field is typed as long. This fixes the issue by rounding the values we pass on to the range agg.
Use new redux wrapper for control group management and upgrade all control group methods to use redux wrapper. Get order of controls from embeddable input, set up preconfigured story.
Co-authored-by: andreadelrio <delrio.andre@gmail.com>
* Remove extra source title from Personal dashboard
* Change button order to match other views
We typically have the right-most button the Save button and the reset button to the left
* Fix typo
* Fix failing test
EUI requires the name but we don’t want to dispaly it, so sending an empty string
* Remove Synchronization nav items from Custom Source
* Hide syncTriggerCallout for custom sources
* [ML] Using data views service for loading data views
* removing more saved object client uses
* removing IIndexPattern use
* removing IndexPattern use
* removing more depricated types
* fixing teste
* fixing index pattern loading
* tiny refactor
* fixing rollup index test
* changes based on review
* adding size to find calls
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>