Skip to content

Conversation

@mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Sep 20, 2016

Instead of manipulating an ImageStreamMapping and having to do exactly what OpenShift does, just use the Docker Registry API and let the server side deal with that.

This fixes “unexpected end of JSON input” when uploading schema2 manifests (because we didn’t also include the config object), and should resolve containers/skopeo#208 (by using the existing code on the server side)

@miminar
Copy link
Contributor

miminar commented Sep 20, 2016

LGTM

@miminar
Copy link
Contributor

miminar commented Sep 20, 2016

See related OpenShift issue: openshift/origin#11012

@runcom
Copy link
Member

runcom commented Sep 20, 2016

lgtm

Approved with PullApprove

mtrmac added a commit to mtrmac/image that referenced this pull request Sep 20, 2016
Not pushing to a tag makes the image impossible to pull with a tag.

This is not really correct because we keep the Name and Tag in schema1
manifests unmodified, and older registry versions (in particular
OpenShift 1.1) do inspect those fields.  But, it is better than nothing,
and for OpenShift manifest uploads via the Docker API
( containers#95 )a tag is required.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@mtrmac
Copy link
Collaborator Author

mtrmac commented Sep 20, 2016

So, this fails because a tag is optional in the Docker Registry API, but mandatory in OpenShift (ultimately via https://github.com/openshift/origin/blob/master/pkg/image/api/validation/validation.go#L246 ). Ideally we would want #88 , but let’s go with the very minimal pseudo-fix: #98 , will make this dependent on it. (mtrmac/skopeo:integrate-all-the-things is alraedy using the minimal fix from #98 ).

mtrmac added a commit to mtrmac/image that referenced this pull request Sep 20, 2016
Not pushing to a tag makes the image impossible to pull with a tag.

This is not really correct because we keep the Name and Tag in schema1
manifests unmodified, and older registry versions (in particular
OpenShift 1.1) do inspect those fields.  But, it is better than nothing,
and for OpenShift manifest uploads via the Docker API
( containers#95 )a tag is required.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
…ifest

Instead of manipulating an ImageStreamMapping and having to do exactly
what OpenShift does, just use the Docker Registry API and let the server
side deal with that.

This fixes “unexpected end of JSON input” when uploading schema2
manifests (because we didn’t also include the config object), and should
resolve containers/skopeo#208 (by using the
existing code on the server side)

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@mtrmac
Copy link
Collaborator Author

mtrmac commented Sep 20, 2016

👍

Approved with PullApprove

@mtrmac mtrmac merged commit fcaa845 into containers:master Sep 20, 2016
@mtrmac mtrmac deleted the openshift-manifest branch September 20, 2016 15:52
Jamesjaj2dc6j added a commit to Jamesjaj2dc6j/lucascalsilvaa that referenced this pull request Jun 6, 2022
Not pushing to a tag makes the image impossible to pull with a tag.

This is not really correct because we keep the Name and Tag in schema1
manifests unmodified, and older registry versions (in particular
OpenShift 1.1) do inspect those fields.  But, it is better than nothing,
and for OpenShift manifest uploads via the Docker API
( containers/image#95 )a tag is required.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mrhyperbit23z0d added a commit to mrhyperbit23z0d/thomasdarimont that referenced this pull request Jun 6, 2022
Not pushing to a tag makes the image impossible to pull with a tag.

This is not really correct because we keep the Name and Tag in schema1
manifests unmodified, and older registry versions (in particular
OpenShift 1.1) do inspect those fields.  But, it is better than nothing,
and for OpenShift manifest uploads via the Docker API
( containers/image#95 )a tag is required.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
easyriderk0c9g added a commit to easyriderk0c9g/rnin9 that referenced this pull request Jun 6, 2022
Not pushing to a tag makes the image impossible to pull with a tag.

This is not really correct because we keep the Name and Tag in schema1
manifests unmodified, and older registry versions (in particular
OpenShift 1.1) do inspect those fields.  But, it is better than nothing,
and for OpenShift manifest uploads via the Docker API
( containers/image#95 )a tag is required.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
oguzturker8ijm8l added a commit to oguzturker8ijm8l/diwir that referenced this pull request Jun 6, 2022
Not pushing to a tag makes the image impossible to pull with a tag.

This is not really correct because we keep the Name and Tag in schema1
manifests unmodified, and older registry versions (in particular
OpenShift 1.1) do inspect those fields.  But, it is better than nothing,
and for OpenShift manifest uploads via the Docker API
( containers/image#95 )a tag is required.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
wesnowm added a commit to wesnowm/MatfOOP- that referenced this pull request Jun 6, 2022
Not pushing to a tag makes the image impossible to pull with a tag.

This is not really correct because we keep the Name and Tag in schema1
manifests unmodified, and older registry versions (in particular
OpenShift 1.1) do inspect those fields.  But, it is better than nothing,
and for OpenShift manifest uploads via the Docker API
( containers/image#95 )a tag is required.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
gaveen3 added a commit to gaveen3/KimJeongHoon3x that referenced this pull request Jun 6, 2022
Not pushing to a tag makes the image impossible to pull with a tag.

This is not really correct because we keep the Name and Tag in schema1
manifests unmodified, and older registry versions (in particular
OpenShift 1.1) do inspect those fields.  But, it is better than nothing,
and for OpenShift manifest uploads via the Docker API
( containers/image#95 )a tag is required.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
gaveen3 added a commit to gaveen3/KimJeongHoon3x that referenced this pull request Jun 6, 2022
Not pushing to a tag makes the image impossible to pull with a tag.

This is not really correct because we keep the Name and Tag in schema1
manifests unmodified, and older registry versions (in particular
OpenShift 1.1) do inspect those fields.  But, it is better than nothing,
and for OpenShift manifest uploads via the Docker API
( containers/image#95 )a tag is required.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Manuel-Suarez-Abascal80n9y added a commit to Manuel-Suarez-Abascal80n9y/knimeu that referenced this pull request Oct 7, 2022
Not pushing to a tag makes the image impossible to pull with a tag.

This is not really correct because we keep the Name and Tag in schema1
manifests unmodified, and older registry versions (in particular
OpenShift 1.1) do inspect those fields.  But, it is better than nothing,
and for OpenShift manifest uploads via the Docker API
( containers/image#95 )a tag is required.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
straiforos8bsh5n added a commit to straiforos8bsh5n/tokingsq that referenced this pull request Oct 7, 2022
Not pushing to a tag makes the image impossible to pull with a tag.

This is not really correct because we keep the Name and Tag in schema1
manifests unmodified, and older registry versions (in particular
OpenShift 1.1) do inspect those fields.  But, it is better than nothing,
and for OpenShift manifest uploads via the Docker API
( containers/image#95 )a tag is required.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
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.

Create imagestream during oc copy

3 participants