Skip to content

Add content type and length in header#13805

Merged
stonezdj merged 2 commits intogoharbor:masterfrom
stonezdj:201218_add_content_type_length
Jan 6, 2021
Merged

Add content type and length in header#13805
stonezdj merged 2 commits intogoharbor:masterfrom
stonezdj:201218_add_content_type_length

Conversation

@stonezdj
Copy link
Contributor

Fixes #13740
Update ManifestExist to return Descriptor instead of digest

Signed-off-by: stonezdj stonezdj@gmail.com

@codecov
Copy link

codecov bot commented Dec 18, 2020

Codecov Report

Merging #13805 (1d50be3) into master (98f3c5d) will increase coverage by 0.66%.
The diff coverage is 24.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13805      +/-   ##
==========================================
+ Coverage   62.64%   63.31%   +0.66%     
==========================================
  Files         951      952       +1     
  Lines       61250    61886     +636     
  Branches     2154     2160       +6     
==========================================
+ Hits        38372    39184     +812     
+ Misses      18971    18713     -258     
- Partials     3907     3989      +82     
Flag Coverage Δ
unittests 63.31% <24.55%> (+0.66%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/controller/proxy/local.go 36.53% <0.00%> (+5.14%) ⬆️
src/controller/proxy/remote.go 0.00% <ø> (ø)
src/replication/adapter/adapter.go 95.65% <ø> (ø)
src/server/middleware/repoproxy/proxy.go 3.05% <0.00%> (-0.26%) ⬇️
src/replication/adapter/huawei/image_registry.go 21.18% <9.09%> (-0.56%) ⬇️
src/controller/proxy/controller.go 14.87% <9.37%> (+0.92%) ⬆️
src/controller/proxy/manifestcache.go 26.08% <26.08%> (ø)
src/pkg/registry/client.go 57.33% <66.66%> (+0.59%) ⬆️
src/replication/transfer/image/transfer.go 32.68% <100.00%> (+0.99%) ⬆️
src/core/utils/job.go 0.00% <0.00%> (-100.00%) ⬇️
... and 80 more

@stonezdj stonezdj force-pushed the 201218_add_content_type_length branch 5 times, most recently from f275ec9 to ef5f073 Compare December 21, 2020 10:39
Fixes goharbor#13740
Update ManifestExist to return Descriptor instead of digest
For docker 20.10 or containerd, it HEAD the manifest before pull, then
it GET the manifest with digest, add logic to handle this scenario and
correlate the tag between the digest in proxy cache

Signed-off-by: stonezdj <stonezdj@gmail.com>
@stonezdj stonezdj force-pushed the 201218_add_content_type_length branch 3 times, most recently from d51756d to 95f278e Compare December 22, 2020 13:32
@stonezdj stonezdj force-pushed the 201218_add_content_type_length branch 2 times, most recently from 2c8e23c to ca723b2 Compare January 4, 2021 10:35
ywk253100
ywk253100 previously approved these changes Jan 4, 2021
@ywk253100 ywk253100 dismissed their stale review January 4, 2021 10:59

need to review again

@stonezdj stonezdj force-pushed the 201218_add_content_type_length branch 2 times, most recently from 0598f40 to 796c4f1 Compare January 5, 2021 02:31
@stonezdj stonezdj force-pushed the 201218_add_content_type_length branch 2 times, most recently from ba1ee76 to b29fe31 Compare January 5, 2021 07:51
@stonezdj stonezdj force-pushed the 201218_add_content_type_length branch from b29fe31 to 64d75d1 Compare January 5, 2021 10:17
@stonezdj stonezdj force-pushed the 201218_add_content_type_length branch from d939526 to bd2d80b Compare January 5, 2021 15:00
Separate manifest, manifest list and image index.

Signed-off-by: stonezdj <stonezdj@gmail.com>
@stonezdj stonezdj force-pushed the 201218_add_content_type_length branch from bd2d80b to 1d50be3 Compare January 6, 2021 06:01
@stonezdj stonezdj merged commit b748852 into goharbor:master Jan 6, 2021
Sign up for free to 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.

docker 20.10 pull proxy cache image failed: Error response from daemon: missing or empty Content-Type header

3 participants