-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal to add DockerImageReference to ImageStreamTag #5481
Comments
To fill
Note the image entry. Can't we import |
Not necessarily, we have that information from |
ImageStreamTag already returns dockerImageReference? On Thu, Oct 29, 2015 at 6:23 AM, Maciej Szulik [email protected]
|
@soltysh If I What I'm trying to say is that you may have both |
It does, but it's embedded in the Image. And as we know, the Image's DockerImageReference is only ever the first pull spec it ever saw for that image id. And with v1 images where multiple tags may point to the same id, this is problematic because you may get the "wrong" pull spec for the ImageStreamTag. |
I don't think it's returning a nil event. I think it's returning an event whose Image is empty. But the end result in your example is the same - you get a 404. I like what @soltysh is proposing. Here's where things break down currently. If I
Now, if you
In this case, both tags Adding a |
And this doesn't attempt to address the 404 issue... that's separate. |
The 404 can leverage that field to provide metadata information about the image (including the pull spec), but still with empty |
Good point |
The value you describe is what I would expect imagestreamtag to have set on On Thu, Oct 29, 2015 at 9:38 AM, Maciej Szulik [email protected]
|
Actually, " imageStream.status.tags[].items[0].dockerImageReference" On Thu, Oct 29, 2015 at 9:43 AM, Clayton Coleman [email protected]
|
Per discussion on IRC, we've settled that the |
For clarification, the field to override is |
Pretty sure the UI uses this to correlate builds, deployments, and image streams: Will the proposed change affect this? |
@liggitt I don't believe so. That function operates on ImageStream.status data. |
This idea came from tackling https://bugzilla.redhat.com/show_bug.cgi?id=1268000. The general flow is as follows:
Image.DockerImageReference
will always point to that first imported image.DockerImageReference
returned fromImage.DockerImageReference
(GetImageStreamTag
call ingenerator.go
).LatestTaggedImage(stream, tag)
which returnsTagEvent
which hasDockerImageReference
that might be different fromImage.DockerImageReference
from 1 and might sometimes trigger the 2nd build. Usually theDockerImageReference
inTagEvent
is similar to what was specified in image spec.There are two solutions to this problem:
resolveImageStreamReference
so that forImageStreamTag
it reads the stream and then usesLatestTaggedImage(stream, tag)
to get the same value we do in ImageChange controller (step 3).ImageStreamTag
withDockerImageReference
, especially that under the cover (see imagestreamtag.Get is usingLatestTaggedImage(stream, tag)
and has that information.My preference, as the title points to, is no 2. Because this will also fix the problem of getting proper information when doing
oc get istag/ruby:2.0
. Additionally we'll have consistent behavior all over the places. The former solution is a quick fix for this particular place and not the whole problem. When I was talking to @ncdc he also mentioned removing (or at least trying to)Image.DockerImageReference
field, which the latter could help with. This would also allow better address the problem in #5391 where we return 404 for tags that are references. We could return empty image, but still provide valid metadata information about it.@miminar @ncdc @bparees @smarterclayton opinions?
The text was updated successfully, but these errors were encountered: