Skip to content

gitlab ci: Provide a knob to control untouched spec pruning#35274

Merged
scottwittenburg merged 1 commit intospack:developfrom
scottwittenburg:gitlab-ci-spec-pruning-dial
Mar 8, 2023
Merged

gitlab ci: Provide a knob to control untouched spec pruning#35274
scottwittenburg merged 1 commit intospack:developfrom
scottwittenburg:gitlab-ci-spec-pruning-dial

Conversation

@scottwittenburg
Copy link
Copy Markdown
Contributor

@scottwittenburg scottwittenburg commented Jan 31, 2023

When untouched spec pruning is enabled, specs possibly affected by a change cannot be pruned from a pipeline.

Previously spack looked at all specs matching changed package names, and traversed dependents of each, all the way to the environment root, to compute the set of environment specs possibly affected by a change (and thus, not candidates for pruning).

With this PR, when untouched spec pruning is enabled, a new environment variable can control how far towards the root spack traverses to compute the set of specs possibly affected by a change. SPACK_UNTOUCHED_PRUNING_DEPENDENT_DEPTH can be set to any numeric value before the spack ci generate command is called to control this traversal depth parameter. Setting it to "0" traverses only touched specs, setting it to "1" traverses only touched specs and their direct dependents, and so on. Omitting the variable restuls in the previous behavior of traversing all the way to the root. Setting it to a negative value means no traversal is done, and always yields an empty set of possibly affected specs (which would result in the max pruning possible).

When untouched spec pruning is enabled, specs possibly affected
by a change cannot be pruned from a pipeline.

Previously spack looked at all specs matching changed package
names, and traversed dependents of each, all the way to the
environment root, to compute the set of environment specs
possibly affected by a change (and thus, not candidates for
pruning).

With this PR, when untouched spec pruning is enabled, a new
environment variable can control how far towards the root spack
traverses to compute the set of specs possibly affected by a
change.  SPACK_UNTOUCHED_PRUNING_DEPENDENT_DEPTH can be set
to any numeric value before the "spack ci generate" command
is called to control this traversal depth parameter.  Setting
it to "0" traverses only touched specs, setting it to "1"
traverses only touched specs and their direct dependents, and
so on.  Omitting the variable restuls in the previous behavior
of traversing all the way to the root.  Setting it to a negative
value means no traversal is done, and always yields an empty
set of possibly affected specs (which would result in the max
pruning possible).
@spackbot-app spackbot-app bot added commands core PR affects Spack core functionality tests General test capability(ies) labels Jan 31, 2023
@scottwittenburg
Copy link
Copy Markdown
Contributor Author

fyi @zackgalbreath @kwryankrattiger

@scottwittenburg
Copy link
Copy Markdown
Contributor Author

@spackbot help

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Feb 2, 2023

You can interact with me in many ways!

  • @spackbot hello: say hello and get a friendly response back!
  • @spackbot help or @spackbot commands: see this message
  • @spackbot run pipeline or @spackbot re-run pipeline: to request a new run of the GitLab CI pipeline
  • @spackbot rebuild everything: to run a pipeline rebuilding all specs from source.
  • @spackbot fix style if you have write and would like me to run spack style --fix for you.
  • @spackbot maintainers or @spackbot request review: to look for and assign reviewers for the pull request.

I'll also help to label your pull request and assign reviewers!
If you need help or see there might be an issue with me, open an issue here

@scottwittenburg scottwittenburg merged commit 4a9ffdc into spack:develop Mar 8, 2023
@scottwittenburg scottwittenburg deleted the gitlab-ci-spec-pruning-dial branch March 8, 2023 16:38
jmcarcell pushed a commit to key4hep/spack that referenced this pull request Apr 13, 2023
)

When untouched spec pruning is enabled, specs possibly affected
by a change cannot be pruned from a pipeline.

Previously spack looked at all specs matching changed package
names, and traversed dependents of each, all the way to the
environment root, to compute the set of environment specs
possibly affected by a change (and thus, not candidates for
pruning).

With this PR, when untouched spec pruning is enabled, a new
environment variable can control how far towards the root spack
traverses to compute the set of specs possibly affected by a
change.  SPACK_UNTOUCHED_PRUNING_DEPENDENT_DEPTH can be set
to any numeric value before the "spack ci generate" command
is called to control this traversal depth parameter.  Setting
it to "0" traverses only touched specs, setting it to "1"
traverses only touched specs and their direct dependents, and
so on.  Omitting the variable results in the previous behavior
of traversing all the way to the root.  Setting it to a negative
value means no traversal is done, and always yields an empty
set of possibly affected specs (which would result in the max
pruning possible).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands core PR affects Spack core functionality tests General test capability(ies)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants