Skip to content

Use correct media type for config blob in schema2 manifest#1622

Merged
RichardScothern merged 1 commit intodistribution:masterfrom
aaronlehmann:schema2-config-mediatype
Apr 12, 2016
Merged

Use correct media type for config blob in schema2 manifest#1622
RichardScothern merged 1 commit intodistribution:masterfrom
aaronlehmann:schema2-config-mediatype

Conversation

@aaronlehmann
Copy link

The schema2 manifest builder fills in this part of the manifest based on
the descriptor it gets back from BlobIngester's Put method. It passes
the correct media type to Put, but Put ends up replacing this value with
application/octet-stream in its return value.

This commit works around the issue in the manifest builder. Arguably Put
should not be changing the media type in its return value, but this
commit is a targeted fix to keep it very low-risk for possible inclusion
in Docker 1.11.

Fixes #1621 (but maybe we should open a separate issue for the media
type behavior in the distribution client, and the unnecessary stat).

The schema2 manifest builder fills in this part of the manifest based on
the descriptor it gets back from BlobIngester's Put method. It passes
the correct media type to Put, but Put ends up replacing this value with
application/octet-stream in its return value.

This commit works around the issue in the manifest builder. Arguably Put
should not be changing the media type in its return value, but this
commit is a targeted fix to keep it very low-risk for possible inclusion
in Docker 1.11.

Fixes distribution#1621 (but maybe we should open a separate issue for the media
type behavior in the distribution client, and the unnecessary stat).

Signed-off-by: Aaron Lehmann <[email protected]>
@dmcgowan
Copy link
Collaborator

LGTM

1 similar comment
@RichardScothern
Copy link

LGTM

@codecov-io
Copy link

Current coverage is 51.22%

Merging #1622 into master will decrease coverage by -6.70% as of 2de3f1a

@@            master   #1622   diff @@
======================================
  Files          122     122       
  Stmts        10682   10683     +1
  Branches       839     747    -92
  Methods          0       0       
======================================
- Hit           6188    5472   -716
+ Partial        839     747    -92
- Missed        3655    4464   +809

Review entire Coverage Diff as of 2de3f1a


Uncovered Suggestions

  1. +0.30% via .../driver/s3-aws/s3.go#732...763
  2. +0.28% via .../driver/s3-aws/s3.go#268...297
  3. +0.21% via .../driver/s3-aws/s3.go#884...906
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

@RichardScothern RichardScothern merged commit 467fc06 into distribution:master Apr 12, 2016
aaronlehmann pushed a commit to aaronlehmann/docker that referenced this pull request Apr 12, 2016
…fest

@nwt noticed that the media type specified in the config section of a
schema2 manifest is application/octet-stream, instead of the correct
value application/vnd.docker.container.image.v1+json.

This brings in distribution/distribution#1622 to fix
this.

Signed-off-by: Aaron Lehmann <[email protected]>
mlaventure pushed a commit to mlaventure/docker that referenced this pull request Apr 25, 2016
…fest

@nwt noticed that the media type specified in the config section of a
schema2 manifest is application/octet-stream, instead of the correct
value application/vnd.docker.container.image.v1+json.

This brings in distribution/distribution#1622 to fix
this.

Signed-off-by: Aaron Lehmann <[email protected]>
(cherry picked from commit c18d03a)
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.

schema2 manifest builder specifies config media type as application/octet-stream

5 participants