Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ When updating package versions:

Before submitting:
1. Test concretization with builder stage builds
2. Verify no unexpected duplicate packages
2. Verify no unexpected duplicate packages beyond each environment's `concretizer.duplicates.max_dupes` settings
3. **Check BOTH CI workflows pass** (GitHub Actions AND GitLab/EICweb)
4. Update documentation if architecture changes

Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ jobs:
runner: ubuntu-latest
PLATFORM: linux/amd64
target: final
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3"
- BUILD_IMAGE: eic_
BUILD_TYPE: default
BUILDER_IMAGE: debian_stable_base
Expand All @@ -379,7 +378,6 @@ jobs:
runner: ubuntu-latest
PLATFORM: linux/amd64/v3
target: final
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3"
- BUILD_IMAGE: eic_
BUILD_TYPE: default
BUILDER_IMAGE: debian_stable_base
Expand All @@ -389,7 +387,6 @@ jobs:
runner: ubuntu-24.04-arm
PLATFORM: linux/arm64
target: final
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3"
- BUILD_IMAGE: eic_
BUILD_TYPE: default
BUILDER_IMAGE: debian_stable_base
Expand All @@ -399,7 +396,6 @@ jobs:
runner: ubuntu-latest
PLATFORM: linux/amd64
target: final
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3|py-dask|py-dask-awkward|py-dask-histogram|py-distributed|py-requests"
- BUILD_IMAGE: eic_
BUILD_TYPE: default
BUILDER_IMAGE: debian_stable_base
Expand All @@ -409,7 +405,6 @@ jobs:
runner: ubuntu-latest
PLATFORM: linux/amd64/v3
target: final
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3|py-dask|py-dask-awkward|py-dask-histogram|py-distributed|py-requests"
- BUILD_IMAGE: eic_
BUILD_TYPE: default
BUILDER_IMAGE: debian_stable_base
Expand All @@ -419,7 +414,6 @@ jobs:
runner: ubuntu-24.04-arm
PLATFORM: linux/arm64
target: final
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3|py-dask|py-dask-awkward|py-dask-histogram|py-distributed|py-requests"
- BUILD_IMAGE: eic_
BUILD_TYPE: default
BUILDER_IMAGE: cuda_devel
Expand All @@ -429,7 +423,6 @@ jobs:
runner: ubuntu-latest
PLATFORM: linux/amd64
target: builder_concretization_default
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3"
- BUILD_IMAGE: eic_
BUILD_TYPE: default
BUILDER_IMAGE: cuda_devel
Expand All @@ -439,7 +432,6 @@ jobs:
runner: ubuntu-latest
PLATFORM: linux/amd64
target: builder_concretization_default
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3|py-dask|py-dask-awkward|py-dask-histogram|py-distributed|py-requests"
fail-fast: false
steps:
- name: Free Disk Space (Ubuntu)
Expand Down Expand Up @@ -559,7 +551,6 @@ jobs:
RUNTIME_IMAGE=${{ matrix.RUNTIME_IMAGE }}
INTERNAL_TAG=${{ env.INTERNAL_TAG }}
ENV=${{ matrix.ENV }}
SPACK_DUPLICATE_ALLOWLIST=${{ matrix.SPACK_DUPLICATE_ALLOWLIST }}
cache-from: |
type=registry,ref=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/buildcache:${{ matrix.BUILD_IMAGE }}${{ matrix.ENV }}-${{ matrix.BUILD_TYPE }}-${{ env.GITHUB_REF_POINT_SLUG }}-${{ matrix.arch }}
type=registry,ref=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/buildcache:${{ matrix.BUILD_IMAGE }}${{ matrix.ENV }}-${{ matrix.BUILD_TYPE }}-${{ env.GITHUB_BASE_REF_SLUG }}-${{ matrix.arch }}
Expand Down
10 changes: 0 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -479,16 +479,6 @@ eic:
--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 on lines 479 to 483
--secret id=mirrors,src=mirrors.yaml
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ The GitLab CI configuration (`.gitlab-ci.yml`) runs similar build jobs but in th

When modifying `spack-environment/packages.yaml`:
1. Test concretization: Build `builder_concretization_default` stage
2. Check for duplicate packages (intentionally allowed: `epic`, `llvm`, `py-setuptools`, `py-urllib3`)
2. Check for duplicate packages against the environment's `concretizer.duplicates.max_dupes` settings in `spack-environment/*/spack.yaml`
3. Verify no unexpected duplicates appear in concretization output

### Build Testing
Expand Down
47 changes: 0 additions & 47 deletions containers/eic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ ARG ENV=xl
ENV SPACK_ENV=/opt/spack-environment/${ENV}
ARG SPACK_FLAGS="--backtrace"
ARG SPACK_INSTALL_FLAGS="--no-check-signature --show-log-on-error --yes-to-all"
ARG SPACK_DUPLICATE_ALLOWLIST=""
ENV SPACK_COLOR="always"
ENV GIT_TERMINAL_PROMPT=0

