Skip to content
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

[8.8] [ML] Reverting use of isPopulatedObject in error utils (#159913) #159923

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.8:

Questions ?

Please refer to the Backport tool documentation

PR elastic#155372 moved our error utils
to a package and also made a few small code changes, one of which added
`isPopulatedObject` to the error object type guards.
`isPopulatedObject` uses `Object.keys` under the hood which cannot be
used to access the non-enumerable properties of an object, like Error's
`message`.

![image](https://github.com/elastic/kibana/assets/22172091/6a0269df-ca2a-494a-9364-8f35f2b52388)

This PR reverts all of these functions back to their original versions
which had existed in ML for a while without issue.

This was change had been causing error messages to not display
correctly.

![image](https://github.com/elastic/kibana/assets/22172091/1862f069-1626-4ac3-8961-dca016b91956)

vs

![image](https://github.com/elastic/kibana/assets/22172091/243143a5-0c8f-4365-a41d-7c1c09858ad8)

(cherry picked from commit 8ca1789)
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
@kbn/ml-error-utils 0 4 +4

Async chunks

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

id before after diff
aiops 792.7KB 792.6KB -41.0B
dataVisualizer 366.1KB 366.1KB -41.0B
ml 3.4MB 3.4MB -41.0B
synthetics 1.2MB 1.2MB +11.0B
transform 386.6KB 386.6KB -22.0B
total -134.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 17 19 +2
securitySolution 401 405 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 18 20 +2
securitySolution 481 485 +4
total +6

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

cc @jgowdyelastic

@kibanamachine kibanamachine merged commit 1147d38 into elastic:8.8 Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants