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

[Security Solution] DetectionRulesClient: various refactorings #184954

Merged
merged 4 commits into from
Jun 7, 2024

Conversation

nikitaindik
Copy link
Contributor

@nikitaindik nikitaindik commented Jun 6, 2024

Partially addresses: #184364

Summary

This PR contains various smaller-scale refactorings for the recently added DetectionsRuleClient.

Changes:

  • Renamed DetectionRulesClient containing directory from rule_management to detection_rules_client
  • Moved DetectionRulesClient methods into the detection_rules_client/methods dir
  • Moved the TS interface of DetectionRulesClient into a separate file detection_rules_client_interface.ts
  • Simplified importRule method parameters
  • Added memoization to getDetectionRulesClient

@nikitaindik nikitaindik added refactoring release_note:skip Skip the PR/issue when compiling release notes Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Rule Management Security Solution Detection Rule Management Team:Detection Rule Management Security Detection Rule Management Team v8.15.0 labels Jun 6, 2024
@nikitaindik nikitaindik self-assigned this Jun 6, 2024
@nikitaindik
Copy link
Contributor Author

/ci

@nikitaindik nikitaindik force-pushed the detection-rules-client-refactor branch 2 times, most recently from d9d33a5 to 63ecace Compare June 7, 2024 15:39
@nikitaindik
Copy link
Contributor Author

/ci

@nikitaindik
Copy link
Contributor Author

/ci

@nikitaindik nikitaindik marked this pull request as ready for review June 7, 2024 16:51
@nikitaindik nikitaindik requested review from a team as code owners June 7, 2024 16:51
@nikitaindik nikitaindik requested a review from e40pud June 7, 2024 16:51
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@nikitaindik nikitaindik requested a review from maximpn June 7, 2024 16:51
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@nikitaindik nikitaindik requested review from banderror and removed request for maximpn June 7, 2024 17:06
Copy link
Contributor

@banderror banderror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice and straightforward changes @nikitaindik 😉 Let's ship it! 🚢

…ule_management/logic/detection_rules_client/detection_rules_client.ts


🤦 Copy-pasted typo fix

Co-authored-by: Georgii Gorbachev <[email protected]>
Copy link
Contributor

@rylnd rylnd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Detection engine changes LGTM!

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @nikitaindik

@banderror banderror merged commit 41c34e0 into elastic:main Jun 7, 2024
35 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jun 7, 2024
eokoneyo pushed a commit to eokoneyo/kibana that referenced this pull request Jun 13, 2024
…stic#184954)

**Partially addresses: elastic#184364

## Summary
This PR contains various smaller-scale refactorings for the recently
added `DetectionsRuleClient`.

**Changes**:
- Renamed `DetectionRulesClient` containing directory from
`rule_management` to `detection_rules_client`
- Moved `DetectionRulesClient` methods into the
`detection_rules_client/methods` dir
- Moved the TS interface of `DetectionRulesClient` into a separate file
`detection_rules_client_interface.ts`
- Simplified `importRule` method parameters
- Added memoization to `getDetectionRulesClient`

---------

Co-authored-by: Georgii Gorbachev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Rule Management Security Solution Detection Rule Management refactoring release_note:skip Skip the PR/issue when compiling release notes Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants