Skip to content

fix version quad logic that trims 0 digit so returns an empty one - #3519

Merged
thaJeztah merged 1 commit into
docker:masterfrom
crazy-max:fix-version-quad-2
Mar 31, 2022
Merged

fix version quad logic that trims 0 digit so returns an empty one#3519
thaJeztah merged 1 commit into
docker:masterfrom
crazy-max:fix-version-quad-2

Conversation

@crazy-max

Copy link
Copy Markdown
Member

follow-up #3517

#25 0.448 Building static docker-windows-amd64.exe
#25 0.468 + cat ./cli/winresources/versioninfo.json
#25 0.469 {
#25 0.469 "FixedFileInfo":
#25 0.469 {
#25 0.469 "FileVersion": {
#25 0.469 "Major": 0,
#25 0.469 "Minor": ,
#25 0.469 "Patch": 0,
#25 0.469 "Build": 0
#25 0.469 },
#25 0.469 "FileFlagsMask": "3f",
#25 0.469 "FileFlags ": "00",
#25 0.469 "FileOS": "040004",
#25 0.469 "FileType": "01",
#25 0.469 "FileSubType": "00"
#25 0.469 },
#25 0.469 "StringFileInfo":
#25 0.469 {
#25 0.469 "Comments": "",
#25 0.469 "CompanyName": "",
#25 0.469 "FileDescription": "Docker Client",
#25 0.469 "FileVersion": "0.0.0-20220331141022-b1ce915",
#25 0.469 "InternalName": "",
#25 0.469 "LegalCopyright": "Copyright © 2015-2022 Docker Inc.",
#25 0.469 "LegalTrademarks": "",
#25 0.469 "OriginalFilename": "docker-windows-amd64.exe",
#25 0.469 "PrivateBuild": "",
#25 0.469 "ProductName": "Docker Client",
#25 0.469 "ProductVersion": "0.0.0-20220331141022-b1ce915",
#25 0.469 "SpecialBuild": "b1ce915"
#25 0.469 },
#25 0.469 "VarFileInfo":
#25 0.469 {
#25 0.469 "Translation": {
#25 0.469 "LangID": "0409",
#25 0.469 "CharsetID": "04B0"
#25 0.469 }
#25 0.469 }
#25 0.469 }

cc @thaJeztah

Signed-off-by: CrazyMax crazy-max@users.noreply.github.com

@codecov-commenter

codecov-commenter commented Mar 31, 2022

Copy link
Copy Markdown

Codecov Report

Merging #3519 (22edabb) into master (b1ce915) will not change coverage.
The diff coverage is n/a.

@@ Coverage Diff @@## master #3519 +/- ##
=======================================
Coverage 59.00% 59.00% =======================================
Files 284 284 Lines 23839 23839 =======================================
Hits 14066 14066 Misses 8914 8914 Partials 859 859 

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@thaJeztah

Copy link
Copy Markdown
Member

Interesting; panic in a test; should not be related, but wondering what caused it: empty slice somewhere, causing sort to fail?

=== FAIL: cli/command/container TestRemoveForce/without_force (0.00s)
Error: Error: No such container: nosuchcontainer
--- FAIL: TestRemoveForce/without_force (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x40393f]
goroutine 190 [running]:
testing.tRunner.func1.2({0xb76380, 0x124c9a0})
/usr/local/go/src/testing/testing.go:1389 +0x24e
testing.tRunner.func1()
/usr/local/go/src/testing/testing.go:1392 +0x39f
panic({0xb76380, 0x124c9a0})
/usr/local/go/src/runtime/panic.go:838 +0x207
sort.StringSlice.Less(...)
/usr/local/go/src/sort/sort.go:319
sort.insertionSort({0xd87380, 0xc00051b3b0}, 0x0, 0x2)
/usr/local/go/src/sort/sort.go:40 +0xb1
sort.quickSort({0xd87380, 0xc00051b3b0}, 0x18?, 0xb4f060?, 0xc000540e01?)
/usr/local/go/src/sort/sort.go:222 +0x171
sort.Sort({0xd87380, 0xc00051b3b0})
/usr/local/go/src/sort/sort.go:231 +0x53
sort.Strings(...)
/usr/local/go/src/sort/sort.go:335
github.com/docker/cli/cli/command/container.TestRemoveForce.func2(0xc0005389c0?)
/go/src/github.com/docker/cli/cli/command/container/rm_test.go:36 +0x125
testing.tRunner(0xc00053e4e0, 0xc00051b140)
/usr/local/go/src/testing/testing.go:1439 +0x102
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:1486 +0x35f
=== FAIL: cli/command/container TestRemoveForce (0.00s)

@thaJeztah

Copy link
Copy Markdown
Member

opened #3520 to fix the test

@thaJeztahthaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@thaJeztah

Copy link
Copy Markdown
Member

relates to docker/docker-ce-packaging#669

@crazy-max
crazy-max deleted the fix-version-quad-2 branch March 31, 2022 21:00
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@crazy-max@codecov-commenter@thaJeztah