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 InstanceExists Waiter #985

Merged
merged 1 commit into from
Nov 12, 2015
Merged

Fix InstanceExists Waiter #985

merged 1 commit into from
Nov 12, 2015

Conversation

joaogbcravo
Copy link
Contributor

Instead of checking just the status of DescribeInstances operation from aws, we should check if the reservations list have length > 0.

Instead of checking just the status of DescribeInstances operation from aws, we should check if the reservation have length > 0.
@joaogbcravo
Copy link
Contributor Author

To have more context about this change:
I created a machine, then I destroyed it, and waited to not be seen anymore on my dashboard.
When I do describe_instances({instance_ids: [DESTROYED_INSTANCE_ID]}) it returns a good response (200 OK) with an empty reservation list, instead of InvalidInstanceIDNotFound.

This makes the Aws::Resources::Resource exists? method to be a "liar" method.

trevorrowe added a commit that referenced this pull request Nov 12, 2015
@trevorrowe trevorrowe merged commit 04744a8 into aws:master Nov 12, 2015
@trevorrowe
Copy link
Member

Sorry for the slow merge. The fix looks good. We may be able to simplify the path expression and replace it with a pathAny matcher. Semantically it would be the same as the pathAny and pathAll matchers may not return empty lists.

This should go out with the next release.

awood45 added a commit that referenced this pull request Nov 12, 2015
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.

2 participants