-
Notifications
You must be signed in to change notification settings - Fork 18.8k
api: remove unused DefaultVersion, MinSupportedAPIVersion consts #50587
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
// Default build-time variable for library-import. | |
// These variables are overridden on build with build-time information. | |
var ( | |
GitCommit = "library-import" | |
Version = "library-import" | |
BuildTime = "library-import" | |
PlatformName = "" | |
ProductName = "" | |
DefaultProductLicense = "" | |
) |
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.
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
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.
LGTM after rebase
e03a85e
to
c1c38e8
Compare
c1c38e8
to
e46a991
Compare
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.
Rebased to resolve minor conflicts in client. Changes LGTM.
dockerversion
package 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)