-
Notifications
You must be signed in to change notification settings - Fork 13
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
refactor: Refactoring EC2InstanceWorker to split out PosixInstanceWorker and WindowsInstanceWorker #125
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
moorec-aws
previously approved these changes
Jul 4, 2024
This is reported as a breaking change in the PR description but does not indicate so in the PR/commit title according to conventional commits. I recommend using the title and footer style. This has the benefits of both:
|
jusiskin
previously requested changes
Jul 4, 2024
ttblanchard
force-pushed
the
refactor
branch
2 times, most recently
from
July 10, 2024 19:41
97b7def
to
8936620
Compare
ddneilson
requested changes
Jul 11, 2024
…rker and WindowsInstanceWorker BREAKING CHANGE: EC2InstanceWorker can no longer be instanciated, use WindowsInstanceWorker or PosixInstanceWorker instead. Signed-off-by: Trevor Blanchard <55503092+ttblanchard@users.noreply.github.com>
ddneilson
approved these changes
Jul 15, 2024
moorec-aws
approved these changes
Jul 15, 2024
ttblanchard
dismissed
jusiskin’s stale review
July 15, 2024 15:55
Changes have been addressed and others have followed up with reviews of their own.
Merged
This was referenced Jul 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was the problem/requirement? (What/Why)
When we added the ability to support Windows workers we didn't use proper abstractions and ended up with a whole lot of code that does checks like this:
This is hard to maintain, read, and extend.
There were also some minor bugs discovered in the windows worker fixture implementation that were fixed as part of this change.
What was the solution? (How)
Make EC2InstanceWorker an abstract class with two concrete classes PosixInstanceWorker and WindowsInstanceWorker which inherit from the EC2InstanceWorker allowing us to remove all the branching code.
What is the impact of this change?
More readable and maintainable test fixtures.
How was this change tested?
I tested with a custom AMI with the worker agent installed - submitting jobs using both windows and linux workers.
Was this change documented?
No
Is this a breaking change?
Yes - libraries that use this package will need to update their tests to explicitly use either PosixInstanceWorker or WindowsInstanceWorker.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.