[AI4DSOC] Move AI4DSOC components from kbn-elastic-assistant to security_solution#219288
[AI4DSOC] Move AI4DSOC components from kbn-elastic-assistant to security_solution#219288stephmilovic merged 6 commits intoelastic:mainfrom
kbn-elastic-assistant to security_solution#219288Conversation
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
The root of the problem is that the AssistantContext is completely coupled to the security solution plugin, even though it existing in a package makes that seem like it's not the case. Should either be it's own plugin with a set of dependencies, or used only within security solution. This tight coupling has led to numerous issues I've heard of anecdotally, and one that got me, preventing some changes I was trying to make to security solution routes to help performance in #212808 . Hiding dependencies in a context (as also cases and some other plugins also do) is not a pattern we should use long term, leads to tons of issues like this, duplicated code, performance problems, etc. |
@kqualters-elastic yeah I get that but does something in this PR specifically bother you? Not sure this is the place for this discussion...? |
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
|
| import { useKibanaFeatureFlags } from '../use_kibana_feature_flags'; | ||
|
|
||
| interface Props { | ||
| alertIds?: string[]; |
There was a problem hiding this comment.
This PR is not tagged as being backported to 8.19, but consider backporting this change to simplify future backports and testing, (avoiding diverging implementations).
| } | ||
|
|
||
| const DEFAULT_PAGE = 1; // CAUTION: sever-side API uses a 1-based page index convention (for consistency with similar existing APIs) | ||
| const DEFAULT_PAGE = 1; // CAUTION: server-side API uses a 1-based page index convention (for consistency with similar existing APIs) |
There was a problem hiding this comment.
This PR is not tagged as being backported to 8.19, but consider backporting this change to simplify future backports and testing, (avoiding diverging implementations).
| const DEFAULT_PER_PAGE = 10; | ||
|
|
||
| export const useFindAttackDiscoveries = ({ | ||
| alertIds, |
There was a problem hiding this comment.
This PR is not tagged as being backported to 8.19, but consider backporting this change to simplify future backports and testing, (avoiding diverging implementations).
There was a problem hiding this comment.
I don't think we should backport this... Like @stephmilovic said above, we'd have to backport a bunch of PRs (24 to be exact) and I don't think it's a good idea...
There was a problem hiding this comment.
If we truly believe we should, I'll get started on backporting the PRs. Thankfully I kept most of them very targeted and with low impact on the rest of the code, but some of them will be more involved...
There was a problem hiding this comment.
The thing to keep in mind is many other PRs from other teams (outside of the 24 I linked above which are just for the alert summary work) have not been backported as well. So we'd have to sync with the rest of the group to make sure that we backport everything? Or you'd have a bunch of code in 8.19 that is untestable and it would make no sense... while also adding risk to break something in the process...
There was a problem hiding this comment.
Synced with Andrew over zoom. He just wants me to bring the changes to this specific file over to 8.19, since it exists there, in order to bring it up to speed with main. This is going to be a manual PR, not using the backport tool, so limited to the changes to this file. He wasn't suggesting we backport the whole PR, just the file changes. Sorry for the confusion @PhilippeOberti
There was a problem hiding this comment.
Haaaaaa that makes sense, all good then!! 😆
| method: 'GET', | ||
| version: API_VERSIONS.internal.v1, | ||
| query: { | ||
| alert_ids: alertIds, |
There was a problem hiding this comment.
This PR is not tagged as being backported to 8.19, but consider backporting this change to simplify future backports and testing, (avoiding diverging implementations).
| signal: abortController.current.signal, | ||
| }), | ||
| [ | ||
| alertIds, |
There was a problem hiding this comment.
This PR is not tagged as being backported to 8.19, but consider backporting this change to simplify future backports and testing, (avoiding diverging implementations).
| [ | ||
| 'GET', | ||
| ATTACK_DISCOVERY_FIND, | ||
| alertIds, |
There was a problem hiding this comment.
This PR is not tagged as being backported to 8.19, but consider backporting this change to simplify future backports and testing, (avoiding diverging implementations).
andrew-goldstein
left a comment
There was a problem hiding this comment.
Thanks @stephmilovic!
✅ Desk tested locally
LGTM
Summary
I made a bad call and put the AI4DSOC alert flyout components in
kbn-elastic-assistant. This PR corrects that mistake and moves the files tosecurity_solution.Waiting to merge until Tuesday to avoid being included in the demo build