From 428f8318998f0979918f28ffbb02055895064b74 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Tue, 16 Feb 2021 09:12:37 -0700 Subject: Pipelines: DAG Pruning (#20435) Pipelines: DAG pruning During the pipeline generation staging process we check each spec against all configured mirrors to determine whether it is up to date on any of the mirrors. By default, and with the --prune-dag argument to "spack ci generate", any spec already up to date on at least one remote mirror is omitted from the generated pipeline. To generate jobs for up to date specs instead of omitting them, use the --no-prune-dag argument. To speed up the pipeline generation process, pass the --check-index-only argument. This will cause spack to check only remote buildcache indices and avoid directly fetching any spec.yaml files from mirrors. The drawback is that if the remote buildcache index is out of date, spec rebuild jobs may be scheduled unnecessarily. This change removes the final-stage-rebuild-index block from gitlab-ci section of spack.yaml. Now rebuilding the buildcache index of the mirror specified in the spack.yaml is the default, unless "rebuild-index: False" is set. Spack assigns the generated rebuild-index job runner attributes from an optional new "service-job-attributes" block, which is also used as the source of runner attributes for another generated non-build job, a no-op job, which spack generates to avoid gitlab errors when DAG pruning results in empty pipelines. --- share/spack/spack-completion.bash | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index ea4a630691..cf0e79cdac 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -473,18 +473,22 @@ _spack_ci() { then SPACK_COMPREPLY="-h --help" else - SPACK_COMPREPLY="generate rebuild" + SPACK_COMPREPLY="generate rebuild rebuild-index" fi } _spack_ci_generate() { - SPACK_COMPREPLY="-h --help --output-file --copy-to --optimize --dependencies" + SPACK_COMPREPLY="-h --help --output-file --copy-to --optimize --dependencies --prune-dag --no-prune-dag --check-index-only" } _spack_ci_rebuild() { SPACK_COMPREPLY="-h --help" } +_spack_ci_rebuild_index() { + SPACK_COMPREPLY="-h --help" +} + _spack_clean() { if $list_options then -- cgit v1.2.3-70-g09d2