Skip to content

Make the sandbox cache retention period configurable - #807

Merged
EdwardKaravakis merged 1 commit into
masterfrom
configurable-cache-retention
Sep 29, 2026
Merged

EdwardKaravakis merged 1 commit into
masterfrom
configurable-cache-retention

Conversation

@EdwardKaravakis

@EdwardKaravakis EdwardKaravakis commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up to a DarkSide production issue: copyArchive.py deletes any file in cache_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_days to panda_config (typed attribute + default-fallback block, following the same pattern as cache_dir/record_sandbox_info), defaulting to 7 so every existing deployment, ATLAS production included, sees no behavior change. copyArchive.py now reads it instead of the hardcoded timedelta(days=7). Deployments running longer campaigns can raise it in their own panda_server_config.json.

Test plan

  • Both changed files parse cleanly
  • Deploy with cache_retention_days unset on a test instance and confirm cleanup behavior is unchanged (still 7 days)
  • Deploy with cache_retention_days raised on DOMA/DarkSide and confirm sandboxes survive past 7 days

…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
EdwardKaravakis force-pushed the configurable-cache-retention branch from c9245d9 to b4b0871 Compare September 29, 2026 08:23
@EdwardKaravakis
EdwardKaravakis merged commit afdb00f into master Sep 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant