Skip to content

feat: Add configurable timeout lengths to send_command#186

Merged
miabatta merged 1 commit intoaws-deadline:mainlinefrom
miabatta:mainline
Apr 22, 2025
Merged

feat: Add configurable timeout lengths to send_command#186
miabatta merged 1 commit intoaws-deadline:mainlinefrom
miabatta:mainline

Conversation

@miabatta
Copy link
Contributor

@miabatta miabatta commented Apr 22, 2025

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)

  • Added an optional ssm_waiter_config parameter to send_command so individual functions can customize how long their timeouts are
  • Increased the number of attempts to 36 for get_worker_id() on Windows workers, where we saw failures

What 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.

@miabatta miabatta requested a review from a team as a code owner April 22, 2025 18:57
moorec-aws
moorec-aws previously approved these changes Apr 22, 2025
InstanceId=self.instance_id,
CommandId=command_id,
WaiterConfig={"Delay": 5, "MaxAttempts": 30},
WaiterConfig={"Delay": 5, "MaxAttempts": 36},
Copy link
Contributor

@jusiskin jusiskin Apr 22, 2025

Choose a reason for hiding this comment

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

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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>
@miabatta miabatta changed the title chore: Increase SSM waiter timeout from 2.5 to 3 minutes feat: Add configurable timeout lengths to send_command Apr 22, 2025
@sonarqubecloud
Copy link

@miabatta miabatta merged commit 18c533b into aws-deadline:mainline Apr 22, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants