kibana/x-pack/packages/ml
Kibana Machine 1147d386fb
[8.8] [ML] Reverting use of isPopulatedObject in error utils (#159913) (#159923)
# Backport

This will backport the following commits from `main` to `8.8`:
- [[ML] Reverting use of isPopulatedObject in error utils
(#159913)](https://github.com/elastic/kibana/pull/159913)

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

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

<!--BACKPORT [{"author":{"name":"James
Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2023-06-19T12:52:11Z","message":"[ML]
Reverting use of isPopulatedObject in error utils (#159913)\n\nPR
https://github.com/elastic/kibana/pull/155372 moved our error
utils\r\nto a package and also made a few small code changes, one of
which added\r\n`isPopulatedObject` to the error object type
guards.\r\n`isPopulatedObject` uses `Object.keys` under the hood which
cannot be\r\nused to access the non-enumerable properties of an object,
like
Error's\r\n`message`.\r\n\r\n\r\n![image](6a0269df-ca2a-494a-9364-8f35f2b52388)\r\n\r\nThis
PR reverts all of these functions back to their original
versions\r\nwhich had existed in ML for a while without
issue.\r\n\r\nThis was change had been causing error messages to not
display\r\ncorrectly.\r\n\r\n\r\n![image](243143a5-0c8f-4365-a41d-7c1c09858ad8)","sha":"8ca1789faa899f2e0a7abcf58fac50fa4d552af6","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","v8.9.0","v8.8.2"],"number":159913,"url":"https://github.com/elastic/kibana/pull/159913","mergeCommit":{"message":"[ML]
Reverting use of isPopulatedObject in error utils (#159913)\n\nPR
https://github.com/elastic/kibana/pull/155372 moved our error
utils\r\nto a package and also made a few small code changes, one of
which added\r\n`isPopulatedObject` to the error object type
guards.\r\n`isPopulatedObject` uses `Object.keys` under the hood which
cannot be\r\nused to access the non-enumerable properties of an object,
like
Error's\r\n`message`.\r\n\r\n\r\n![image](6a0269df-ca2a-494a-9364-8f35f2b52388)\r\n\r\nThis
PR reverts all of these functions back to their original
versions\r\nwhich had existed in ML for a while without
issue.\r\n\r\nThis was change had been causing error messages to not
display\r\ncorrectly.\r\n\r\n\r\n![image](243143a5-0c8f-4365-a41d-7c1c09858ad8)","sha":"8ca1789faa899f2e0a7abcf58fac50fa4d552af6"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/159913","number":159913,"mergeCommit":{"message":"[ML]
Reverting use of isPopulatedObject in error utils (#159913)\n\nPR
https://github.com/elastic/kibana/pull/155372 moved our error
utils\r\nto a package and also made a few small code changes, one of
which added\r\n`isPopulatedObject` to the error object type
guards.\r\n`isPopulatedObject` uses `Object.keys` under the hood which
cannot be\r\nused to access the non-enumerable properties of an object,
like
Error's\r\n`message`.\r\n\r\n\r\n![image](6a0269df-ca2a-494a-9364-8f35f2b52388)\r\n\r\nThis
PR reverts all of these functions back to their original
versions\r\nwhich had existed in ML for a while without
issue.\r\n\r\nThis was change had been causing error messages to not
display\r\ncorrectly.\r\n\r\n\r\n![image](243143a5-0c8f-4365-a41d-7c1c09858ad8)","sha":"8ca1789faa899f2e0a7abcf58fac50fa4d552af6"}},{"branch":"8.8","label":"v8.8.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: James Gowdy <jgowdy@elastic.co>
2023-06-19 06:59:40 -07:00
..
agg_utils Use Observability Page Template from Observability Shared in APM and Profiling (#154776) 2023-04-18 11:03:44 +02:00
aiops_components [ML] Explain Log Rate Spikes: Support to filter fields from grouping (#153864) 2023-04-11 20:24:27 +02:00
aiops_utils [ML] AIOps: Rename change point references in Explain Log Rate Spikes to significant term (#152597) 2023-03-08 10:35:58 +01:00
date_picker [8.8] [ML] AIOps: Change point detection fixes (#156481) (#156591) 2023-05-03 10:44:23 -07:00
error_utils [8.8] [ML] Reverting use of isPopulatedObject in error utils (#159913) (#159923) 2023-06-19 06:59:40 -07:00
is_defined [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
is_populated_object [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kibana_theme [8.8] [ML] Apply theme based on the User Profile settings (#158258) (#158442) 2023-05-25 05:02:10 -07:00
local_storage [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
nested_property [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
number_utils [ML] Creating number utils package for roundToDecimalPlace function (#154910) 2023-04-13 10:53:37 -07:00
query_utils [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
random_sampler_utils [ML] @kbn/ml-random-sampler-utils: Fix random sampler threshold (#154803) 2023-04-18 17:01:36 +02:00
route_utils [ML] AIOps: Adds execution context to client side data.search requests (#154891) 2023-04-19 15:51:31 +02:00
string_hash [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
trained_models_utils [8.8] [ML] Disable delete action for deployed models (#158533) (#158572) 2023-05-26 09:34:28 -07:00
url_state [ML] AIOps: Fix race condition where stale url state would reset search bar. (#154885) 2023-04-18 15:17:49 +02:00