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

oc new-app support for "hidden" tag in imagestreams #12100

Merged

Conversation

jim-minter
Copy link
Contributor

@bparees
Copy link
Contributor

bparees commented Dec 1, 2016

!!! gofmt needs to be run on the following files: 
Try running 'gofmt -s -d [path]'
Or autocorrect with 'hack/verify-gofmt.sh | xargs -n 1 gofmt -s -w'
./pkg/generate/app/imagestreamlookup_test.go
./test/integration/newapp_test.go

@@ -143,6 +143,13 @@ func (r ImageStreamSearcher) Search(precise bool, terms ...string) (ComponentMat
}
foundOtherTags = true

// This check after foundOtherTags = true, because in the case that
// we have an ImageStream with all tags hidden, we should behave as
// if it didn't exist at all.
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we claiming we found other tags if we're trying to act like they don't exist?

Copy link
Contributor

Choose a reason for hiding this comment

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

ah i guess i see it's because if we didn't "find other tags" then it's going to create a match for the imagestream.

if we did find other tags (or lie about having found them), then it will not create that match.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The comment I added in the code clearly didn't help much! I've rewritten the comment; maybe it'll be more useful the second time around. This corner is also covered by a test case.

@bparees
Copy link
Contributor

bparees commented Dec 1, 2016

aside from the formatting issue, lgtm.

@bparees
Copy link
Contributor

bparees commented Dec 1, 2016

@jwforres fyi

@jim-minter jim-minter force-pushed the trello124-hidden-imagestreams branch from f5b1b07 to 7843f21 Compare December 2, 2016 08:24
@jim-minter
Copy link
Contributor Author

ah, my editor doesn't automatically apply gofmt -s simplifications.

@jim-minter jim-minter force-pushed the trello124-hidden-imagestreams branch from 7843f21 to 357d864 Compare December 2, 2016 08:56
@jim-minter
Copy link
Contributor Author

@bparees all changes made

@jim-minter jim-minter force-pushed the trello124-hidden-imagestreams branch from 357d864 to 1fbb556 Compare December 2, 2016 10:22
@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 1fbb556

@jwforres
Copy link
Member

jwforres commented Dec 2, 2016 via email

@jim-minter
Copy link
Contributor Author

@jwforres I don't know if it answers your question, but nodejs 0.10 is already marked hidden in master today, see examples/image-streams/image-streams-centos7.json:

          {
            "name": "0.10",
            "annotations": {
              "openshift.io/display-name": "Node.js 0.10",
              "description": "DEPRECATED: Build and run Node.js 0.10 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/0.10/README.md.",
              "iconClass": "icon-nodejs",
              "tags": "hidden,nodejs",
              "supports":"nodejs:0.10,nodejs:0.1,nodejs",
              "version": "0.10",
              "sampleRepo": "https://github.com/openshift/nodejs-ex.git"
            },
            "from": {
              "kind": "DockerImage",
              "name": "openshift/nodejs-010-centos7:latest"
            }
          },

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11923/) (Base Commit: 7b90443)

@bparees
Copy link
Contributor

bparees commented Dec 2, 2016

@jwforres as @jim-minter said, we've already put the tag on the nodejs 0.10 imagestreams, so assuming things get refreshed properly for 1.5, the answer is yes (in fact if they get refreshed again before 1.4 then even 1.4 will have it, as will anyone using master)

@bparees
Copy link
Contributor

bparees commented Dec 2, 2016

lgtm [merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Dec 2, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11923/) (Image: devenv-rhel7_5466)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 1fbb556

@openshift-bot openshift-bot merged commit 1befad8 into openshift:master Dec 2, 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.

4 participants