summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neben <alexander.neben@mongodb.com>2022-12-20 22:42:20 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-12-20 23:41:37 +0000
commiteccc34a401de6bbb7fe56f6ad3a9aee3a2efe008 (patch)
tree3d1a2a4a03fb21725ce6120fd37245a8daa4e2c3
parent5bf9462dbfd45ef59b7215d8f802d30554960923 (diff)
downloadmongo-eccc34a401de6bbb7fe56f6ad3a9aee3a2efe008.tar.gz
SERVER-72266 Fixed scons cache pruning
-rw-r--r--buildscripts/scons_cache_prune.py6
-rw-r--r--etc/evergreen.yml2
2 files changed, 6 insertions, 2 deletions
diff --git a/buildscripts/scons_cache_prune.py b/buildscripts/scons_cache_prune.py
index 6391fbc0b9d..c9f4387e273 100644
--- a/buildscripts/scons_cache_prune.py
+++ b/buildscripts/scons_cache_prune.py
@@ -109,7 +109,11 @@ def prune_cache(cache_path, cache_size_gb, clean_ratio):
# check the atime again just to make sure something wasn't accessed while
# we pruning other files.
- if cache_item.time < os.stat(cache_item.path).st_atime:
+ try:
+ if cache_item.time < os.stat(cache_item.path).st_atime:
+ continue
+ except FileNotFoundError as err:
+ LOGGER.warning("Unable to find file %s : %s", cache_item, err)
continue
to_remove = cache_item.path + ".del"
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 07e9fb051ee..1596ba075db 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -3220,7 +3220,7 @@ buildvariants:
display_name: "Shared SCons Cache Pruning"
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
run_on:
- - ubuntu1604-test
+ - ubuntu2204-small
stepback: false
tasks:
- name: shared_scons_cache_pruning