Skip to content

[Serverless] #7099 Move install prepackaged timelines schema#162314

Merged
lgestc merged 5 commits intoelastic:mainfrom
lgestc:move_prepackaged_timelines_schema
Jul 25, 2023
Merged

[Serverless] #7099 Move install prepackaged timelines schema#162314
lgestc merged 5 commits intoelastic:mainfrom
lgestc:move_prepackaged_timelines_schema

Conversation

@lgestc
Copy link
Contributor

@lgestc lgestc commented Jul 20, 2023

Summary

This PR moves the last remaining timeline api schema to a common location as per https://github.com/elastic/security-team/issues/7099

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@lgestc lgestc added backport:skip This PR does not require backporting Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team 8.10 candidate labels Jul 20, 2023
@lgestc lgestc requested review from a team as code owners July 20, 2023 11:07
@lgestc lgestc requested a review from banderror July 20, 2023 11:07
@lgestc lgestc added the release_note:skip Skip the PR/issue when compiling release notes label Jul 20, 2023
import { unionWithNullType } from '../../../utility_types';
import { ImportTimelinesSchemaRt, TimelineSavedToReturnObjectRuntimeType } from '..';

export const checkTimelineStatusRt = rt.type({
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it's better to rename it to checkPrepackagedTimelines or checkImportTimelines or something a little bit more specific.

Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

Thanks for making this change so quickly!

@lgestc lgestc enabled auto-merge (squash) July 25, 2023 16:30
@banderror
Copy link
Contributor

@elasticmachine merge upstream

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.

Rule Management changes LGTM, thanks @lgestc 👍

The only change relevant to us was in the x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts file. However, in the GH UI it was showing me 3 files (out of 5 files changed in this PR) that I was supposed to own: Only files owned by you (3). Running node ./code-owners.js 162314 showed this:

## Files by Code Owner

### elastic/security-detection-rule-management

* x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts

### elastic/security-solution

* x-pack/plugins/security_solution/common/api/timeline/index.ts
* x-pack/plugins/security_solution/common/api/timeline/install_prepackaged_timelines/install_prepackaged_timelines.ts
* x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts
* x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.ts
* x-pack/plugins/security_solution/server/lib/timeline/utils/check_timelines_status.ts

### elastic/security-threat-hunting-investigations

* x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.ts
* x-pack/plugins/security_solution/server/lib/timeline/utils/check_timelines_status.ts

@lgestc @michaelolo24 Can we please update the CODEOWNERS file to assign the Investigations team to the x-pack/plugins/security_solution/common/api/timeline folder? I believe it's not assigned which can generate unnecessary code owner review requests.

@lgestc lgestc merged commit 586afe9 into elastic:main Jul 25, 2023
@kibana-ci
Copy link

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Investigations - Security Solution Tests #3 / Alert details expandable flyout right panel overview tab insights section should display threat intelligence section should display threat intelligence section

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 4321 4322 +1

Async chunks

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

id before after diff
securitySolution 15.6MB 15.6MB +848.0B

History

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

cc @lgestc

ThomThomson pushed a commit to ThomThomson/kibana that referenced this pull request Aug 1, 2023
…lastic#162314)

## Summary

This PR moves the last remaining timeline api schema to a common
location as per elastic/security-team#7099

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
marshallmain added a commit that referenced this pull request Aug 9, 2023
…api (#162857)

Closes elastic/security-team#7099
Follow up to #162314

I mislabeled 3 timeline-related internal APIs as detection engine APIs
on [this
spreadsheet](https://docs.google.com/spreadsheets/d/1VCoJ74EkyGuj59VwWj_3v2ecB84pNCpzGqkYnS0SUKw/edit?pli=1#gid=1102015677)
(create_tags, get_tags_by_name, get_dashboards_by_tags). The APIs are
now correctly categorized on the spreadsheet and this PR establishes
schemas for them in `/common/api`.

I also converted these 3 small schemas to io-ts to make it easier to
avoid pulling in `@kbn/config-schema` to `public`, as that increased the
async chunk size by a full 840KB.
bryce-b pushed a commit to bryce-b/kibana that referenced this pull request Aug 9, 2023
…api (elastic#162857)

Closes elastic/security-team#7099
Follow up to elastic#162314

I mislabeled 3 timeline-related internal APIs as detection engine APIs
on [this
spreadsheet](https://docs.google.com/spreadsheets/d/1VCoJ74EkyGuj59VwWj_3v2ecB84pNCpzGqkYnS0SUKw/edit?pli=1#gid=1102015677)
(create_tags, get_tags_by_name, get_dashboards_by_tags). The APIs are
now correctly categorized on the spreadsheet and this PR establishes
schemas for them in `/common/api`.

I also converted these 3 small schemas to io-ts to make it easier to
avoid pulling in `@kbn/config-schema` to `public`, as that increased the
async chunk size by a full 840KB.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.10 candidate backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team v8.10.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants