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

[SIEM] 7.7. NP Cleanup #61713

Merged
merged 4 commits into from
Mar 30, 2020
Merged

[SIEM] 7.7. NP Cleanup #61713

merged 4 commits into from
Mar 30, 2020

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Mar 28, 2020

Summary

A few housekeeping tasks following NP changes made since 7.6.

  • Removes unused Legacy types
  • Declares siemClient as optional for other plugins (as siem may be disabled)
    • Returns a 404 if unavailable within SIEM
    • Removes redundant guards in routes

For maintainers

@rylnd rylnd added Team:SIEM v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v7.8.0 labels Mar 28, 2020
@rylnd rylnd requested a review from FrankHassanabad March 28, 2020 00:39
@rylnd rylnd self-assigned this Mar 28, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

rylnd added 4 commits March 29, 2020 17:50
These were migrated to NP in a previous PR.
If a plugin does not have siem enabled, they won't get our client.

While it seems unlikely to be in a situation where our routes are being
hit but our client is unavailable, we will return a 404 in that case,
similar to the unavailability of actions/alerting.

This also removes some redundant checks on action/alerting clients.
In general, we use optional chaining to ignore any intermediate null
values, and defer checks to our actual dependencies, e.g. alertsClient
or siemClient.
@rylnd rylnd force-pushed the siem_np_cleanup branch from bfd8a30 to 572f26d Compare March 29, 2020 22:50
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

  • 💚 Build #36963 succeeded bfd8a30f81e5d599ae3d9232f762d07c8fc8c611

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

@rylnd rylnd marked this pull request as ready for review March 30, 2020 14:14
@rylnd rylnd requested a review from a team as a code owner March 30, 2020 14:14
Copy link
Contributor

@FrankHassanabad FrankHassanabad left a comment

Choose a reason for hiding this comment

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

LGTM

@rylnd rylnd merged commit 9ff8be6 into elastic:master Mar 30, 2020
@rylnd rylnd deleted the siem_np_cleanup branch March 30, 2020 20:12
rylnd added a commit to rylnd/kibana that referenced this pull request Mar 30, 2020
* Remove unused legacy services

These were migrated to NP in a previous PR.

* Remove unused legacy request types

* Type our siem client as optional

If a plugin does not have siem enabled, they won't get our client.

While it seems unlikely to be in a situation where our routes are being
hit but our client is unavailable, we will return a 404 in that case,
similar to the unavailability of actions/alerting.

This also removes some redundant checks on action/alerting clients.

* Remove more redundant dependency checks

In general, we use optional chaining to ignore any intermediate null
values, and defer checks to our actual dependencies, e.g. alertsClient
or siemClient.
rylnd added a commit that referenced this pull request Mar 31, 2020
* Remove unused legacy services

These were migrated to NP in a previous PR.

* Remove unused legacy request types

* Type our siem client as optional

If a plugin does not have siem enabled, they won't get our client.

While it seems unlikely to be in a situation where our routes are being
hit but our client is unavailable, we will return a 404 in that case,
similar to the unavailability of actions/alerting.

This also removes some redundant checks on action/alerting clients.

* Remove more redundant dependency checks

In general, we use optional chaining to ignore any intermediate null
values, and defer checks to our actual dependencies, e.g. alertsClient
or siemClient.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
rylnd added a commit that referenced this pull request Mar 31, 2020
* Remove unused legacy services

These were migrated to NP in a previous PR.

* Remove unused legacy request types

* Type our siem client as optional

If a plugin does not have siem enabled, they won't get our client.

While it seems unlikely to be in a situation where our routes are being
hit but our client is unavailable, we will return a 404 in that case,
similar to the unavailability of actions/alerting.

This also removes some redundant checks on action/alerting clients.

* Remove more redundant dependency checks

In general, we use optional chaining to ignore any intermediate null
values, and defer checks to our actual dependencies, e.g. alertsClient
or siemClient.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Sep 23, 2021
@elasticmachine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.7.0 v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants