Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setup.sh: add export SPACK_DISABLE_LOCAL_CONFIG=true #1545

Merged
merged 4 commits into from
Mar 7, 2025

Conversation

climbfuji
Copy link
Collaborator

@climbfuji climbfuji commented Mar 5, 2025

Summary

Update setup.sh: add export SPACK_DISABLE_LOCAL_CONFIG=true to completely isolate the spack-stack environments from user spack configurations. This requires additional steps to unset and restore the environment variable when creating new site configurations. Further, remove the exception for macOS (no longer needed, see #1545 (comment) below for more information)

Testing

  • Tested on NRL systems and @climbfuji's devbox
  • CI

Applications affected

None

Systems affected

"All" (not really), but at least air-gapped systems where the spack bootstrap mirror needs to be used every time from now on.

Dependencies

n/a

Issue(s) addressed

Closes #1544

Checklist

  • This PR addresses one issue/problem/enhancement, or has a very good reason for not doing so.
  • These changes have been tested on the affected systems and applications.
  • All dependency PRs/issues have been resolved and this PR can be merged.

…letely isolate the spack-stack environments from user spack configurations (JCSDA#60)
@climbfuji climbfuji self-assigned this Mar 5, 2025
@climbfuji climbfuji marked this pull request as ready for review March 5, 2025 19:42
Copy link
Collaborator

@RatkoVasic-NOAA RatkoVasic-NOAA left a comment

Choose a reason for hiding this comment

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

LGTM

@climbfuji
Copy link
Collaborator Author

Ooops, I remember. The problem was this didn't work for new site configs, because we use spack external find --scope=system. I will look into other options (scope=site, for example).

@climbfuji
Copy link
Collaborator Author

I fixed this in 2e91ad6, a17b244, and d42cf47 by adding one more step to the NewSiteConfig instructions (unset SPACK_DISABLE_LOCAL_CONFIG when setting SPACK_SYSTEM_CONFIG_PATH, and restoring SPACK_DISABLE_LOCAL_CONFIG when unsetting SPACK_SYSTEM_CONFIG_PATH). Same for GitHub actions CI runs.

I also removed the exception to skip avoiding ~/.spack for macOS. We needed this in the past when bootstrapping was a tedious and manual process, but fortunately this is no longer the case. I tested this on the macOS CI runner manally. Hopefully, it will work just as well in CI.

@climbfuji climbfuji requested review from eap and srherbener March 6, 2025 18:14
Copy link
Collaborator

@srherbener srherbener left a comment

Choose a reason for hiding this comment

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

I think this looks good. I did not test, rather I'm relying on the CI testing and others. I like that by default user configuration is ignored for the build, and only for customized (new site config) builds you can temporarily enable user configuration. Thanks!

@climbfuji climbfuji merged commit 53f732a into JCSDA:develop Mar 7, 2025
9 checks passed
@climbfuji climbfuji deleted the feature/add_disable_local_config branch March 7, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

spack-stack environments must not depend on existing user configurations
4 participants