Bug 1401762

Summary: [devexp_public_1089]oc new-app didn't respect the "hidden" tag of the builder imagestream
Product: OKD Reporter: Wang Haoran <haowang>
Component: BuildAssignee: Jim Minter <jminter>
Status: CLOSED CURRENTRELEASE QA Contact: Wang Haoran <haowang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, bparees
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-30 12:51:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
bc and is json file none

Description Wang Haoran 2016-12-06 02:44:32 UTC
Created attachment 1228255 [details]
bc and is json file

Description of problem:
oc new-app didn't respect the "hidden" tag of the builder imagestream

Version-Release number of selected component (if applicable):
openshift v1.5.0-alpha.0+ec0d94c-243
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0


How reproducible:
always

Steps to Reproduce:
1.create a project and create the ruby is under the project
2.add "hidden" tag to 2.2,2.3,latest is 
3.search the ruby is using new-app
oc new-app -S ruby
4. create app using new-app
oc new-app https://github.com/openshift/ruby-ex

Actual results:
step 3 is correct, the output :
oc new-app -S ruby
Image streams (oc new-app --image-stream=<image-stream> [--code=<source>])
-----
ruby
  Project: haowang
  Tags:    2.0

Docker images (oc new-app --docker-image=<docker-image> [--code=<source>])
-----
ruby
  Registry: Docker Hub
  Tags:     latest

step 4 is still using the 2.3 tag
oc new-app https://github.com/openshift/ruby-ex
--> Found image 4d7553b (4 days old) in image stream "haowang/ruby" under tag "2.3" for "ruby"

    Ruby 2.3 
    -------- 
    Platform for building and running Ruby 2.3 applications

    Tags: builder, ruby, ruby23, rh-ruby23

    * The source repository appears to match: ruby
    * A source build using source code from https://github.com/openshift/ruby-ex will be created
      * The resulting image will be pushed to image stream "ruby-ex:latest"
      * Use 'start-build' to trigger a new build
    * This image will be deployed in deployment config "ruby-ex"
    * Port 8080/tcp will be load balanced by service "ruby-ex"
      * Other containers can access this service through the hostname "ruby-ex"

--> Creating resources ...
    imagestream "ruby-ex" created
    buildconfig "ruby-ex" created
    deploymentconfig "ruby-ex" created
    service "ruby-ex" created
--> Success
    Build scheduled, use 'oc logs -f bc/ruby-ex' to track its progress.
    Run 'oc status' to view your app.


Expected results:
step 4 should use tag 2.2

Additional info:

Comment 1 Jim Minter 2016-12-08 10:52:09 UTC
https://github.com/openshift/origin/pull/12185

Comment 2 Wang Haoran 2016-12-13 05:52:52 UTC
verified with :
oc v1.5.0-alpha.0+a5ae7f1-349
kubernetes v1.4.0+776c994
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://172.18.12.207:8443
openshift v1.5.0-alpha.0+a5ae7f1-349
kubernetes v1.4.0+776c994