Repository navigation
[v9r0] fix: support cachetools 8 - #8901
Merged
Merged
Conversation
chrisburr
force-pushed
the
fix/cachetools-8-v9r0
branch
from
November 16, 2026 14:40
f568b9c to
3c2955b
Compare
Since cachetools 8, a function decorated with cached is a wrapper object, not a function, so reset_all_caches no longer found any of the Registry caches and loading the central CS left them in place, e.g. an empty VO resolved before the CS was loaded. Find them by their cache_clear instead. Closes DIRACGrid#8884
cachetools 8 no longer supports @cachedmethod on class methods: calling FTS3Job._getIdpClient raises TypeError, so token-based FTS3 transfers fail. It never used the class, so make it a static method cached with @cached in the same cache.
chrisburr
force-pushed
the
fix/cachetools-8-v9r0
branch
from
November 16, 2026 14:41
3c2955b to
2051d15
Compare
chrisburr
marked this pull request as ready for review
November 16, 2026 14:42
chrisburr
requested review from
andresailer,
atsareg,
chaen and
fstagni
as code owners
November 16, 2026 14:42
aldbr
approved these changes
Nov 16, 2026
aldbr
approved these changes
Nov 16, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
cachetools 8.0.0 (released 2026-11-06) breaks two things in DIRAC:
@cachednow returns a callable object instead of a function, soRegistry.reset_all_caches(), which selected caches withinspect.isfunction, no longer clears any of them. Values cached before the central CS is loaded stay in place, e.g. an empty VO in the JobWrapper, so jobs with input or output data are rescheduled in a loop ([Bug]: Registry.reset_all_caches() no longer clears caches with cachetools >= 8.0.0 #8884). The caches are now found by theircache_clear.@cachedmethodon class methods is no longer supported:FTS3Job._getIdpClientraisesTypeError: Decorating class methods is not supported, so token-based FTS3 transfers fail. It never usedcls, so it is now a static method cached with@cachedin the same cache.Both changes work with cachetools 7 as well. rel-v8r0 has neither
reset_all_cachesnor@cachedmethod, so it is not affected.Closes #8884
BEGINRELEASENOTES
*Configuration
FIX: clear the Registry caches when the central CS is loaded with cachetools 8
*DataManagement
FIX: support cachetools 8 when caching the IdP clients of FTS3 jobs
ENDRELEASENOTES