Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1690799 - Better remove spec.output field from the example bc of openshift webconsole
Summary: Better remove spec.output field from the example bc of openshift webconsole
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.1.0
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-20 09:39 UTC by XiuJuan Wang
Modified: 2019-03-28 17:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-28 17:04:53 UTC
Target Upstream Version:


Attachments (Terms of Use)
Need remove spec.output from bc (deleted)
2019-03-21 02:35 UTC, XiuJuan Wang
no flags Details

Description XiuJuan Wang 2019-03-20 09:39:15 UTC
Description of problem:
Better remove spec.output field from the example bc of openshift webconsole, orelse the created build will show 'InvalidOutputReference'.

Version-Release number of selected component (if applicable):

4.0.0-0.nightly-2019-03-18-200009

How reproducible:
always

Steps to Reproduce:
1.Create a bc with the default example bc from openshift webconsole
2.Check build
3.

Actual results:
Build shows 'InvalidOutputReference' error since no output imagestreamtag created
$  oc get is 
No resources found.
$  oc get builds
NAME               TYPE              FROM          STATUS                         STARTED          DURATION
example-1          Source            Git@master    New (InvalidOutputReference)                 

Expected results:
Remove output section from default YAML
  output:
    to:
      kind: ImageStreamTag
      name: 'example:latest'
Then the build could be running without error

Additional info:
here maybe we can show before removing spec.output.

$ oc get bc example  -n xiu -o yaml 
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
  creationTimestamp: 2019-03-20T07:51:51Z
  name: example
  namespace: xiu
  resourceVersion: "1846653"
  selfLink: /apis/build.openshift.io/v1/namespaces/xiu/buildconfigs/example
  uid: 05fb4d1a-4ae5-11e9-847d-0a580a820198
spec:
  failedBuildsHistoryLimit: 5
  nodeSelector: null
  output:
    to:
      kind: ImageStreamTag
      name: example:latest
  postCommit: {}
  resources: {}
  runPolicy: Serial
  source:
    git:
      ref: master
      uri: https://github.com/openshift/ruby-ex.git
    type: Git
  strategy:
    sourceStrategy:
      from:
        kind: ImageStreamTag
        name: ruby:2.4
        namespace: openshift
    type: Source
  successfulBuildsHistoryLimit: 5
  triggers:
  - imageChange:
      lastTriggeredImageID: image-registry.openshift-image-registry.svc:5000/openshift/ruby@sha256:be556eedae4dd46cb560c8698e93dd72f588ee335fb59667deb1fa371199dca6
    type: ImageChange
  - type: ConfigChange
status:
  lastVersion: 1

Comment 1 Samuel Padgett 2019-03-20 13:39:05 UTC
https://github.com/openshift/console/pull/1311

Comment 2 XiuJuan Wang 2019-03-21 02:35:14 UTC
Created attachment 1546282 [details]
Need remove spec.output from bc

Comment 3 XiuJuan Wang 2019-03-21 02:50:06 UTC
Samuel,
Sorry, slow ydown your step, let me add more areas for improvement:

1. As the attachment comment #2, also need remove spec.output from the examples bc of `Build from Dockerfile`and `Source-to-Image (S2I) build`.

2. The `pipeline build` need have a description, such as "before pipeline build create, need a jenkins pod runs", orelse the pipeline build always keep 'new' status lack of jenkins running.

3. For the `Build from Dockerfile`, need modify spec.strategy.dockerStrategy.imagestreamtag to use ruby:2.2, since https://github.com/openshift/ruby-hello-world.git is little outdate, and ruby:latest point to ruby:2.5. The combine conduces docker build failed.

Comment 4 Samuel Padgett 2019-03-21 13:07:45 UTC
(In reply to XiuJuan Wang from comment #3)
> 1. As the attachment comment #2, also need remove spec.output from the
> examples bc of `Build from Dockerfile`and `Source-to-Image (S2I) build`.

I'm not sure I agree with this. We need some YAML examples with an output image stream, otherwise it will be hard for users to discover how to set that. I'm a little unsure if this change in general is right even for the default template. It's nice if the YAML works out of the box, but really it's meant to be a template for creating real applications. To use these for real, you need to modify the example YAML. The more we take out of the examples, the harder it is to know that those capabilities exist and the properties to set to enable them. We now have a build that runs, but it doesn't do anything with the image. I guess it's better, but it's still unclear to me. I'd rather keep the output image in the other examples.


> 2. The `pipeline build` need have a description, such as "before pipeline
> build create, need a jenkins pod runs", orelse the pipeline build always
> keep 'new' status lack of jenkins running.

I think this really needs to be a doc link to the pipelines documentation, but the 4.0 doc is still being written. This will need to be a follow-on task.


> 3. For the `Build from Dockerfile`, need modify
> spec.strategy.dockerStrategy.imagestreamtag to use ruby:2.2, since
> https://github.com/openshift/ruby-hello-world.git is little outdate, and
> ruby:latest point to ruby:2.5. The combine conduces docker build failed.

I think the right thing to do is update the ruby-hello-world example itself. I would rather make the example work with the newer Ruby version than to use a backlevel Ruby. I'm guessing this is also a problem for the example git repository when created through the "Developer Catalog"? This should be a separate bug.


Moving back to ON_QA.

Comment 5 XiuJuan Wang 2019-03-22 06:16:41 UTC
(In reply to Samuel Padgett from comment #4)
> (In reply to XiuJuan Wang from comment #3)
> > 1. As the attachment comment #2, also need remove spec.output from the
> > examples bc of `Build from Dockerfile`and `Source-to-Image (S2I) build`.
> 
> I'm not sure I agree with this. We need some YAML examples with an output
> image stream, otherwise it will be hard for users to discover how to set
> that. I'm a little unsure if this change in general is right even for the
> default template. It's nice if the YAML works out of the box, but really
> it's meant to be a template for creating real applications. To use these for
> real, you need to modify the example YAML. The more we take out of the
> examples, the harder it is to know that those capabilities exist and the
> properties to set to enable them. We now have a build that runs, but it
> doesn't do anything with the image. I guess it's better, but it's still
> unclear to me. I'd rather keep the output image in the other examples.

It will make costomers confused if they use these examples to trigger builds.
But I agreed with you about "We need some YAML examples with an output image stream"
 
> > 3. For the `Build from Dockerfile`, need modify
> > spec.strategy.dockerStrategy.imagestreamtag to use ruby:2.2, since
> > https://github.com/openshift/ruby-hello-world.git is little outdate, and
> > ruby:latest point to ruby:2.5. The combine conduces docker build failed.
> 
> I think the right thing to do is update the ruby-hello-world example itself.
> I would rather make the example work with the newer Ruby version than to use
> a backlevel Ruby. I'm guessing this is also a problem for the example git

Agreed.
> repository when created through the "Developer Catalog"? This should be a
> separate bug.
> 
> 
> Moving back to ON_QA.

Verified this issue with 4.0.0-0.nightly-2019-03-22-002648 build.


Note You need to log in before you can comment on or make changes to this bug.