Skip to content

build: move duplicate-node policy into Spack concretizer configs#275

Open
Copilot wants to merge 8 commits into
masterfrom
copilot/explore-concretizer-block-change
Open

build: move duplicate-node policy into Spack concretizer configs#275
Copilot wants to merge 8 commits into
masterfrom
copilot/explore-concretizer-block-change

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 9, 2026

Summary

Replace ad-hoc duplicate package allowlists passed through container build args with Spack's environment-level duplicate-node configuration.

Changes

  • Added concretizer.duplicates.max_dupes to affected environment files:
    • spack-environment/ci/spack.yaml
    • spack-environment/ci_without_acts/spack.yaml
    • spack-environment/cvmfs/spack.yaml
    • spack-environment/tf/spack.yaml
    • spack-environment/xl/epic/spack.yaml
    • spack-environment/cuda/epic/spack.yaml
    • spack-environment/tf/epic/spack.yaml
  • Removed concretizer.unify: when_possible overrides and revert to default unify: true.
  • Removed SPACK_DUPLICATE_ALLOWLIST wiring from:
    • containers/eic/Dockerfile
    • .github/workflows/build-push.yml
    • .gitlab-ci.yml
  • Updated related documentation/instructions:
    • spack-environment/concretizer.yaml
    • docs/spack-environment.md
    • AGENTS.md
    • .github/copilot-instructions.md

Validation

  • docker buildx build --target builder_concretization_default --build-context spack-environment=spack-environment --build-arg DOCKER_REGISTRY=ghcr.io/eic/ --build-arg BUILDER_IMAGE=debian_stable_base --build-arg ENV=ci -f containers/eic/Dockerfile .
  • docker buildx build --target builder_concretization_default --build-context spack-environment=spack-environment --build-arg DOCKER_REGISTRY=ghcr.io/eic/ --build-arg BUILDER_IMAGE=cuda_devel --build-arg ENV=tf -f containers/eic/Dockerfile . ❌ (401 pulling ghcr.io/eic/cuda_devel:master in this environment)
  • Parallel validation: Code Review ✅, CodeQL ✅

@wdconinc
Copy link
Copy Markdown
Contributor

wdconinc commented May 9, 2026

  • ❌ (401 pulling ghcr.io/eic/cuda_devel:master in this environment)

Access restrictions resolved. cuda_devel is now public.

Comment thread spack-environment/ci/spack.yaml Outdated
Comment thread spack-environment/ci/spack.yaml Outdated
Comment thread spack-environment/ci_without_acts/spack.yaml Outdated
Comment thread spack-environment/ci_without_acts/spack.yaml Outdated
Comment thread spack-environment/cuda/epic/spack.yaml Outdated
Comment thread spack-environment/cvmfs/spack.yaml Outdated
Comment thread spack-environment/tf/epic/spack.yaml Outdated
Comment thread spack-environment/tf/epic/spack.yaml Outdated
Comment thread spack-environment/tf/spack.yaml Outdated
Comment thread spack-environment/tf/spack.yaml Outdated
Comment thread spack-environment/xl/epic/spack.yaml Outdated
wdconinc added 2 commits May 9, 2026 17:45
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
wdconinc added 2 commits May 9, 2026 22:35
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
@wdconinc wdconinc marked this pull request as ready for review May 10, 2026 03:47
Copilot AI review requested due to automatic review settings May 10, 2026 03:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR moves the “allowed duplicate packages” policy from ad-hoc Docker build args/CI wiring into Spack’s environment-level concretizer.duplicates.max_dupes configuration, aiming to make concretization behavior declarative per environment and remove CI-specific duplication checks.

Changes:

  • Add concretizer.duplicates.max_dupes to the affected Spack environments and remove concretizer.unify: when_possible overrides.
  • Remove SPACK_DUPLICATE_ALLOWLIST plumbing from the Dockerfile and CI (GitHub Actions + GitLab).
  • Update docs/instructions to describe the new duplicate configuration approach.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
