Skip to content

Commit

Permalink
fix(aws): Only log warrning if lastModified not present and non-emp…
Browse files Browse the repository at this point in the history
…ty (#2449)

Currently logs are being littered with warnings in regions that are
otherwise empty.
  • Loading branch information
ajordens committed Mar 22, 2018
1 parent e688361 commit 842a7ea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ class AmazonApplicationLoadBalancerCachingAgent extends AbstractAmazonLoadBalanc
def listenerAssociations = this.buildListenerAssociations(loadBalancing, allLoadBalancers, useEdda)

if (!start) {
if (useEdda) {
if (useEdda && allTargetGroups) {
log.warn("${agentType} did not receive lastModified value in response metadata")
}
start = System.currentTimeMillis()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class AmazonLoadBalancerCachingAgent extends AbstractAmazonLoadBalancerCachingAg
}

if (!start) {
if (account.eddaEnabled) {
if (account.eddaEnabled && allLoadBalancers) {
log.warn("${agentType} did not receive lastModified value in response metadata")
}
start = System.currentTimeMillis()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class AmazonSecurityGroupCachingAgent implements CachingAgent, OnDemandAgent, Ac
return new DefaultCacheResult([(SECURITY_GROUPS.ns): providerCache.getAll(SECURITY_GROUPS.ns, sgIds)])
}
}
} else {
} else if (securityGroups) {
log.warn("${agentType} did not receive lastModified value in response metadata")
}
evictions[ON_DEMAND.ns] = [lastModifiedKey]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class ClusterCachingAgent implements CachingAgent, OnDemandAgent, AccountAware,
}

if (!start) {
if (account.eddaEnabled) {
if (account.eddaEnabled && asgs) {
log.warn("${agentType} did not receive lastModified value in response metadata")
}
start = System.currentTimeMillis()
Expand Down

0 comments on commit 842a7ea

Please sign in to comment.