-
Notifications
You must be signed in to change notification settings - Fork 1k
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(cloudfoundry): add configurable cache expiry for clients #5508
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ent and make Routes cache expiration configurable
@zachsmith1 Not sure how best to demonstrate the issue as it's more a logical issue than a code one. Any ideas let me know :) |
zachsmith1
approved these changes
Oct 11, 2021
@Mergifyio backport release-1.27.x |
mergify bot
pushed a commit
that referenced
this pull request
Oct 12, 2021
* fix(cloudfoundry): add configurable cache expiry for Applications client and make Routes cache expiration configurable * fix(cloudfoundry): merge conflict (cherry picked from commit d12b5f0) # Conflicts: # clouddriver-cloudfoundry/src/main/java/com/netflix/spinnaker/clouddriver/cloudfoundry/client/Applications.java
Command
|
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auto merged
Merged automatically by a bot
ready to merge
Approved and ready for a merge
target-release/1.28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently Clouddriver maintains an in-memory cache of GUIDs to Server Groups. If caching is handled by a specific pod (e.g. if cache sharding is enabled, or HA is enabled) and a different pod handles an operation that populates the cache, then this cache will never be updated.
If an application is deleted outside of Spinnaker and then redeployed with the same name, the app GUID will change. This results in Clouddriver trying to perform actions against the old GUID which no longer exists.
I've added a default expires-after-write for the Applications cache, but have made this configurable alongside an expires-after-access rule. Whilst I was at it I did the same for the Routes cache.
Also threw in some minor cleanup in files whilst I was there, making things final, using lambdas etc.