Skip to content

Normalize arm64 to an empty variant#2417

Merged
crosbymichael merged 1 commit intocontainerd:masterfrom
dmcgowan:update-arm64-normalize
Jun 25, 2018
Merged

Normalize arm64 to an empty variant#2417
crosbymichael merged 1 commit intocontainerd:masterfrom
dmcgowan:update-arm64-normalize

Conversation

@dmcgowan
Copy link
Member

Updates arm64 normalization to match what is described in https://github.com/golang/go/wiki/GoArm

The output of Parse should remain the same, the Normalize function should now have an empty variant for arm64.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
@codecov-io
Copy link

Codecov Report

Merging #2417 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2417      +/-   ##
==========================================
- Coverage   45.06%   45.03%   -0.04%     
==========================================
  Files          92       92              
  Lines        9413     9407       -6     
==========================================
- Hits         4242     4236       -6     
  Misses       4488     4488              
  Partials      683      683
Flag Coverage Δ
#linux 49.26% <100%> (-0.05%) ⬇️
#windows 41.3% <100%> (-0.05%) ⬇️
Impacted Files Coverage Δ
platforms/platforms.go 83.9% <100%> (+0.37%) ⬆️
platforms/database.go 81.48% <100%> (-2.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47a128d...db3c5af. Read the comment docs.

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@crosbymichael
Copy link
Member

LGTM

@crosbymichael crosbymichael merged commit f15c3be into containerd:master Jun 25, 2018
p.OS = normalizeOS(parts[0])
p.Architecture, p.Variant = normalizeArch(parts[1], parts[2])
if p.Architecture == "arm64" && p.Variant == "" {
p.Variant = "v8"
Copy link
Member

Choose a reason for hiding this comment

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

So, this sets it to "v8" if its present?

Copy link
Member Author

Choose a reason for hiding this comment

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

This sets it to "v8" if it was given as "v8" (or "8"). This Parse function is kind of confusing in that it normalizes the parts but not the whole. Take a look at the test cases I added to make sure it makes sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

Diff of both changes in the release backport PR https://github.com/containerd/containerd/pull/2416/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants