Skip to content

Add spack.lock artifact storage and spack diff comparison in PR CI - #385

Draft
wdconinc with Copilot wants to merge 4 commits into
masterfrom
copilot/store-spack-lock-file
Draft

Add spack.lock artifact storage and spack diff comparison in PR CI#385
wdconinc with Copilot wants to merge 4 commits into
masterfrom
copilot/store-spack-lock-file

Conversation

Copilot AI commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

PR CI currently gives no visibility into how the spack environment changes. This adds spack.lock extraction as pipeline artifacts and compares new vs. base-branch lock files using spack diff in PR builds.

eic job — extract and upload spack.lock artifacts

After the main build, a temporary container is created from the already-pushed image digest using docker create, and docker cp is used to pull the spack.lock files out — no second build is needed. Produces:

  • default.spack.lock — always (all envs/targets)
  • custom.spack.lock — only when target == final (ci, xl)

Artifacts named spack-lock-{ENV}-{arch}, retained 90 days (sufficient for cross-PR comparison against master).

New spack-diff job (PR/merge-group only)

Runs after eic-manifest inside the eic_ci container (has spack). Matrix: ci and xl on amd64.

  1. Downloads the new lock artifact from this run
  2. Downloads the previous lock artifact from the base branch's last successful run (via dawidd6/action-download-artifact)
  3. Parses both JSON lock files and for any packages with changed hashes and versions, calls spack diff pkg@old pkg@new for detailed spec-tree output (with continue-on-error)

Diff output is visible only in pipeline logs; no artifacts published.

Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

Capybara summary for PR 385

name: eic-${{ matrix.ENV }}-${{ matrix.arch }}-nightly-digest
path: /tmp/digests/${{ matrix.arch }}-nightly.digest
retention-days: 1
- name: Export spack.lock files

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@copilot We do not want to build another container (and duplicate locally all common args; which is tech debt risking going out of sync). Just docker cp the relevant lock file out of the container.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done — replaced the second docker buildx build with docker create + docker cp + docker rm using the image digest from /tmp/build-metadata-default.json. The scratch-based export stages in the Dockerfile have also been removed since they're no longer needed. Committed in the latest push.

…lock files

Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Copilot AI requested a review from wdconinc August 9, 2026 15:06
@wdconinc wdconinc added the pre-commit.ci autofix Enable pre-commit.ci autofixes even for bot accounts label Aug 9, 2026
@pre-commit-ci pre-commit-ci Bot removed the pre-commit.ci autofix Enable pre-commit.ci autofixes even for bot accounts label Aug 9, 2026
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.

2 participants