Skip to content

Commit 2c6f380

Browse files
authored
Do not rebuild build cache index every time we push (#297)
* rebuilding the index is expensive: scaling linearly with the number of packages in the build cache * it is not required for concretizer:reuse:false, which is the default mode of operation for stackinator
1 parent f3cd36d commit 2c6f380

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

stackinator/templates/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ cache-force: mirror-setup
8484
$(warning likely have to start a fresh build (but that's okay, because build caches FTW))
8585
$(warning ================================================================================)
8686
$(SANDBOX) $(MAKE) -C generate-config
87-
$(SANDBOX) $(SPACK) --color=never -C $(STORE)/config buildcache create --rebuild-index --only=package alpscache \
87+
$(SANDBOX) $(SPACK) --color=never -C $(STORE)/config buildcache create --only=package alpscache \
8888
$$($(SANDBOX) $(SPACK_HELPER) -C $(STORE)/config find --format '{name};{/hash};version={version}' \
8989
| grep -v -E '^({% for p in exclude_from_cache %}{{ pipejoiner() }}{{ p }}{% endfor %});'\
9090
| grep -v -E 'version=git\.'\

stackinator/templates/Makefile.compilers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ all:{% for compiler in compilers %} {{ compiler }}/generated/build_cache{% endfo
1919
{% for compiler, config in compilers.items() %}
2020
{{ compiler }}/generated/build_cache: {{ compiler }}/generated/env
2121
{% if push_to_cache %}
22-
$(SPACK) -e ./{{ compiler }} buildcache create --rebuild-index --only=package alpscache \
22+
$(SPACK) -e ./{{ compiler }} buildcache create --only=package alpscache \
2323
$$($(SPACK_HELPER) -e ./{{ compiler }} find --format '{name};{/hash}' \
2424
| grep -v -E '^({% for p in config.exclude_from_cache %}{{ pipejoiner() }}{{ p }}{% endfor %});'\
2525
| cut -d ';' -f2)

stackinator/templates/Makefile.environments

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ all:{% for env in environments %} {{ env }}/generated/build_cache{% endfor %}
1818
{% for env, config in environments.items() %}
1919
{{ env }}/generated/build_cache: {{ env }}/generated/view_config
2020
{% if push_to_cache %}
21-
$(SPACK) --color=never -e ./{{ env }} buildcache create --rebuild-index --only=package alpscache \
21+
$(SPACK) --color=never -e ./{{ env }} buildcache create --only=package alpscache \
2222
$$($(SPACK_HELPER) -e ./{{ env }} find --format '{name};{/hash};version={version}' \
2323
| grep -v -E '^({% for p in config.exclude_from_cache %}{{ pipejoiner() }}{{ p }}{% endfor %});'\
2424
| grep -v -E 'version=git\.'\

0 commit comments

Comments
 (0)