LambdaCacheRefreshTask does not seem to refresh the cache, this causes problems downstream if the AWS Lambda Deployment stage is followed by a AWS Lambda Route stage where the lookup for Newest version returns the old cached version.
Looking at the clouddriver logs I cannot see a on-demand cache refresh being triggered. I switched to calling clouddriver directly in this branch and added a cache refresh after publish. After this change I do see on-demand cache refresh being triggered in clouddriver logs. Not sure why cacheService.forceCacheUpdate does not trigger an update.
However it does not seem like the cache is refreshed in time for the AWS Lambda Publish in some cases, even with the 20s wait in LambdaCacheRefreshTask.
My current workaround is to add a LambdaWaitForCachePublishTask which simply waits until the published version is returned from clouddriver. The changes are available in this branch. This solves the problem for my usecase, I'd be happy to make a PR if my changes makes sense.
LambdaCacheRefreshTask
does not seem to refresh the cache, this causes problems downstream if theAWS Lambda Deployment
stage is followed by aAWS Lambda Route
stage where the lookup forNewest version
returns the old cached version.Looking at the clouddriver logs I cannot see a on-demand cache refresh being triggered. I switched to calling clouddriver directly in this branch and added a cache refresh after publish. After this change I do see on-demand cache refresh being triggered in clouddriver logs. Not sure why cacheService.forceCacheUpdate does not trigger an update.
However it does not seem like the cache is refreshed in time for the
AWS Lambda Publish
in some cases, even with the 20s wait inLambdaCacheRefreshTask
.My current workaround is to add a
LambdaWaitForCachePublishTask
which simply waits until the published version is returned from clouddriver. The changes are available in this branch. This solves the problem for my usecase, I'd be happy to make a PR if my changes makes sense.