lint changes part 1#8423
Conversation
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <[email protected]> (github: unclejack)
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <[email protected]> (github: unclejack)
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <[email protected]> (github: unclejack)
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <[email protected]> (github: unclejack)
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <[email protected]> (github: unclejack)
|
LGTM |
|
dont' merge before 1.3, still on lockdown |
|
i know dissss :) |
|
LGTM |
|
Sorry that I just noticed this while looking at another issue--but changing the api/server/server.go HTTP error handling string match to "no such" from "No such" (to handle truncIndex change of errors string to lowercase "n") means that quite a few uses of the API will now return 500 instead of the proper 404 that is expected (for example, I had fixed this for We either need to resolve all the places below (minus a few that just happen to use the "No such" wording but aren't really coming via this codepath), or change it back to "No such". As an aside I would like to help make this more robust so string matching isn't the method by which HTTP response codes are determined. |
|
@LK4D4 that fixes one codepath that was relying on specific-case error text, but we should probably implement the same ignore-case style in this set of checks: https://github.com/docker/docker/blob/master/api/server/server.go#L95 Right now, all those responses from jobs with "No such" are falling through and ending up with HTTP 500 instead of 404. I'll generate a PR for this as it will help prevent these kinds of unintended consequences at least with case changes in the messages. Verified that this is the case:
Interestingly, we have one API test checking for 404 in |
|
FYI #8733 is submitted to resolve this issue |
This PR does some linting on the code. Each commit lints a separate part of the code. This PR is mostly focused on code changes for some packages. Instead of making all possible changes, this focuses mostly on the variable and mehtod naming.