Skip to content

Lanl/mirrors#286

Open
Paul-Ferrell wants to merge 87 commits into
eth-cscs:mainfrom
hpc:lanl/mirrors
Open

Lanl/mirrors#286
Paul-Ferrell wants to merge 87 commits into
eth-cscs:mainfrom
hpc:lanl/mirrors

Conversation

@Paul-Ferrell
Copy link
Copy Markdown

@Paul-Ferrell Paul-Ferrell commented Mar 10, 2026

We've added a new config file at the system level - mirrors.yaml It allows you to configure regular mirrors, build caches (including public keys), and bootstrap mirrors.

  • We've replaced the mirror attribute of recipe object with a mirrors attribute that works quite differently.
  • The regular (which includes build caches) mirrors are just configured as a Spack mirrors.yaml
  • The bootstrap mirrors are more complicated, they'll need a bootstrap.yaml and a metadata directory each.
  • Keys can be given as a path (relative to the system dir) or as a base64 encoded key.
    • In either case, key will be added to the Stackinator environment and added via the Makefile
  • Passing the 'cache' on the command line is still allowed
  • The mirror config option may still be allowed. Still looking at it.
  • Add unittests

@Paul-Ferrell Paul-Ferrell reopened this Mar 10, 2026
@Paul-Ferrell Paul-Ferrell changed the base branch from master to main March 10, 2026 17:07
@Paul-Ferrell Paul-Ferrell marked this pull request as ready for review March 16, 2026 19:13
@grodzki-lanl
Copy link
Copy Markdown

We put all mirror manipulation code into a class, and changed the mirrors.yaml template to accept only one buildcache and bootstrap mirror. I added some documentation in cluster-config.md but references to the prior builcache format in other sections need to be updated. I'm not experienced with how buildcaches work, so that functionality needs a closer review. I haven't tested if pushing to a specified buildcache works.

grodzki-lanl and others added 13 commits May 20, 2026 14:37
instead of calling url and timing out, simply check that urls are
correctly formated:
* because the reachability of urls might differ between the stack-config
  and make phases.
* because it slows down the unit tests (which should run quickly).
always pass the mount when creating Mirrors
- the choice about whether to use a mount-specific url for the build
  cache is decided using the mount_specific boolean flag

the "enabled" boolean flag for turning caches on and off was redundant
- the mirrors.yaml file describes the mirrors to use
- mirrors.yaml will typically be a static file injected into pipelines,
  and the only use case where you might want to modify its behavior is
when doing manual testing - in which case comment out.
flipping a switch.
- if we want, we can add CLI flags for turning mirror selection.
  - resolve and validate all mirror inputs (urls, gpg keys) in Mirrors.__init__
  - builder writes mirror artifacts instead of computing them
  - store buildcache, bootstrap and source_caches as separate members
  - decode gpg keys to in-memory bytes; expose config_files()/gpg_key_paths()
  - fix always-true magic gpg key check; reject non-key data
  - fix build cache mirror name mismatch in cache-force and --cache pushes
  - keep file:// urls as strings
- rename sourcecache to sourcemirror (for pre-populated source mirrors)
- add sourcecache for read through source caching
    - after downloading a source, add it to the cache so that it does
      not have to be downloaded again.
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.

4 participants