Skip to content
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

Bug 1318537 - Add warning when trying to import non-existing tag #8117

Merged
merged 1 commit into from
Mar 20, 2016

Conversation

soltysh
Copy link
Contributor

@soltysh soltysh commented Mar 18, 2016

@mfojtik
Copy link
Contributor

mfojtik commented Mar 18, 2016

LGTM

@@ -347,6 +347,11 @@ func (o *ImportImageOptions) createImageImport() (*imageapi.ImageStream, *imagea
if len(from) == 0 {
from = stream.Spec.DockerImageRepository
}
// if the from is still empty this means there's no such tag defined
// nor we can't create any from .spec.dockerImageRepository
if len(from) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also tell the user to use the "tag" command if they want to do this.

@soltysh
Copy link
Contributor Author

soltysh commented Mar 18, 2016

@smarterclayton added tag command in the error message.

// if the from is still empty this means there's no such tag defined
// nor we can't create any from .spec.dockerImageRepository
if len(from) == 0 {
return nil, nil, fmt.Errorf("the tag %q does not exists on the image stream - use the 'tag' command to create it or choose a different tag to import", tag)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exist instead of exists. For second part, choose an existing tag to import or use the 'tag' command to create a new tag

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg, sorry for that exists - fixed.

@smarterclayton
Copy link
Contributor

LGTM [merge]

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@soltysh
Copy link
Contributor Author

soltysh commented Mar 18, 2016

Fixed the typo in tests exist instead of exists.

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 6e84e1f

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/2330/)

@smarterclayton
Copy link
Contributor

[merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/5381/) (Image: devenv-rhel7_3787)

@soltysh
Copy link
Contributor Author

soltysh commented Mar 20, 2016

Flake #8039.
[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 6e84e1f

openshift-bot pushed a commit that referenced this pull request Mar 20, 2016
@openshift-bot openshift-bot merged commit 2ddfc71 into openshift:master Mar 20, 2016
@soltysh soltysh deleted the bug1318537 branch March 21, 2016 09:07
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.

4 participants