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

Add option to tag image using image reference #16

Closed
wants to merge 3 commits into from

Conversation

etiennecoutaud
Copy link

Hi, this PR is to add the possibility to tag an image with the OpenShiftImageTagger in ImageStreamImage mode using the reference of an image and not a tag.

@gabemontero
Copy link
Contributor

Hey @etiennecoutaud

So you'll need to rebase a bit.

First, on Thursday PM USA time, I checked in a change to split out the image stream name and tag name into separate fields / instance variables. Your change looks like it is based on the old form. So you'll need to resolve those conflicts.

Then after you opened this PR, based on input from the openshift-restclient-java folks the decision was made to go with this PR instead of yours for the openshift-restclient-java change. So you'll need to adjust this PR to consume the similar but not exactly the same API.

Lastly, I'm wondering if we can discern between ImageStreamImage and ImageStreamTag without having the user specify with a new config panel. Here's what I'm thinking (though have not coded it up to confirm it is correct):

  1. Call IImageStream.getImageId(String tagName) (on source image stream) with the parameter provided.
  2. If it returns something, the tagName provided must be an ImageStreamTag
  3. Otherwise, we can assume it is a ImageStreamImage
    Can you try that out and see if it works? If it does not work, we'll go with the new UI field you added.

thanks

@etiennecoutaud
Copy link
Author

Hi @gabemontero

Okay I will try this using your change and the PR for the openshift-restclient-java to adjust with the new API.

Discerning between ImageStreamImage and ImageStreamTag without having the user specifiy is a good idea. I will implement that and see if it works

@openshift-bot
Copy link

Can one of the admins verify this patch?

@gabemontero
Copy link
Contributor

Hey @etiennecoutaud - if you don't think you'll get back to this, and are still interested, I can convert this to an issue for us to track and close out this PR. We have reworked the tagging code a bit since you originally created this pull. At the moment, you specify the tag name, and we translate it to a ImageStreamImage ref. Longer term, I'm thinking we add a toggle to choose between ImageStreamImage and ImageStreamTag ref (i.e. the equivalent the --alias option).

@openshift-bot
Copy link

Can one of the admins verify this patch?

@gabemontero
Copy link
Contributor

Hey @etiennecoutaud - I've gone ahead and commited this enhancement via 486f69b, and as such, will close out this PR. If you are at all still interested in this, please pull down the latest version and give it a try.

Thanks.

@gabemontero gabemontero closed this Apr 5, 2016
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.

None yet

3 participants