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
EC2 Waiter waitUntilInstanceRunning
Hanging When DescribeInstancesRequest
Empty
#5095
Comments
Hi @Petersoj, Thank you for reporting the issue. I am able to reproduce the scenario. I will take this forward to discuss with the Java SDK team. Regards, |
@bhoradc that's great to hear. |
Yes, that makes sense. Thanks for mentioning it though. Regards, |
Hi @Petersoj, This happens to be an expected behaviour with the The If you want to independently filter out for Please let me know if that helps or if you have further queries. Regards, |
Thanks for the info. I understand this is expected behavior, but my objective with this issue is to show how this behavior seems unintuitive and should be changed as noted in my original post. |
Describe the bug
The following code hangs indefinitely when there are no
pending
EC2 instances and onlyrunning
EC2 instances. Adding bothpending
andrunning
to the filter works properly, but intuitively, it seems like whenDescribeInstancesRequest
returns no instances, the waiter should return or fail, not wait indefinitely.Expected Behavior
The
waitUntilInstanceRunning
call to return immediately when theDescribeInstancesRequest
yields no instances.Current Behavior
The
waitUntilInstanceRunning
call with the aforementionedDescribeInstancesRequest
andrunning
EC2 instance states hangs and waits indefinitely.Reproduction Steps
See description.
Possible Solution
When the
DescribeInstancesRequest
given to thewaitUntilInstanceRunning
yields an empty result (no instances), the waiter should succeed and return immediately. This may have unintended consequences so perhaps it should just fail or theWaiterOverrideConfiguration
could have an option to allow empty results from theDescribeInstancesRequest
.Additional Information/Context
No response
AWS Java SDK version used
2.25.15
JDK version used
21
Operating System and version
Linux Ubuntu 22.04
The text was updated successfully, but these errors were encountered: