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] Remove remaining usage of rule_schema_legacy types #188079

Merged
merged 6 commits into from
Jul 22, 2024

Conversation

jpdjere
Copy link
Contributor

@jpdjere jpdjere commented Jul 11, 2024

Summary

Leftover work from #186615

  • Removes remaining usage of rule_schema_legacy types. In this PR, simply inlines the last io-ts types used, to be able to get rid of the legacy folder.
  • The remaining files that need to be migrated to using Zod schema types are:
    • x-pack/plugins/security_solution/common/api/detection_engine/rule_exceptions/find_exception_references/find_exception_references_route.ts
    • x-pack/plugins/security_solution/common/api/timeline/model/api.ts

For maintainers

@jpdjere jpdjere added refactoring 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 8.16 candidate labels Jul 11, 2024
@jpdjere jpdjere self-assigned this Jul 11, 2024
@jpdjere jpdjere marked this pull request as ready for review July 11, 2024 10:36
@jpdjere jpdjere requested review from a team as code owners July 11, 2024 10:36
@jpdjere jpdjere requested a review from dhurley14 July 11, 2024 10:36
@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)

@@ -15,12 +15,31 @@ import { Direction } from '../../../search_strategy';
import type { PinnedEvent } from '../pinned_events/pinned_events_route';
import { PinnedEventRuntimeType } from '../pinned_events/pinned_events_route';
// TODO https://github.com/elastic/security-team/issues/7491
Copy link
Contributor

Choose a reason for hiding this comment

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

And 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.

Same as above

@elasticmachine
Copy link
Contributor

