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.
Since commit 9233e1c the
redis_cache
module seems to have been broken in multiple places:The format of timestamp keys is malformed
This is because of an apparent attempt to refactor code to be compatible with older versions of python: the refactored code contains a silly copy-paste error that results in curly braces appearing in the keys, which breaks timestamp handling.
This PR fixes this mistake.
Listing child banks is broken, which results in commands like
salt-run cache.list minions
returning nothing every timeChild banks should be listed with
_get_bank_redis_key
instead of_get_bank_keys_redis_key
This PR fixes this mistake.
New objects get inserted in the wrong paths
The function
_build_bank_hier
seems to have been refactored from using a for-loop and several accumulating variables into a more functional style withitertools.accumulate
. However, instead of adding the names of child banks as set-members into the parent bank, the refactored code only adds a"."
member into each newly-created bank. This is a bug and causes all queries for nested banks to fail.This PR rewrites the function in a way that:
"."
member into newly-created banks