-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Return empty Config fields, now omitempty, for API < 1.21 #17177
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
Conversation
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
c.Assert(err, check.IsNil) | ||
c.Assert(status, check.Equals, http.StatusOK) | ||
|
||
var inspectJSON map[string]interface{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit simpler code if you use: var inspectJSON struct{ Config map[string]*json.RawMessage }
edit: never mind, I see interface{}
is used in other tests as well.
Do we need something similar for images as well, or is containers enough? |
images don't contain Config fields (except for Labels) in API output |
@runcom |
@tonistiigi yes I was looking at |
funny thing is we never versioned image type for inspect output |
ping @calavera do we want to have bc layers for v1.20 and pre1.20 for images as well? If yes I'll add it to this PR since I've already worked on it |
@runcom yes, we should be as much backwards compatible as possible. On the other hand, we haven't had reports of breaking changes regarding images, so I could be okay not having it for 1.9. @tiborvass what do you think? |
+1, let's merge this as-is for 1.9 |
LGTM |
1 similar comment
LGTM |
Running these tests locally now. |
Tests pass locally. merging. |
Return empty Config fields, now omitempty, for API < 1.21
Signed-off-by: Antonio Murdaca runcom@redhat.com