feat(rca): refactor item registry and manage items using api#191288
feat(rca): refactor item registry and manage items using api#191288kdelemme merged 23 commits intoelastic:mainfrom
Conversation
|
/ci |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
| '@kbn/eslint/no_constructor_args_in_property_initializers': 'error', | ||
| '@kbn/eslint/no_this_in_property_initializers': 'error', | ||
| '@kbn/eslint/no_unsafe_console': 'error', | ||
| '@kbn/eslint/no_unsafe_js_yaml': 'error', |
There was a problem hiding this comment.
Can you try resetting your environment? I'm not able to reproduce the issue.
This was a recent change - although we may be able to remove it entirely with the upgrade to js-yaml4. @legrego @elena-shostak
There was a problem hiding this comment.
I did yarn kbn reset && yarn kbn bootstrap. Do you suggest another reset command?
There was a problem hiding this comment.
I removed node_modules/ and reset and now the error is gone, I'll remove this change. Sorry for the noise
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
andreadelrio
left a comment
There was a problem hiding this comment.
Design files changes LGTM. 1 *.scss file removed.
.buildkite/pipeline-resource-definitions/scripts/fix-location-collection.ts
Show resolved
Hide resolved
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: |
...ck/plugins/observability_solution/investigate_app/public/hooks/use_add_investigation_item.ts
Show resolved
Hide resolved
...plugins/observability_solution/investigate_app/public/hooks/use_delete_investigation_item.ts
Show resolved
Hide resolved
...plugins/observability_solution/investigate_app/public/items/esql_item/register_esql_item.tsx
Show resolved
Hide resolved
| title: suggestion.title, | ||
| type: ESQL_WIDGET_NAME, | ||
| parameters: { | ||
| type: 'esql', |
There was a problem hiding this comment.
Have you considered defining the different types in constants?
| }); | ||
| }) | ||
| ); | ||
| // new |
|
@thomasneirynck thanks for the shout-out — FWIW this is code in a plugin that isn't turned on for customers, and we're in a very exploratory phase right now, so I think we can merge this without any issues. I'll reach out and talk to you, @teresaalvarezsoler, and anyone else on your team to share more about what we're exploring and our plans for making sure we don't create weird overlap in the product. Thanks! |
TinaHeiligers
left a comment
There was a problem hiding this comment.
required bundles order rearrange LGTM
|
Hi all, thanks for giving us some time to catch up on the purpose and plans. As discussed off-thread with @jasonrhodes, @nreese, @teresaalvarezsoler
As for this PR specifically (and perhaps follow ons). It is merging into Thank you again for the patience and understanding. |
|
@thomasneirynck thanks for adding the summary of our conversation here. We're fully committed to making sure that if it becomes clear that the investigations / RCA project will rely on features that Kibana platform provides, we will be sure to make use of those features rather than duplicate them. One thing I'll add to your summary is that we should follow up soon with a list of concrete gaps that we already know exist in the embeddable framework and registry, so that we can begin conversations on how those might be addressed if and when we begin to adopt these platform features. I'll try to have us put this together soon and reach out to discuss. As for this PR and merging into main, thanks for your concerns there. We're largely happy with the process we use for prototyping new features, but the examples folder is an interesting idea that we'll look into for any new or potentially dangerous features that we may want to test in main, but that aren't as isolated from the rest of the application as this one is. Thanks, we'll talk soon! |

Resolves #191284
Summary
This PR refactors the item registry (formerly known as widget registry) in order to keep only the thing that we currently have a defined need for. When the need arise to know the schema, we will reintroduce it (needed for LLM) in the item definition.
The API for storing and retrieving investigation items is used by the investigation details page. Because investigation item types are not known in advance, the investigation item params is a
Record<string, any>. The type is known when registering the item.The current implementation for rendering the items might need some performance optimization (to be double check) in order to avoid re-rendering when adding/removing an item. At the moment, we have a simple render hook that takes the investigation items response and for each item, calls the
generate()followed by therender()method using the output of the first call.We also need to handle the time range changes, as well as sync this update with the API.
Testing
Create an investigation:
Then you can go to the investigation details page, and add items using data-forge for faking some data.