Skip to content

Commit

Permalink
fix(aws): undo part of the perf improvement in #4692 (#4698)
Browse files Browse the repository at this point in the history
Apparently, some folks actually rely on the `isHealthy` attribute which I thought wasn't being serialized. It appears it is serialized via the `clusters` endpoint
  • Loading branch information
marchello2000 committed Jun 22, 2020
1 parent efe3d31 commit 8b0f7aa
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,12 @@ class AmazonClusterProvider implements ClusterProvider<AmazonCluster>, ServerGro
def instanceId = healthKeysToInstance.get(healthEntry.id)
instances[instanceId].health << healthEntry.attributes
}

instances.values().each { instance ->
instance.isHealthy = instance.health.any { it.state == 'Up' } && instance.health.every {
it.state == 'Up' || it.state == 'Unknown'
}
}
}

private Collection<CacheData> resolveRelationshipDataForCollection(Collection<CacheData> sources, String relationship, CacheFilter cacheFilter = null) {
Expand Down

0 comments on commit 8b0f7aa

Please sign in to comment.