-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix reported compat issues #5554
Conversation
honor -1 in in list containers for compatibility mode. it is commonly used to indicate no limit. change the json id parameter to Id in container create. Fixes: containers#5553 Signed-off-by: Brent Baude <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: baude The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
@mheon @jwhonce @edsantiago PTAL |
/hold |
LGTM |
Are these other occurrencies of lowercase
|
the only questionable ones i see for certain are the compat ones ... does the consumer side of those expect Id? |
@@ -87,7 +87,7 @@ func ListContainers(w http.ResponseWriter, r *http.Request) { | |||
utils.InternalServerError(w, err) | |||
return | |||
} | |||
if _, found := r.URL.Query()["limit"]; found { | |||
if _, found := r.URL.Query()["limit"]; found && query.Limit != -1 { |
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.
Wouldn't >= 0
be safer?
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.
Yes, then if user sends any negative number it will work.
To be honest, I haven’t looked how those ids are named in the Docker API spec. It is just a list of other possible occurrences to cross-check |
If the /libpod tree doesn't follow the same naming WRT to common fields then bindings with case sensitive json keys won't port without a rewrite. A quick look this morning seems to be "id" for path queries and "Id" for responses. |
/hold cancel |
honor -1 in in list containers for compatibility mode. it is commonly used to indicate no limit.
change the json id parameter to Id in container create.
Fixes: #5553
Signed-off-by: Brent Baude [email protected]