Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: improve support for ec2 instance workers
Problem: The PosixInstanceWorker and WindowsInstanceWorker classes implement a CMF Worker based on an ec2 host. In both cases they start with an empty AMI image (AL2023 or Win Server 2022) then set up users, install the agent, etc. Tests that need to use an AMI that already has users and the agent installed end up having to hack around a lot of assumptions in these classes, or reimplement everything for an ec2-based worker from scratch. Solution: Refactor the PosixInstanceWorker and WindowsInstanceWorker to split them into os-specific base classes that contain all of the generic worker implementation stuff (starting the worker, getting its id, etc), and a derived class that implements the user-setup, agent install, and the like. This makes space for tests that use an AMI with the users & agent pre-setup to derive from the os-specific base classes to get the generic ec2-worker test functionality. BREAKING CHANGE: PosixInstanceWorker has been renamed to PosixInstanceBuildWorker, and WindowsInstanceWorker has been renamed to WindowsInstanceBuildWorker. Signed-off-by: Daniel Neilson <53624638+ddneilson@users.noreply.github.com>
- Loading branch information