Expand All @@ -55,29 +54,6 @@ RUN <<EOF
set -e
spack env activate --without-view --dir ${SPACK_ENV}
spack concretize --force
spack --color=never find --long --no-groups --show-concretized --format "{name}" \
| uniq -D -f2 \
| tee /tmp/duplicates_all.txt
if [ -n "${SPACK_DUPLICATE_ALLOWLIST}" ] ; then
grep -Evw "(${SPACK_DUPLICATE_ALLOWLIST})" /tmp/duplicates_all.txt \
| tee /tmp/duplicates_disallowed.txt
else
cat /tmp/duplicates_all.txt \
| tee /tmp/duplicates_disallowed.txt
fi
if [ -s /tmp/duplicates_disallowed.txt ] ; then
echo "Duplicate packages found:"
cat /tmp/duplicates_disallowed.txt
cat /tmp/duplicates_disallowed.txt | while read status hash spec ; do
spack --backtrace spec --long /${hash}
if [ "$prevspec" = "$spec" ] ; then
spack diff /${hash} /${prevhash}
fi
prevhash=${hash}
prevspec=${spec}
done
exit 1
fi
EOF


Expand Down Expand Up @@ -198,29 +174,6 @@ if [ -n "${JUGGLER_SHA}" ] ; then
spack deconcretize -y --all juggler
fi
spack concretize --force
spack --color=never find --long --no-groups --show-concretized --format "{name}" \
| uniq -D -f2 \
| tee /tmp/duplicates_all.txt
if [ -n "${SPACK_DUPLICATE_ALLOWLIST}" ] ; then
grep -Evw "(${SPACK_DUPLICATE_ALLOWLIST})" /tmp/duplicates_all.txt \
| tee /tmp/duplicates_disallowed.txt
else
cat /tmp/duplicates_all.txt \
| tee /tmp/duplicates_disallowed.txt
fi
if [ -s /tmp/duplicates_disallowed.txt ] ; then
echo "Duplicate packages found:"
cat /tmp/duplicates_disallowed.txt
cat /tmp/duplicates_disallowed.txt | while read status hash spec ; do
spack --backtrace spec --long /${hash}
if [ "$prevspec" = "$spec" ] ; then
spack diff /${hash} /${prevhash}
fi
prevhash=${hash}
prevspec=${spec}
done
exit 1
fi
EOF


Expand Down
11 changes: 11 additions & 0 deletions docs/spack-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,17 @@ concretizer:
- **`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`:

```yaml
spack:
concretizer:
duplicates:
max_dupes:
epic: 10
py-urllib3: 2
```

## Key Packages

### Core Physics Packages
Expand Down
6 changes: 5 additions & 1 deletion spack-environment/ci/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ spack:
- ../packages_root_without_opengl.yaml
- ../view.yaml
concretizer:
unify: when_possible
duplicates:
max_dupes:
llvm: 2
py-setuptools: 2
py-urllib3: 2
specs:
- acts
- actsvg
Expand Down
6 changes: 5 additions & 1 deletion spack-environment/ci_without_acts/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ spack:
- ../packages_root_without_opengl.yaml
- ../view.yaml
concretizer:
unify: when_possible
duplicates:
max_dupes:
llvm: 2
py-setuptools: 2
py-urllib3: 2
specs:
- actsvg
- afterburner
Expand Down
5 changes: 2 additions & 3 deletions spack-environment/concretizer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# - We disable reuse of build cache products during concretization
# (but build cache products will get used if available during install).
# - We want unified environments that can be installed in a simple view,
# but unfortunately that prevents multiple geometry versions. We use
# when_possible in those containers where multiple geometry versions are
# installed, and consider other duplicate packages an error.
# with package-specific duplicate allowances configured per environment
# through concretizer.duplicates.max_dupes in each spack.yaml.
#
concretizer:
reuse:
Expand Down
7 changes: 6 additions & 1 deletion spack-environment/cuda/epic/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ spack:
include_concrete:
- /opt/spack-environment/cuda
concretizer:
unify: when_possible # multiple epic versions
duplicates:
max_dupes:
epic: 10
llvm: 2
py-setuptools: 2
py-urllib3: 2
Comment on lines +12 to +15
specs:
- algorithms
- edm4eic
Expand Down
7 changes: 6 additions & 1 deletion spack-environment/cvmfs/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ spack:
- ../packages_root_without_opengl.yaml
- ../view.yaml
concretizer:
unify: when_possible
duplicates:
max_dupes:
epic: 10
llvm: 2
py-setuptools: 2
py-urllib3: 2
specs:
- acts
- actsvg
Expand Down
11 changes: 10 additions & 1 deletion spack-environment/tf/epic/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ spack:
- ../../packages.yaml
- ../../view.yaml
concretizer:
unify: when_possible # included environment: py-numba needs a different llvm than the one provided as external
duplicates:
max_dupes:
llvm: 2
Comment on lines +9 to +10
py-setuptools: 2
py-urllib3: 2
py-dask: 2
py-dask-awkward: 2
py-dask-histogram: 2
py-distributed: 2
py-requests: 2
include_concrete:
- /opt/spack-environment/tf
specs:
Expand Down
11 changes: 10 additions & 1 deletion spack-environment/tf/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ spack:
- ../packages.yaml
- ../view.yaml
concretizer:
unify: when_possible # py-numba needs a different llvm than the one provided as external
duplicates:
max_dupes:
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 +10 to +17
specs:
- edm4hep
- onnx
Expand Down
7 changes: 6 additions & 1 deletion spack-environment/xl/epic/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ spack:
include_concrete:
- /opt/spack-environment/xl
concretizer:
unify: when_possible # multiple epic versions
duplicates:
max_dupes:
epic: 10
llvm: 2
py-setuptools: 2
py-urllib3: 2
Comment on lines +12 to +15
packages:
geant4:
require:
Expand Down
Loading