feat: Add configurable timeout lengths to send_command#186
Merged
miabatta merged 1 commit intoaws-deadline:mainlinefrom Apr 22, 2025
Merged
feat: Add configurable timeout lengths to send_command#186miabatta merged 1 commit intoaws-deadline:mainlinefrom
miabatta merged 1 commit intoaws-deadline:mainlinefrom
Conversation
moorec-aws
previously approved these changes
Apr 22, 2025
jusiskin
suggested changes
Apr 22, 2025
| InstanceId=self.instance_id, | ||
| CommandId=command_id, | ||
| WaiterConfig={"Delay": 5, "MaxAttempts": 30}, | ||
| WaiterConfig={"Delay": 5, "MaxAttempts": 36}, |
Contributor
There was a problem hiding this comment.
This would increase the timeout for SSM commands run by all tests. Increasing this could push our tests to run longer - especially in the case where the worker is unresponsive and increasing the time until these commands can fail.
I wonder if it would be better to make the waiter config an optional parameter to the send_command method. Then each caller can adjust the timeouts based on the command being run.
What do you think?
Contributor
Author
There was a problem hiding this comment.
Hadn't thought of that but I like the idea. I'll revise the PR to add this in! Thanks.
Signed-off-by: Mia Battad <133708990+miabatta@users.noreply.github.com>
|
moorec-aws
approved these changes
Apr 22, 2025
jusiskin
approved these changes
Apr 22, 2025
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)
SSM commands to the worker are set to time out after 2.5 minutes (30 attempts with 5 seconds in between). In practice, these commands can take in the neighbourhood of 2 minutes and a bit to run; we suspect some of these commands are timing out and producing errors during worker agent test cases' setup.
What was the solution? (How)
ssm_waiter_configparameter tosend_commandso individual functions can customize how long their timeouts areget_worker_id()on Windows workers, where we saw failuresWhat is the impact of this change?
More robust tests.
How was this change tested?
Ran unit tests
Was this change documented?
n/a
Is this a breaking change?
No
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.