Skip to content

[release/1.2 backport] Compute manifest metadata when not provided.#3591

Merged
estesp merged 5 commits intocontainerd:release/1.2from
thaJeztah:1.2_backport_compute_manifest_metadata
Sep 5, 2019
Merged

[release/1.2 backport] Compute manifest metadata when not provided.#3591
estesp merged 5 commits intocontainerd:release/1.2from
thaJeztah:1.2_backport_compute_manifest_metadata

Conversation

@thaJeztah
Copy link
Member

backport of #3245 for the 1.2 branch

Adds a fallback to manually compute the manifest digest when it is not presented as the Docker-Content-Digest header by the registry server. This is to address #3238.

closes #3238
addresses parts of #3291

@thaJeztah
Copy link
Member Author

This was requested by @artch to help compatibility with the GitHub Package Registry #3245 (comment)

/cc @Phanatic

@thaJeztah
Copy link
Member Author

Looks like additional changes are needed to make this work;

remotes\docker\resolver.go:260:19:warning: r.headers undefined (type *dockerResolver has no field or method headers) (compile) (staticcheck)

@thaJeztah
Copy link
Member Author

Need to backport #2751

thaJeztah and others added 5 commits August 28, 2019 20:55
This reverts commit 1af8e6e.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Charles Kenney <charlesc.kenney@gmail.com>
(cherry picked from commit 068880f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Fixes containerd#2870

Signed-off-by: Eric Lin <linxiulei@gmail.com>
(cherry picked from commit 2db0c6c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Currently the user agent is only being used on the initial
resolve request, then switching to the default user agent.
This ensures the correct user agent is always used. There is
a larger fix in progress which does this is a cleaner way, but
the scope of this change is fixing the user agent issue.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
(cherry picked from commit bb00872)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This closes containerd#3238

Signed-off-by: msg555 <msg555@gmail.com>
(cherry picked from commit ee902af)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the 1.2_backport_compute_manifest_metadata branch from 0a49e64 to 0d6d883 Compare August 28, 2019 19:04
@thaJeztah
Copy link
Member Author

OK; I had a look what is needed to get a clean backport, but that would include #3335, which (I think) is a feature.
Perhaps it's ok to add, so I updated this PR as follows:

I'll leave it to the maintainers to decide if this is ok, or if I need to spend some time to adapt the backport to work
without inclusion of #3335

@codecov-io
Copy link

Codecov Report

Merging #3591 into release/1.2 will decrease coverage by 0.06%.
The diff coverage is 36.92%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release/1.2    #3591      +/-   ##
===============================================
- Coverage        44.09%   44.03%   -0.07%     
===============================================
  Files              100      100              
  Lines            10790    10837      +47     
===============================================
+ Hits              4758     4772      +14     
- Misses            5293     5325      +32     
- Partials           739      740       +1
Flag Coverage Δ
#linux 47.65% <36.53%> (-0.12%) ⬇️
#windows 41.05% <36.92%> (-0.06%) ⬇️
Impacted Files Coverage Δ
remotes/docker/resolver.go 54.54% <36.92%> (-4.66%) ⬇️

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 a4bc1d4...0d6d883. Read the comment docs.

@crosbymichael crosbymichael requested a review from dmcgowan August 29, 2019 15:35
@estesp estesp added this to the 1.2.9 milestone Sep 4, 2019
Copy link
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

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

LGTM

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

@estesp estesp merged commit 6ef0529 into containerd:release/1.2 Sep 5, 2019
@thaJeztah thaJeztah deleted the 1.2_backport_compute_manifest_metadata branch September 5, 2019 19:36
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.

7 participants