Add an audit system to Spack#23053
Merged
alalazo merged 17 commits intospack:developfrom Jun 18, 2021
Merged
Conversation
This was referenced Apr 19, 2021
10549f9 to
a4720ca
Compare
fbe1754 to
8137056
Compare
scheibelp
reviewed
May 7, 2021
Member
scheibelp
left a comment
There was a problem hiding this comment.
I have a few preliminary comments but I think the most important discussion to address first is the one I marked as "high-level": I'm wondering about the necessity of the AuditClass class.
8137056 to
873860f
Compare
bf6a81d to
fd330cd
Compare
This was referenced Jun 1, 2021
fd330cd to
6482eeb
Compare
Member
Author
|
@scheibelp Ready for a second review |
Create a new module that permits to: - Define class of audits to be done on different parts of Spack - Register functions to perform single checks Also added a command to interface with users
Add a check to validate variants used in package directives
29551c2 to
e0f8abc
Compare
Member
Author
|
@scheibelp Pushed again to fix a conflict with command completion |
scheibelp
approved these changes
Jun 18, 2021
Member
|
Close/reopen to restart CI |
Member
Author
|
Thanks @scheibelp ! |
bollig
pushed a commit
to bollig/spack
that referenced
this pull request
Jun 29, 2021
Add a new "spack audit" command. This command can check for issues with configuration or with packages and is intended to help a user debug a failed Spack build. In some cases the reported issues are always errors but are too costly to check for (e.g. packages that specify missing variants on dependencies). In other cases the issues may be legitimate but uncommon usage of Spack and we want to be sure the user intended the behavior (e.g. duplicate compiler definitions). Audits are grouped by theme, and for now the two themes are packages and configuration. For example you can run all available audits on packages with "spack audit packages". It is intended that in the future users will be able to define their own audits. The package audits are good candidates for running in package_sanity (i.e. they could catch bugs in user-submitted packages before they are merged) but that is left for a later PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a way to check various parts of Spack from the command line. The motivation to start this has been seeing a few issues where errors / inconsistencies in package recipes where mistaken for bugs in the new concretizer, due to poor reporting, and a debug session with @jjellio in which after much struggle we understood that an issue was due to a compiler being defined multiple times in the configuration (which is not allowed but Spack was not clear at all on what was the problem).
The PR should introduce:
spack.auditmoduleAs a first example, recreating a case like the one debugged with @jjellio we can obtain with this PR: