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

fix!: delete workers from non-autoscaling fleets #124

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

moorec-aws
Copy link
Contributor

What was the problem/requirement? (What/Why)

non-autoscaling fleets workers are not deleted automatically from fleets. This causes errors when tests are run more than the amount of workers a fleet is allowed to launch.

What was the solution? (How)

  • Add autoscaling attribute to Fleet object.
  • When terminating an instances, if it is a non-autoscaling fleet, wait for the worker to be in a STOPPED state and then delete the worker from the fleet.

What is the impact of this change?

Allow the tests to run more than twice.

How was this change tested?

Tested using the Worker Agent tests.

Was this change documented?

No

Is this a breaking change?

Yes, changes the behaviour of how workers are stopped. We now pass a fleet object to the worker configuration instead of an id.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@moorec-aws moorec-aws requested a review from a team as a code owner July 3, 2024 17:28
@moorec-aws moorec-aws force-pushed the moorec/delete_worker branch from 71b04e1 to 6905655 Compare July 3, 2024 17:33
src/deadline_test_fixtures/deadline/worker.py Outdated Show resolved Hide resolved
src/deadline_test_fixtures/deadline/worker.py Outdated Show resolved Hide resolved
src/deadline_test_fixtures/deadline/worker.py Outdated Show resolved Hide resolved
src/deadline_test_fixtures/deadline/worker.py Outdated Show resolved Hide resolved
src/deadline_test_fixtures/deadline/worker.py Outdated Show resolved Hide resolved
@moorec-aws moorec-aws force-pushed the moorec/delete_worker branch from 6905655 to 95cf528 Compare July 4, 2024 14:25
@jusiskin jusiskin added the bug Something isn't working label Jul 4, 2024
src/deadline_test_fixtures/deadline/worker.py Outdated Show resolved Hide resolved
src/deadline_test_fixtures/deadline/worker.py Outdated Show resolved Hide resolved
test/unit/deadline/test_worker.py Outdated Show resolved Hide resolved
@moorec-aws moorec-aws force-pushed the moorec/delete_worker branch from 95cf528 to 2616f06 Compare July 4, 2024 17:50
Copy link
Contributor

@jusiskin jusiskin left a comment

Choose a reason for hiding this comment

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

Great job with the fix and improving the Worker class APIs 👍

@moorec-aws moorec-aws merged commit 1217b4b into aws-deadline:mainline Jul 4, 2024
12 checks passed
@moorec-aws moorec-aws deleted the moorec/delete_worker branch July 4, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants