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

Add utility for verifying that version/variant/externals are respected #978

Merged
merged 7 commits into from
Feb 13, 2024

Conversation

AlexanderRichert-NOAA
Copy link
Collaborator

@AlexanderRichert-NOAA AlexanderRichert-NOAA commented Jan 31, 2024

Summary

This PR adds a utility for verifying the concretized environments respect the configured version (common/packages.yaml), variant (common/packages.yaml), and external (site/packages.yaml) settings.

Testing

Tested on personal machine and in util_tests.sh/CI. Will explore adding to build CI.

Applications affected

none

Systems affected

Should be useful on all systems, though as currently written, it might involve ignoring certain packages on certain systems.

Dependencies

none

Issue(s) addressed

Link the issues addressed or resolved by this PR (use Fixes #??? for fully resolved issues)

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.

@AlexanderRichert-NOAA
Copy link
Collaborator Author

@climbfuji I decided not to put it in the main CI since I think the utility of it is more for telling an installer "hey just so you know," but I'm open to adding it. I think it would take a bit of work since when I tried it there were maybe a dozen or so packages that didn't match the configuration (but I don't know how much of that is intentional).

Copy link
Collaborator

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

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

This is a handy tool, thanks for coming up with this. Two questions:

  1. How are variant mismatches for externals handled? I believe spack concretize just uses the variants specified for the external when it uses it, correct? (same for version)
  2. Would it be better to use a repetitive -i (ignore) flag for ignoring certain packages like esmf? This way it would be more consistent with the show_duplicate_packages.py script, and it would also be more intuitive. The current syntax is more commonly used to check for just this package, not all others except that?

@AlexanderRichert-NOAA
Copy link
Collaborator Author

  1. Correct (i.e., we don't need a separate check because the concretized spec will be constrained by the external spec).
  2. Done. The ubuntu ci is failing with some kind of git/runner-related glitch but otherwise I think the updated code works.

Copy link
Collaborator

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

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

Thanks for considering my comments and suggestions!

I restarted the failed CI run and enabled auto-merge

@climbfuji climbfuji enabled auto-merge (squash) February 13, 2024 22:21
@AlexanderRichert-NOAA
Copy link
Collaborator Author

@climbfuji cool. FYI I (finally) added the util-tests as required just now.

@climbfuji climbfuji merged commit b4cc133 into JCSDA:develop Feb 13, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants