Repository navigation
Bug 1327108 - Updated error information when trying to import ImageStream pointing to a different one - #9021
Conversation
| return nil, nil, fmt.Errorf("tag %q points to existing %s %q, it cannot be re-imported", tag, existing.From.Kind, existing.From.Name) | ||
| } | ||
| // disallow changing an existing tag | ||
| if existing.From == nil || existing.From.Kind != "DockerImage" { |
There was a problem hiding this comment.
It seems like the second part of the expression (beginning with ||) is no longer needed.
There was a problem hiding this comment.
Is there a need for the second error message at all?
There was a problem hiding this comment.
Good catch - fixed. And yes it is, see the attached bug.
| // disallow changing an existing tag | ||
| if existing.From == nil || existing.From.Kind != "DockerImage" { | ||
| if existing.From == nil { | ||
| return nil, nil, fmt.Errorf("tag %q already exists - you must use the 'tag' command if you want to change the source to %q", tag, from) |
There was a problem hiding this comment.
Quoting the error message from the mentioned bz:
error: tag "latest" already exists - you must use the 'tag' command if you want to change the source to ""
Since the from may be unset either strip the to %q suffix or make it appear depending on from.
There was a problem hiding this comment.
Yeah, but we lack information why you can't import it. One assumes if the tag is there it should be importable, which is not true for kind != DockerImage.
There was a problem hiding this comment.
We agreed to address the problem upon next PRs that I'll be submitting when fixing import-image.
|
One suggestion. LGTM |
ImageStream pointing to a different one
|
Rebase and merging upon previous approval. [merge] |
|
Flake #9203. [merge] |
|
[merge] yum flake |
|
Flake #9338. |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4886/) (Image: devenv-rhel7_4380) |
|
yum again... [merge] |
|
Evaluated for origin merge up to 4ab49ca |
@smarterclayton @miminar ptal it's addressing the issue https://bugzilla.redhat.com/show_bug.cgi?id=1327108