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] Auto-bundle Detections API OpenAPI specs #186384

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

maximpn
Copy link
Contributor

@maximpn maximpn commented Jun 18, 2024

Addresses: #184428

Summary

This PR adds scripts for automatic bundling Detections API OpenAPI spec as a part of PR pipeline. Corresponding result bundles are automatically committed to x-pack/plugins/security_solution/docs/openapi/ess/ and x-pack/plugins/security_solution/docs/openapi/serverless folders.

@maximpn maximpn added docs Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team v8.15.0 labels Jun 18, 2024
@maximpn maximpn self-assigned this Jun 18, 2024
@maximpn maximpn marked this pull request as ready for review June 18, 2024 15:05
@maximpn maximpn requested review from a team as code owners June 18, 2024 15:05
@maximpn maximpn requested a review from dplumlee June 18, 2024 15:05
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@maximpn maximpn requested review from banderror and removed request for dplumlee June 18, 2024 15:06
@maximpn maximpn added the release_note:skip Skip the PR/issue when compiling release notes label Jun 18, 2024
Comment on lines 6 to +10
/api/detection_engine/rules/prepackaged/_status:
get:
operationId: GetPrebuiltRulesAndTimelinesStatus
x-labels: [ess]
x-codegen-enabled: true
operationId: GetPrebuiltRulesAndTimelinesStatus
Copy link
Contributor

@banderror banderror Jun 18, 2024

Choose a reason for hiding this comment

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

Is it because we're going to disable the legacy /api/detection_engine/rules/prepackaged endpoints in Serverless?

I don't think we have a ticket or todo list item for that, or even ever discussed this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. In general we discussed that deprecated API endpoints shouldn't be available in Serverless. It's not used by UI and is a good candidate to be excluded in Serverless.

x-pack/plugins/security_solution/scripts/openapi/bundle.js Outdated Show resolved Hide resolved
x-pack/plugins/security_solution/scripts/openapi/bundle.js Outdated Show resolved Hide resolved
x-pack/plugins/security_solution/scripts/openapi/bundle.js Outdated Show resolved Hide resolved
x-pack/plugins/security_solution/scripts/openapi/bundle.js Outdated Show resolved Hide resolved
x-pack/plugins/security_solution/scripts/openapi/bundle.js Outdated Show resolved Hide resolved
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.

Approving in advance, thank you @maximpn, LGTM 👍

@maximpn maximpn force-pushed the add-automatic-detections-api-bundling branch from 4e7bfed to aaa24e9 Compare June 18, 2024 18:56
@maximpn maximpn enabled auto-merge (squash) June 18, 2024 18:58
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

  • 💚 Build #216403 succeeded 4e7bfedca7b03b5439129d1b702d7f27665cf793

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

cc @maximpn

@maximpn maximpn merged commit 858ef15 into elastic:main Jun 18, 2024
44 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jun 18, 2024
@maximpn maximpn deleted the add-automatic-detections-api-bundling branch June 18, 2024 21:07
maximpn added a commit that referenced this pull request Jul 17, 2024
…188436)

**Addresses**: #184428
**Relates to**: #186384

## Summary

This PR enables Detections API OpenAPI bundling in build pipeline. It also fixes wrong references which weren't caught by the OpenAPI Linter and code generator.

For some reason #186384 didn't enable OpenAPI bundling by including `.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh` into `.buildkite/scripts/steps/checks.sh`.
maximpn added a commit that referenced this pull request Jul 18, 2024
**Addresses**: #184428

## Summary

This PR adds scripts for automatic bundling of Lists API OpenAPI specs as a part of PR pipeline. Corresponding resulting bundles are automatically committed in the Lists common package `kbn-securitysolution-lists-common` in the `docs/openapi/ess/` and `docs/openapi/serverless` folders (similar to #186384).
maximpn added a commit that referenced this pull request Jul 18, 2024
**Addresses**: #184428

## Summary

This PR adds scripts for automatic bundling of Exceptions API OpenAPI specs as a part of PR pipeline. Corresponding resulting bundles are automatically committed in the Lists common package `kbn-securitysolution-exceptions-common` in the `docs/openapi/ess/` and `docs/openapi/serverless` folders (similar to #186384).
maximpn added a commit that referenced this pull request Jul 24, 2024
…188985)

**Addresses**: #184428

## Summary

This PR adds scripts for automatic bundling of Entity Analytics API OpenAPI specs as a part of PR pipeline. Corresponding result bundles are automatically committed to the Security Solution plugin `x-pack/plugins/osquery` in the `docs/openapi/ess` and `docs/openapi/serverless` folders (similar to #186384).
maximpn added a commit that referenced this pull request Jul 24, 2024
**Addresses**: #184428

## Summary

This PR adds scripts for automatic bundling of AI Assistant API OpenAPI specs as a part of PR pipeline. Corresponding result bundles are automatically committed to the Assistant Common package `x-pack/packages/kbn-elastic-assistant-common` in the `docs/openapi/ess/` and `docs/openapi/serverless` folders (similar to #186384).
maximpn added a commit that referenced this pull request Jul 24, 2024
**Addresses**: #184428

## Summary

This PR adds scripts for automatic bundling of Osquery API OpenAPI specs as a part of PR pipeline. Corresponding result bundles are automatically committed to the Osquery plugin `x-pack/plugins/osquery` in the `docs/openapi/ess` and `docs/openapi/serverless` folders (similar to #186384).
janmonschke added a commit that referenced this pull request Jul 25, 2024
**Addresses**: #184428

## Summary

This PR adds scripts for automatic bundling of Timeline API OpenAPI
specs as a part of PR pipeline. Corresponding result bundles are
automatically committed to the Security Solution plugin
`x-pack/plugins/security_solution` in the `docs/openapi/ess/` and
`docs/openapi/serverless` folders (similar to
#186384).

---------

Co-authored-by: Jan Monschke <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
maximpn added a commit that referenced this pull request Jul 26, 2024
…#188853)

**Addresses**: #184428

## Summary

This PR adds scripts for automatic bundling of Endpoint Management API OpenAPI specs as a part of PR pipeline. Corresponding result bundles are automatically committed to the Security Solution plugin `x-pack/plugins/security_solution` in the `docs/openapi/ess/` and `docs/openapi/serverless` folders (similar to #186384).
maximpn added a commit that referenced this pull request Aug 2, 2024
…#189665)

**Addresses**: #184428

## Summary

This PR adds scripts for automatic bundling of Endpoint Exceptions API OpenAPI specs as a part of PR pipeline. Corresponding result bundles are automatically committed to the Endpoint Exceptions common package `kbn-securitysolution-endpoint-exceptions-common` in the `docs/openapi/ess/` and `docs/openapi/serverless` folders (similar to #186384).
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 docs 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