[20.10 backport] replace json.Unmarshal with NewFromJSON in Create#41976
Merged
Conversation
Signed-off-by: Jim Lin <[email protected]> (cherry picked from commit c9ec21e) Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah
force-pushed
the
20.10_backport_reuse
branch
from
February 17, 2021 20:18
0a1037e to
34446d0
Compare
Member
Author
|
rebased to trigger CI with test-fixes that were merged |
tiborvass
approved these changes
Feb 18, 2021
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.
backport of #41701
fixes #41683 /image/store.go Empty configuration causes runtime panic
- What I did
Reuse
NewFromJSONto handle norootfskey situation inimage/store.goto solve the issue in #41683- How I did it
Simply replace the
json.Unmarshalfunction withNewFromJSONinimage/image.go- How to verify it
Running this (mainly modified from #41683) will show
invalid image JSON, no RootFS:- Description for the changelog