Make the sandbox cache retention period configurable - #807
Merged
Merged
Conversation
…dcoded 7 days. copyArchive.py deletes any file in cache_dir whose mtime is older than a fixed 7 days, with no exception for tasks still in flight. This silently deleted sandbox tarballs for a DarkSide production campaign whose tasks ran longer than a week between updates, breaking retries for tasks that were still legitimately active. Adds cache_retention_days to panda_config, defaulting to 7 so existing deployments keep their current behavior, and points copyArchive.py at it instead of the hardcoded constant. Deployments with longer-running campaigns can now raise it in their own panda_server_config.json.
EdwardKaravakis
force-pushed
the
configurable-cache-retention
branch
from
September 29, 2026 08:23
c9245d9 to
b4b0871
Compare
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.
Summary
Follow-up to a DarkSide production issue:
copyArchive.pydeletes any file incache_dir(the sandbox/pandacache storage) whose mtime is older than a hardcoded 7 days, with no exception for tasks still in flight. This silently deleted sandbox tarballs for a DarkSide campaign whose tasks legitimately went quiet for more than a week between updates (idle/queued jobs waiting their turn), breaking retries for tasks that were still active - not a bug from a server restart, just a retention window shorter than that deployment's campaign duration.Discussed with Tadashi, who was fine with making this configurable.
This adds
cache_retention_daystopanda_config(typed attribute + default-fallback block, following the same pattern ascache_dir/record_sandbox_info), defaulting to 7 so every existing deployment, ATLAS production included, sees no behavior change.copyArchive.pynow reads it instead of the hardcodedtimedelta(days=7). Deployments running longer campaigns can raise it in their ownpanda_server_config.json.Test plan
cache_retention_daysunset on a test instance and confirm cleanup behavior is unchanged (still 7 days)cache_retention_daysraised on DOMA/DarkSide and confirm sandboxes survive past 7 days