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
- Add tests for any untouched files in these folders
- 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
- timelines/common
-
Migrate any server API calls back to security_solution
- Add tests for any untouched files in these folders
- Migrate following files with tests
- timelines/server
-
Migrate any necessary UI API calls back to security_solution
- Add tests for any untouched files in these folders
- Migrate following files with tests
- timelines/public/container
-
Migrate any necessary hooks and methods back to security_solution
- Add tests for any untouched files in these folders
- Migrate following files with tests
- timelines/public
- /hooks
- /methods
- timelines/public
-
Migrate the redux store back to security_solution
- Add tests for any untouched files in these folders
- Migrate following files with tests
- timelines/public/store
-
Migrate the visual components back to security_solution
- Add tests for any untouched files in these folders
- Migrate following files with tests
- timelines/public/assets
- timelines/public/components
-
Remove the timelines pluginThis will need to wait on the new Alert Table being created- Confirm no other team is utilizing the Timelines plugin.
- 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