Skip to content

[Security Solution][Investigations][Tech Debt] - Remove duplicated types #123612

Open

Description

Note this Issue should await new Alert Table implementation

Background:

There is currently duplicated code that exists within both the timelines plugin and the security solution. Most of this duplicated code can be found in the common folder of the timelines plugin. There is an upcoming migration of the alert table(timelines plugin) #123310 that both security solution and the observability teams would be able to use. Depending on the decisions made there, it would make sense to either wholesale delete this directory in favor of the shared table use across all of security_solution or migrate the table back to security_solution for non-alert views then delete the timelines plugin afterwards.

If the second route is taken, individual tickets should be created for each of the bullets below. No deletions should take place till the final step

  • Note Additions have been made to the commons/ folder within security_solution since the timelines plugin was created, so there may not be a one to one relationship still.

Tasks

These tasks are broken down in a way that, ideally, should allow code to be merged to main in reasonable steps with digestible PR sizes without breaking existing functionality until the components are finally moved at the end.

  • Migrate commons folder back to security_solution

    1. Add tests for any untouched files in these folders
    2. Migrate following files with tests
      • timelines/common
        • /ecs
        • /search_strategy
        • /types
        • /utils
        • constats.ts
        • index.ts
        • typed_json.ts
        • utility_types.ts
      • timelines/public/mock
  • Migrate any server API calls back to security_solution

    1. Add tests for any untouched files in these folders
    2. Migrate following files with tests
      • timelines/server
  • Migrate any necessary UI API calls back to security_solution

    1. Add tests for any untouched files in these folders
    2. Migrate following files with tests
      • timelines/public/container
  • Migrate any necessary hooks and methods back to security_solution

    1. Add tests for any untouched files in these folders
    2. Migrate following files with tests
      • timelines/public
        • /hooks
        • /methods
  • Migrate the redux store back to security_solution

    1. Add tests for any untouched files in these folders
    2. Migrate following files with tests
      • timelines/public/store
  • Migrate the visual components back to security_solution

    1. Add tests for any untouched files in these folders
    2. Migrate following files with tests
      • timelines/public/assets
      • timelines/public/components
  • Remove the timelines plugin This will need to wait on the new Alert Table being created

    1. Confirm no other team is utilizing the Timelines plugin.
    2. Select file and hit delete 😂 🎉

Acceptance Criteria

  • Untested code paths touched should have code added (Unit at a bare minimum, integration where necessary)
  • Existing functionality prior to code removal should remain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

Team:Threat HuntingSecurity Solution Threat Hunting TeamTeam:Threat Hunting:InvestigationsSecurity Solution Investigations Teamtechnical debtImprovement of the software architecture and operational architecture

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions