fix!: improved exception handling when instance startup fails#189
Merged
moorec-aws merged 1 commit intoaws-deadline:mainlinefrom May 9, 2025
Merged
Conversation
368851c to
465591e
Compare
jericht
previously approved these changes
May 8, 2025
jusiskin
suggested changes
May 9, 2025
465591e to
cf95082
Compare
Signed-off-by: Charles Moore <122481442+moorec-aws@users.noreply.github.com>
cf95082 to
639e2d9
Compare
|
jericht
approved these changes
May 9, 2025
jusiskin
approved these changes
May 9, 2025
Merged
Merged
This file contains hidden or 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
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 an instance startup fails, and cleanup is run, we attempt to cleanup the worker. The worker does not exist if instance startup failed which results in a lot of worker cleanup errors making the test logs difficult to parse for the root cause.
What was the solution? (How)
We no longer attempt stop the worker agent if a worker id does not exist. Added a InstanceStartupError exception class that will print diagnostics for the instance failure to help determine the cause. Added a method for collecting information about the instance.
What is the impact of this change?
Removes cleanup errors and provides better diagnostics for instance startup failures.
How was this change tested?
I ran a developer version of the test fixtures package against the deadline-cloud-worker-agent e2e tests and confirmed tests passed.
To replicate a failure case I reduced the the instance running waiting to
WaiterConfig={"Delay": 2, "MaxAttempts": 5}to reproduce the exception and confirmed that an error was produced, diagnostics were recorded and that the instance was terminated without attempting to stop the worker:Was this change documented?
No
Is this a breaking change?
Yes, we are making a new api call to collect instance information.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.