summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJonathon Anderson <17242663+blue42u@users.noreply.github.com>2022-10-19 10:36:27 -0500
committerGitHub <noreply@github.com>2022-10-19 09:36:27 -0600
commita423dc646ac932d3d5bfe79c53a1e934bf36227c (patch)
treeac590084808f995361e60180e0168a33f8f99050 /etc
parent3ec73046995d9504d6e135f564f1370cfe31ba34 (diff)
downloadspack-a423dc646ac932d3d5bfe79c53a1e934bf36227c.tar.gz
spack-a423dc646ac932d3d5bfe79c53a1e934bf36227c.tar.bz2
spack-a423dc646ac932d3d5bfe79c53a1e934bf36227c.tar.xz
spack-a423dc646ac932d3d5bfe79c53a1e934bf36227c.zip
Update the binary index before attempting direct fetches (#32137)
"spack install" will not update the binary index if given a concrete spec, which causes it to fall back to direct fetches when a simple index update would have helped. For S3 buckets in particular, this significantly and needlessly slows down the install process. This commit alters the logic so that the binary index is updated whenever a by-hash lookup fails. The lookup is attempted again with the updated index before falling back to direct fetches. To avoid updating too frequently (potentially once for each spec being installed), BinaryCacheIndex.update now includes a "cooldown" option, and when this option is enabled it will not update more than once in a cooldown window (set in config.yaml). Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
Diffstat (limited to 'etc')
-rw-r--r--etc/spack/defaults/config.yaml4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml
index d3e7e4ce68..e72608248f 100644
--- a/etc/spack/defaults/config.yaml
+++ b/etc/spack/defaults/config.yaml
@@ -201,3 +201,7 @@ config:
# building and installing packages. This gives information about Spack's
# current progress as well as the current and total number of packages.
terminal_title: false
+
+ # Number of seconds a buildcache's index.json is cached locally before probing
+ # for updates, within a single Spack invocation. Defaults to 10 minutes.
+ binary_index_ttl: 600 \ No newline at end of file