elasticmachine commented Jul 18, 2024

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] Jest Integration Tests #2 / checking migration metadata changes on all registered SO types detecting all the settings that have opted-in for dynamic in-memory updates
  • [job] [logs] Jest Integration Tests #5 / checking migration metadata changes on all registered SO types detecting migration related changes in registered types
  • [job] [logs] Jest Integration Tests #5 / checking migration metadata changes on all registered SO types detecting migration related changes in registered types
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy Adding APM to a preconfigured agent policy after first setup Create a .fleet-policies document with the APM package policy
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy Adding APM to a preconfigured agent policy after first setup Create a .fleet-policies document with the APM package policy
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy Adding APM to a preconfigured agent policy after first setup Create correct package policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy Adding APM to a preconfigured agent policy after first setup Create correct package policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy Adding APM to a preconfigured agent policy after first setup Works and preconfigure correctly agent policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy Adding APM to a preconfigured agent policy after first setup Works and preconfigure correctly agent policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy Adding package policy id to a preconfigured package policy after first setup Create correct package policies and use the name of package policies instead of id
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy Adding package policy id to a preconfigured package policy after first setup Create correct package policies and use the name of package policies instead of id
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy Adding package policy id to a preconfigured package policy after first setup Works and preconfigure correctly agent policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy Adding package policy id to a preconfigured package policy after first setup Works and preconfigure correctly agent policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy Support removing a field from output after first setup Works and preconfigure correctly agent policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy Support removing a field from output after first setup Works and preconfigure correctly agent policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy With a full preconfigured cloud policy Create correct .fleet-policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy With a full preconfigured cloud policy Create correct .fleet-policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy With a full preconfigured cloud policy Create correct package policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy With a full preconfigured cloud policy Create correct package policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy With a full preconfigured cloud policy Works and preconfigure correctly agent policies
  • [job] [logs] Jest Integration Tests #7 / Fleet cloud preconfiguration Preconfigured cloud policy With a full preconfigured cloud policy Works and preconfigure correctly agent policies
  • [job] [logs] Jest Integration Tests #7 / Fleet preconfiguration reset Reset all policy Works and reset all preconfigured policies
  • [job] [logs] Jest Integration Tests #7 / Fleet preconfiguration reset Reset all policy Works and reset all preconfigured policies
  • [job] [logs] Jest Integration Tests #7 / Fleet preconfiguration reset Reset one preconfigured policy Works and reset one preconfigured policies if the policy is already deleted (with a ghost package policy)
  • [job] [logs] Jest Integration Tests #7 / Fleet preconfiguration reset Reset one preconfigured policy Works and reset one preconfigured policies if the policy is already deleted (with a ghost package policy)
  • [job] [logs] Jest Integration Tests #7 / Fleet preconfiguration reset Reset one preconfigured policy Works and reset one preconfigured policies if the policy was deleted with a preconfiguration deletion record
  • [job] [logs] Jest Integration Tests #7 / Fleet preconfiguration reset Reset one preconfigured policy Works and reset one preconfigured policies if the policy was deleted with a preconfiguration deletion record
  • [job] [logs] Jest Integration Tests #7 / Fleet preconfiguration reset Reset one preconfigured policy Works if the preconfigured policies already exists with a missing package policy
  • [job] [logs] Jest Integration Tests #7 / Fleet preconfiguration reset Reset one preconfigured policy Works if the preconfigured policies already exists with a missing package policy
  • [job] [logs] Jest Integration Tests #7 / Fleet preconfigured outputs Preconfigured outputs With a preconfigured monitoring output Should create a default output and the default preconfigured output
  • [job] [logs] Jest Integration Tests #7 / Fleet preconfigured outputs Preconfigured outputs With a preconfigured monitoring output Should create a default output and the default preconfigured output
  • [job] [logs] Jest Integration Tests #7 / Fleet setup preconfiguration with multiple instances Kibana preconfiguration setup sets up Fleet correctly when multiple Kibana instaces are started in serial
  • [job] [logs] Jest Integration Tests #7 / Fleet setup preconfiguration with multiple instances Kibana preconfiguration setup sets up Fleet correctly when multiple Kibana instaces are started in serial
  • [job] [logs] Jest Integration Tests #7 / Fleet setup preconfiguration with multiple instances Kibana preconfiguration setup sets up Fleet correctly when multiple Kibana instances are started at the same time
  • [job] [logs] Jest Integration Tests #7 / Fleet setup preconfiguration with multiple instances Kibana preconfiguration setup sets up Fleet correctly when multiple Kibana instances are started at the same time
  • [job] [logs] Jest Integration Tests #7 / Fleet setup preconfiguration with multiple instances Kibana preconfiguration setup sets up Fleet correctly with single Kibana instance
  • [job] [logs] Jest Integration Tests #7 / Fleet setup preconfiguration with multiple instances Kibana preconfiguration setup sets up Fleet correctly with single Kibana instance
  • [job] [logs] Jest Integration Tests #7 / fleet usage telemetry should fetch usage telemetry
  • [job] [logs] Jest Integration Tests #7 / fleet usage telemetry should fetch usage telemetry
  • [job] [logs] Jest Integration Tests #2 / getOutdatedDocumentsQuery creates a query returning the expected documents
  • [job] [logs] Jest Integration Tests #2 / Higher version doc conversion #bulkGet returns the documents with the correct shape
  • [job] [logs] Jest Integration Tests #2 / Higher version doc conversion #bulkResolve returns the documents with the correct shape
  • [job] [logs] Jest Integration Tests #2 / Higher version doc conversion #get returns the documents with the correct shape
  • [job] [logs] Jest Integration Tests #2 / Higher version doc conversion #resolve returns the documents with the correct shape
  • [job] [logs] FTR Configs #93 / Interactive setup APIs - Enrollment flow should be able to enroll with valid authentication code
  • [job] [logs] FTR Configs #93 / Interactive setup APIs - Enrollment flow should be able to enroll with valid authentication code
  • [job] [logs] FTR Configs #8 / Interactive setup APIs - Manual configuration flow should be able to configure with valid authentication code
  • [job] [logs] FTR Configs #8 / Interactive setup APIs - Manual configuration flow should be able to configure with valid authentication code
  • [job] [logs] FTR Configs #47 / Interactive setup APIs - Manual configuration flow without TLS should be able to configure with valid authentication code
  • [job] [logs] FTR Configs #47 / Interactive setup APIs - Manual configuration flow without TLS should be able to configure with valid authentication code
  • [job] [logs] FTR Configs #2 / Interactive Setup Functional Tests (Enrollment token) should configure Kibana successfully
  • [job] [logs] FTR Configs #2 / Interactive Setup Functional Tests (Enrollment token) should configure Kibana successfully
  • [job] [logs] FTR Configs #14 / Interactive Setup Functional Tests (Manual configuration without Security) should configure Kibana successfully
  • [job] [logs] FTR Configs #14 / Interactive Setup Functional Tests (Manual configuration without Security) should configure Kibana successfully
  • [job] [logs] FTR Configs #18 / Interactive Setup Functional Tests (Manual configuration without TLS) should configure Kibana successfully
  • [job] [logs] FTR Configs #18 / Interactive Setup Functional Tests (Manual configuration without TLS) should configure Kibana successfully
  • [job] [logs] FTR Configs #94 / Interactive Setup Functional Tests (Manual configuration) should configure Kibana successfully
  • [job] [logs] FTR Configs #94 / Interactive Setup Functional Tests (Manual configuration) should configure Kibana successfully
  • [job] [logs] Jest Integration Tests #2 / migration v2 - CHECK_TARGET_MAPPINGS is not run for new installations
  • [job] [logs] Jest Integration Tests #2 / migration v2 - CHECK_TARGET_MAPPINGS when the indices are aligned with the stack version skips UPDATE_TARGET_MAPPINGS_PROPERTIES if there are no changes in the mappings
  • [job] [logs] Jest Integration Tests #2 / migration v2 - CHECK_TARGET_MAPPINGS when upgrading to a newer stack version runs UPDATE_TARGET_MAPPINGS_PROPERTIES when mappings have changed
  • [job] [logs] Jest Integration Tests #2 / migration v2 clean ups if migration fails
  • [job] [logs] Jest Integration Tests #2 / migration v2 completes the migration even when a full batch would exceed ES http.max_content_length
  • [job] [logs] Jest Integration Tests #2 / migration v2 fails with a descriptive message when a single document exceeds maxBatchSizeBytes
  • [job] [logs] Jest Integration Tests #2 / migration v2 fails with a descriptive message when maxBatchSizeBytes exceeds ES http.max_content_length
  • [job] [logs] Jest Integration Tests #2 / migration v2 migrates the documents to the highest version
  • [job] [logs] Jest Integration Tests #2 / migration v2 with corrupt saved object documents collects corrupt saved object documents across batches
  • [job] [logs] Jest Integration Tests #5 / split .kibana index into multiple system indices failure cases when the .kibana migrator fails on the CLONE_TEMP_TO_TARGET state is capable of successfully performing the split migration in subsequent restart
  • [job] [logs] Jest Integration Tests #5 / split .kibana index into multiple system indices failure cases when the .kibana migrator fails on the CLONE_TEMP_TO_TARGET state is capable of successfully performing the split migration in subsequent restart
  • [job] [logs] Jest Integration Tests #5 / split .kibana index into multiple system indices failure cases when the .kibana migrator fails on the REINDEX_SOURCE_TO_TEMP_INDEX_BULK state is capable of successfully performing the split migration in subsequent restart
  • [job] [logs] Jest Integration Tests #5 / split .kibana index into multiple system indices failure cases when the .kibana migrator fails on the REINDEX_SOURCE_TO_TEMP_INDEX_BULK state is capable of successfully performing the split migration in subsequent restart
  • [job] [logs] Jest Integration Tests #5 / split .kibana index into multiple system indices failure cases when the .kibana migrator fails on the UPDATE_TARGET_MAPPINGS_PROPERTIES state is capable of successfully performing the split migration in subsequent restart
  • [job] [logs] Jest Integration Tests #5 / split .kibana index into multiple system indices failure cases when the .kibana migrator fails on the UPDATE_TARGET_MAPPINGS_PROPERTIES state is capable of successfully performing the split migration in subsequent restart
  • [job] [logs] Jest Integration Tests #5 / split .kibana index into multiple system indices failure cases when the .kibana_analytics migrator fails on the CLONE_TEMP_TO_TARGET state is capable of successfully performing the split migration in subsequent restart
  • [job] [logs] Jest Integration Tests #5 / split .kibana index into multiple system indices failure cases when the .kibana_analytics migrator fails on the CLONE_TEMP_TO_TARGET state is capable of successfully performing the split migration in subsequent restart
  • [job] [logs] Jest Integration Tests #5 / split .kibana index into multiple system indices failure cases when the .kibana_analytics migrator fails on the UPDATE_TARGET_MAPPINGS_PROPERTIES state is capable of successfully performing the split migration in subsequent restart
  • [job] [logs] Jest Integration Tests #5 / split .kibana index into multiple system indices failure cases when the .kibana_analytics migrator fails on the UPDATE_TARGET_MAPPINGS_PROPERTIES state is capable of successfully performing the split migration in subsequent restart
  • [job] [logs] Jest Integration Tests #5 / split .kibana index into multiple system indices failure cases when the .kibana_task_manager migrator fails on the TRANSFORMED_DOCUMENTS_BULK_INDEX state, after the other ones have finished is capable of completing the .kibana_task_manager migration in subsequent restart
  • [job] [logs] Jest Integration Tests #5 / split .kibana index into multiple system indices failure cases when the .kibana_task_manager migrator fails on the TRANSFORMED_DOCUMENTS_BULK_INDEX state, after the other ones have finished is capable of completing the .kibana_task_manager migration in subsequent restart
  • [job] [logs] Jest Integration Tests #6 / split .kibana index into multiple system indices when migrating from a legacy version performs v1 migration and then relocates saved objects into different indices, depending on their types
  • [job] [logs] Jest Integration Tests #6 / split .kibana index into multiple system indices when migrating from a legacy version performs v1 migration and then relocates saved objects into different indices, depending on their types
  • [job] [logs] Jest Integration Tests #6 / split .kibana index into multiple system indices when multiple Kibana migrators run in parallel correctly migrates 7.7.2_xpack_100k_obj.zip archive
  • [job] [logs] Jest Integration Tests #6 / split .kibana index into multiple system indices when multiple Kibana migrators run in parallel correctly migrates 7.7.2_xpack_100k_obj.zip archive
  • [job] [logs] Jest Tests #4 / Timeline esql tab existing esql query is present should not show the esql tab when the esql is disabled by the feature flag
  • [job] [logs] Jest Tests #4 / Timeline esql tab existing esql query is present should not show the esql tab when the esql is disabled by the feature flag
  • [job] [logs] Jest Tests #4 / Timeline esql tab existing esql query is present should show the esql tab when the advanced setting is disabled
  • [job] [logs] Jest Tests #4 / Timeline esql tab existing esql query is present should show the esql tab when the advanced setting is disabled
  • [job] [logs] Jest Tests #4 / Timeline esql tab no existing esql query is present should not show the esql tab when the advanced setting is disabled
  • [job] [logs] Jest Tests #4 / Timeline esql tab no existing esql query is present should not show the esql tab when the advanced setting is disabled
  • [job] [logs] Jest Tests #4 / Timeline esql tab no existing esql query is present should not show the esql tab when the esql is disabled by feature flag
  • [job] [logs] Jest Tests #4 / Timeline esql tab no existing esql query is present should not show the esql tab when the esql is disabled by feature flag
  • [job] [logs] Jest Integration Tests #7 / upgrade agent policy schema version with package installed with outdated schema version should correctly upgrade schema version
  • [job] [logs] Jest Integration Tests #7 / upgrade agent policy schema version with package installed with outdated schema version should correctly upgrade schema version
  • [job] [logs] Jest Integration Tests #7 / Uprade package install version with package installed with a previous format install version should upgrade package install version for outdated packages
  • [job] [logs] Jest Integration Tests #7 / Uprade package install version with package installed with a previous format install version should upgrade package install version for outdated packages
  • [job] [logs] Jest Integration Tests #2 / ZDT upgrades - introducing a new SO type should support adding the bar type
  • [job] [logs] Jest Integration Tests #2 / ZDT upgrades - introducing new root fields should support adding the new root fields
  • [job] [logs] Jest Integration Tests #2 / ZDT upgrades - switching from v2 algorithm when switching from a compatible version it able to re-use a cluster state from the v2 algorithm
  • [job] [logs] Jest Integration Tests #2 / ZDT upgrades - switching from v2 algorithm when switching from an incompatible version fails and throws an explicit error
  • [job] [logs] Jest Integration Tests #2 / ZDT with v2 compat - recovering from partially migrated state migrates the documents

History

cc @jpdjere

@jpdjere jpdjere enabled auto-merge (squash) July 22, 2024 16:13
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 5638 5636 -2

Async chunks

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

id before after diff
securitySolution 17.3MB 17.3MB +269.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 542 540 -2

Total ESLint disabled count

id before after diff
securitySolution 626 624 -2

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

cc @jpdjere

@jpdjere jpdjere merged commit 0c5d7b9 into elastic:main Jul 22, 2024
41 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 22, 2024
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 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.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants