Fix initialization of defaults in yaml schema validation#7959
Merged
scheibelp merged 3 commits intospack:developfrom May 2, 2018
Merged
Fix initialization of defaults in yaml schema validation#7959scheibelp merged 3 commits intospack:developfrom
scheibelp merged 3 commits intospack:developfrom
Conversation
… the same field blank
…ther than sharing the same default object everywhere)
Member
|
So does this replace #7925 or just complement it? |
Member
Author
Replace |
alalazo
reviewed
May 1, 2018
| } | ||
|
|
||
|
|
||
| def test_merge_with_defaults(config, write_config_file): |
Member
There was a problem hiding this comment.
@scheibelp Don't know how others feel about it, but for what is worth I started marking regressions like:
@pytest.mark.regression('7924')
def test_merge_with_defaults(config, write_config_file):
...This may serve both to document the origin of the test + in case we want to run all the regressions we could do:
spack test -m regression
Member
Author
|
@alalazo thanks for the suggestion and for the review! @citibeth thanks for reporting the problem along with detailed reproducer info, and for submitting the original fix this is based on! @adamjstewart thanks for taking a look! |
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.
Fixes #7924
See also: #7925
Spack's yaml schema validator was initializing all instances of unspecified properties with the same object, so that updating the property for one entry was updating it for others (e.g. updating versions for one package would update it for other packages).
This updates the schema validator to instantiate defaults with separate object instances and adds a test to confirm this behavior (and also confirms #7924 without this change).