spack-environment/ci/spack.yaml Adds per-environment duplicates.max_dupes settings for CI concretization.
spack-environment/ci_without_acts/spack.yaml Adds per-environment duplicates.max_dupes settings for the CI variant env.
spack-environment/cvmfs/spack.yaml Adds per-environment duplicates.max_dupes settings for the cvmfs env.
spack-environment/tf/spack.yaml Adds per-environment duplicates.max_dupes for TF env duplicates (llvm + python deps).
spack-environment/tf/epic/spack.yaml Adds per-environment duplicates.max_dupes for the TF epic layered env.
spack-environment/xl/epic/spack.yaml Adds per-environment duplicates.max_dupes for epic multi-version needs in xl epic env.
spack-environment/cuda/epic/spack.yaml Adds per-environment duplicates.max_dupes for epic multi-version needs in cuda epic env.
spack-environment/concretizer.yaml Updates commentary around concretizer behavior and keeps global unify: true.
containers/eic/Dockerfile Removes duplicate-allowlist ARG and the custom duplicate-check logic after concretization.
.github/workflows/build-push.yml Removes the matrix variable and build-arg passing for SPACK_DUPLICATE_ALLOWLIST.
.gitlab-ci.yml Removes the SPACK_DUPLICATE_ALLOWLIST build-arg generation/passing.
docs/spack-environment.md Documents environment-level duplicates.max_dupes configuration with an example.
AGENTS.md Updates contributor validation instructions to reference env duplicates.max_dupes settings.
.github/copilot-instructions.md Updates guidance to account for env-level duplicate allowances.

Comment thread spack-environment/concretizer.yaml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 10, 2026 13:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (2)

.github/workflows/build-push.yml:394

  • This workflow no longer passes a duplicate allowlist into the Docker build. For the ENV: xl builds here, any allowed duplicate nodes must now be configured in spack-environment/xl/spack.yaml via concretizer.duplicates.max_dupes—but that file currently has no concretizer: duplicates: section. Add the necessary max_dupes entries (or ensure the xl environment concretizes without duplicates).
        - BUILD_IMAGE: eic_
          BUILD_TYPE: default
          BUILDER_IMAGE: debian_stable_base
          RUNTIME_IMAGE: debian_stable_base
          ENV: xl

.github/workflows/build-push.yml:421

  • This workflow no longer passes a duplicate allowlist into the Docker build. For the ENV: cuda concretization build here, any allowed duplicate nodes must now be configured in spack-environment/cuda/spack.yaml via concretizer.duplicates.max_dupes—but that file currently has no concretizer: duplicates: section. Add the necessary max_dupes entries (or ensure the cuda environment concretizes without duplicates).
        - BUILD_IMAGE: eic_
          BUILD_TYPE: default
          BUILDER_IMAGE: cuda_devel
          RUNTIME_IMAGE: cuda_devel
          ENV: cuda

Comment thread .gitlab-ci.yml
Comment on lines 479 to 483
--build-arg JUGGLER_SHA=$(sh .ci/resolve_git_ref eic/juggler ${JUGGLER_VERSION:-main})
}
--build-arg ENV=${ENV}
--build-arg SPACK_DUPLICATE_ALLOWLIST=$(
case "${ENV}" in
ci|ci_without_acts|cuda|dbg|jl|prod)
echo "epic|llvm|py-setuptools|py-urllib3" ;;
xl|tf)
echo "epic|llvm|py-setuptools|py-urllib3|py-dask|py-dask-awkward|py-dask-histogram|py-distributed|py-requests" ;;
*)
echo "epic|llvm|py-setuptools|py-urllib3" ;;
esac
)
--build-arg jobs=${JOBS}
--build-context spack-environment=spack-environment
Comment thread docs/spack-environment.md
- **`unify: true`**: Single version of each package in environment
- **`reuse: false`**: Don't reuse packages from buildcache during concretization

Environment-specific duplicate allowances are configured in each environment `spack.yaml`:
Comment on lines +10 to +17
llvm: 2
py-setuptools: 2
py-urllib3: 2
py-dask: 2
py-dask-awkward: 2
py-dask-histogram: 2
py-distributed: 2
py-requests: 2
Comment on lines +9 to +10
max_dupes:
llvm: 2
Comment on lines +12 to +15
epic: 10
llvm: 2
py-setuptools: 2
py-urllib3: 2
Comment on lines +12 to +15
epic: 10
llvm: 2
py-setuptools: 2
py-urllib3: 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants