api: remove unused DefaultVersion, MinSupportedAPIVersion consts#50587
api: remove unused DefaultVersion, MinSupportedAPIVersion consts#50587austinvazquez merged 1 commit intomoby:masterfrom
Conversation
|
oh, derp, it's used in tests - fixing |
0ed4f6a to
c459932
Compare
| // DefaultAPIVersion is the highest REST API version supported by the daemon. | ||
| // MaxAPIVersion is the highest REST API version supported by the daemon. |
There was a problem hiding this comment.
FWIW, perhaps we should merge these into dockerversion and move that to daemon/version. We could even make that possible to override at build time through -X options (as we do for those other values); I don't think that's possible for const though, so technically they could be overridden at runtime, which may not be ideal.
moby/dockerversion/version_lib.go
Lines 3 to 12 in 4faedf2
There was a problem hiding this comment.
I don't think it would make much sense to afford overriding the max API version at build time as that is a property of the daemon implementation. Increasing it would be a bug and I can't imagine a use for decreasing it. I'm not worried about overriding the values at runtime as nobody is supposed to be importing the daemon as a library anyway.
I agree that daemon/config is a strange place for constant metadata about the daemon's capabilities. I also agree with moving the dockerversion package to somewhere under daemon. (🚲 Thoughts on instead naming the package something like daemon/meta so the Version constants don't stutter?) But I don't think it's the right place for the API version-range metadata.
I think move the APIVersion constants make the most sense under the daemon/server package.
c459932 to
e03a85e
Compare
e03a85e to
c1c38e8
Compare
c1c38e8 to
e46a991
Compare
austinvazquez
left a comment
There was a problem hiding this comment.
Rebased to resolve minor conflicts in client. Changes LGTM.
dockerversionpackage and move internal #50715These consts are no longer used, and separate consts were added in both the client and daemon packages;
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)