Skip to content

Commit 88ca4e9

Browse files
committed
info: stop printing "Expected" commits
The `Commit` type was introduced in moby/moby@2790ac6, to assist triaging issues that were reported with an incorrect version of runc or containerd. At the time, both `runc` and `containerd` were not yet stable, and had to be built from a specific commit to guarantee compatibility. We encountered various situations where unexpected (and incompatible) versions of those binaries were packaged, resulting in hard to trace bug-reports. For those situations, a "expected" version was set at compile time, to indicate if the version installed was different from the expected version; docker info ... runc version: a592beb5bc4c4092b1b1bac971afed27687340c5 (expected: 69663f0bd4b60df09991c08812a60108003fa340) Both `runc` and `containerd` are stable now, and docker 19.03 and up set the expected version to the actual version since moby/moby@c65f0bd and 23.0 did the same for the `init` binary moby/moby@b585c64, to prevent the CLI from reporting "unexpected version". In short; the `Expected` fields no longer serves a real purpose, so we should no longer print it. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent a464a63 commit 88ca4e9

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

cli/command/system/info.go

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -273,21 +273,9 @@ func prettyPrintServerInfo(streams command.Streams, info *dockerInfo) []error {
273273

274274
if info.OSType == "linux" {
275275
fprintln(output, " Init Binary:", info.InitBinary)
276-
277-
for _, ci := range []struct {
278-
Name string
279-
Commit system.Commit
280-
}{
281-
{"containerd", info.ContainerdCommit},
282-
{"runc", info.RuncCommit},
283-
{"init", info.InitCommit},
284-
} {
285-
fprintf(output, " %s version: %s", ci.Name, ci.Commit.ID)
286-
if ci.Commit.ID != ci.Commit.Expected {
287-
fprintf(output, " (expected: %s)", ci.Commit.Expected)
288-
}
289-
fprintln(output)
290-
}
276+
fprintln(output, " containerd version:", info.ContainerdCommit.ID)
277+
fprintln(output, " runc version:", info.RuncCommit.ID)
278+
fprintln(output, " init version:", info.InitCommit.ID)
291279
if len(info.SecurityOptions) != 0 {
292280
if kvs, err := system.DecodeSecurityOptions(info.SecurityOptions); err != nil {
293281
errs = append(errs, err)

0 commit comments

Comments
 (0)