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

display build chains in oc status #9411

Merged
merged 1 commit into from
Aug 9, 2016

Conversation

gabemontero
Copy link
Contributor

Fixes #8338

@deads2k @Kargakis PTAL

@@ -233,6 +233,9 @@ func (d *ProjectStatusDescriber) Describe(namespace, name string) (string, error
printLines(out, indent, 0, describeMonopod(f, monopod.Pod)...)
}

bcPipelines, _ := graphview.AllImagePipelinesFromBuildConfig(g, graphview.IntSet{})
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this redundant information from what we are already showing? I like the general idea, but I don't like displaying redundant info. Is a build chain useful to me? What about all the other inputs to the build chain? What do we do when there are multiple inputs to the same build (because of image sources)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A few thoughts:

  1. terminology
  • the subject of the associated issue - making the links between build configs obvious
  • the description that follows mentioned "build chains", but given what @smarterclayton points out, "build chains" implies more than the link between build configs
  • so, if making the link between build configs more obvious is something worth pursuing, back off the term "build chain" in any oc status output
  1. location
  • I asked for opinions on whether to denote connection in a separate section (perhaps contributing to the redundancy) vs. tweaking the existing umbrella of output
  • so exploring the latter flavor a little, how would changing this output:
https://www.example.com (svc/frontend)
  dc/frontend deploys istag/origin-ruby-sample:latest <-
    bc/ruby-sample-build builds https://github.com/openshift/ruby-hello-world.git with pipelineproject/ruby-base-image:latest 
      not built yet
    deployment #1 waiting on image

To this output:

https://www.example.com (svc/frontend)
  dc/frontend deploys istag/origin-ruby-sample:latest <-
    bc/ruby-sample-build builds https://github.com/openshift/ruby-hello-world.git with pipelineproject/ruby-base-image:latest (produced by bc/ruby-base) 
      not built yet
    deployment #1 waiting on image

be something worth pursuing (and honor the intent of the associated issue)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this redundant information from what we are already showing?

It wasn't before when I wrote up the bug. There was no way to relate to the two and when you got more than one in, it was very difficult to follow. I like the "produced by" text in @gabemontero's example.

Is a build chain useful to me?

The chain is useful when you're trying to kick a build by rebuilding its input image. It comes up for me when I'm trying to update base layers which contain utilities and prereqs. I have one image with fedora plus basic tools (everything I build runs on top of this), another image with specific prereqs (think: this app needs ffmpeg), and finally my top layer. I want to rebuild image two, not one or three. But the build I remember is for image three. This lets me track backwards.

Copy link
Contributor

Choose a reason for hiding this comment

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

What do we do when there are multiple inputs to the same build (because of image sources)?

Hmmm, that wasn't a thing when I was dealing with this last.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, Images got added to the BuildSource section of the BuildConfig as recently as late 2015 according to git blame. It is a peer member to items like the Git connection information for example in the BuildSource struct, and separate from the "base image" specified in the From field of the 3 classic BuildStrategy types.

It is a way to overlay files from additional images on top of any files produced by the "build" (overloaded term :-) ) performed by the s2i/docker/custom strategies.

There is a minor inspection of it in already oc status here, but specific images are not mentioned.

With that background, next set of thoughts:

  1. leave any expansion of the exposure of Images to the trello card opened based on @smarterclayton 's call for a formal proposal on pipelines, alignment with console, etc.
  2. in the short term, I'll refactor this pull to generate the "produce by..." output noted earlier; through either further discussion here or as 1) progresses, if such a change is deemed as an acceptable, short-term/tactical change, we can move toward merge; as such, I'll change this PR to WIP in the interim

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, i've pushed the updates for "produced by ...."

pending comments on the specific changes, putting this PR on hold until https://trello.com/c/hHx4HrCG/966-integrate-pipeline-stages-into-oc-status gets going enough to determine for sure whether this addition to the existing output is acceptable.

@smarterclayton
Copy link
Contributor

Have you discussed this with Jessica and how it fits into the consistent pipeline visual experience we want across both status and the UI for 1.3?

@gabemontero
Copy link
Contributor Author

I have not - will talk to her.

On Saturday, June 18, 2016, Clayton Coleman notifications@github.com
wrote:

Have you discussed this with Jessica and how it fits into the consistent
pipeline visual experience we want across both status and the UI for 1.3?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#9411 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ADbadIu90y6Hz-oKzXGIeyncnWX6Wj4iks5qNGnWgaJpZM4I4uXr
.

@smarterclayton
Copy link
Contributor

I'd like to see a proposal for how we're going to integrate pipeline stages into oc status (in combination with this, and also test deployments) before we implement something, and it definitely needs to align with the console visual direction.

@gabemontero
Copy link
Contributor Author

@gabemontero gabemontero changed the title display build chains in oc status WIP: display build chains in oc status Jun 20, 2016
@deads2k
Copy link
Contributor

deads2k commented Jun 29, 2016

"produced by" works for me, though "from" is shorter.

@smarterclayton are you sure we should block this improvement on pipeline stages? This is helpful now and we don't guarantee stable output from oc status.

@gabemontero is there a reasonable way to detect that the image you're using was imported? If there's no build pointed to it and the image stream is set up for periodic imports, it seems reasonable to indicate that it triggers on a time based import.

@gabemontero
Copy link
Contributor Author

I've pushed an addition that searches for scheduled imports and adds a (import scheduled) parenthetical to the output if no bc input chain exists and imports are scheduled.

@gabemontero gabemontero force-pushed the issue8338 branch 2 times, most recently from 55eba0f to 40595de Compare July 1, 2016 14:15
@smarterclayton
Copy link
Contributor

We can't keep adding things to oc status incrementally if we don't preserve room for the really important stuff coming down. Some of these things end up just being noise (we can't show everything in oc status) so I'm mostly looking for this to be "user driven" instead of "feature driven". Make the justification based on whether the user (both first time and experienced) must know this info, then work backwards. Can you paste representative latest example?

@bparees
Copy link
Contributor

bparees commented Jul 18, 2016

trying to mirror the web console overview in oc status seems like a mistake. to me, oc status is "tell me if there is anything obviously wrong w/ my configuration that i should look into".

(this comment applies to both the original build-chain request, and the pipeline representation).

we have oadm build-chain for showing build-chains. I'd be open to moving that command somewhere more natural for users, but oc status doesn't seem like the place.

@smarterclayton
Copy link
Contributor

oc status is not really that. oc status is intended to be a summary of
what is going on right now in your project in a way that is relevant to a
CLI user, so it is the overview. It also gives you the summarization of
status, but it's not solely intended for that. So chains of builds need to
be succinctly represented, especially if they result in deployments.

On Mon, Jul 18, 2016 at 5:17 PM, Ben Parees notifications@github.com
wrote:

trying to mirror the web console overview in oc status seems like a
mistake. to me, oc status is "tell me if there is anything obviously wrong
w/ my configuration that i should look into".

(this comment applies to both the original build-chain request, and the
pipeline representation).

we have oadm build-chain for showing build-chains. I'd be open to moving
that command somewhere more natural for users, but oc status doesn't seem
like the place.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#9411 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_pzn69tQ0SB0b-rDz_nOeH46hfpVwks5qW-10gaJpZM4I4uXr
.

@bparees
Copy link
Contributor

bparees commented Jul 19, 2016

oc status is not really that. oc status is intended to be a summary of
what is going on right now in your project in a way that is relevant to a
CLI user

do we have data that this is of value to users or requested by them? it's pretty hard to concisely and clearly represent that kind of information in a console form, particularly if your project is anything other than trivial (and if you're the kind of user who's creating trivial projects, I bet you're a user who's using the web console).

And it's only going to get worse(more complex to represent) with pipelines.

@bparees
Copy link
Contributor

bparees commented Jul 19, 2016

Maybe we can discuss this at tomorrow's CLI review (after discussing build commands). @fabianofranz @jwforres

@deads2k
Copy link
Contributor

deads2k commented Jul 19, 2016

do we have data that this is of value to users or requested by them? it's pretty hard to concisely and clearly represent that kind of information in a console form, particularly if your project is anything other than trivial (and if you're the kind of user who's creating trivial projects, I bet you're a user who's using the web console).

"It's really hard to find and describe all the links between the various elements of my project" seems like an argument to provide the information, not an argument to give up and leave the linking to the user.

@gabemontero
Copy link
Contributor Author

Re-posting a sample output per recent request:

https://www.example.com (svc/frontend)
  dc/frontend deploys istag/origin-ruby-sample:latest <-
    bc/ruby-sample-build builds https://github.com/openshift/ruby-hello-world.git with pipelineproject/ruby-base-image:latest (produced by bc/ruby-base) 
      not built yet
    deployment #1 waiting on image

@gabemontero
Copy link
Contributor Author

For the flavor where import of the builder image is scheduled:

https://www.example.com (svc/frontend)
  dc/frontend deploys istag/origin-ruby-sample:latest <-
    bc/ruby-sample-build builds https://github.com/openshift/ruby-hello-world.git with pipelineproject/ruby-base-image:latest (import scheduled) 
      not built yet
    deployment #1 waiting on image

@gabemontero gabemontero changed the title WIP: display build chains in oc status display build chains in oc status Jul 19, 2016
@gabemontero
Copy link
Contributor Author

OK, per the discussion in CLI Design Review, I think we are ready to consider this for merging again.

IGTM comments were posted previously, but mergers, please re-review as you see fit, and then perhaps we can get the merge comment posted subsequently.

thanks

@bparees
Copy link
Contributor

bparees commented Jul 19, 2016

"It's really hard to find and describe all the links between the various elements of my project" seems like an argument to provide the information, not an argument to give up and leave the linking to the user.

no, it's an argument to use the right tool for the job, which in this case, imho, is not console text. I look forward to endless future debates about the right way to present this text(and how much text) to users when we get there.

@gabemontero
Copy link
Contributor Author

bump @deads2k @bparees or @smarterclayton - any final reviews / are we good to merge ?

@@ -8,6 +8,7 @@ import (
osgraph "github.com/openshift/origin/pkg/api/graph"
buildedges "github.com/openshift/origin/pkg/build/graph"
buildgraph "github.com/openshift/origin/pkg/build/graph/nodes"
//imageapi "github.com/openshift/origin/pkg/image/api"
Copy link
Contributor

Choose a reason for hiding this comment

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

delete this if we don't need it anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted.

On Mon, Jul 25, 2016 at 12:35 PM, Ben Parees notifications@github.com
wrote:

In pkg/api/graph/graphview/image_pipeline.go
#9411 (comment):

@@ -8,6 +8,7 @@ import (
osgraph "github.com/openshift/origin/pkg/api/graph"
buildedges "github.com/openshift/origin/pkg/build/graph"
buildgraph "github.com/openshift/origin/pkg/build/graph/nodes"

  • //imageapi "github.com/openshift/origin/pkg/image/api"

delete this if we don't need it anymore?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/openshift/origin/pull/9411/files/2eb378ef04518695d44ee2e03bcb9c38a7d94e0c#r72098002,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADbadPi76lgcWXjK-WBZZ66jizuWsXCwks5qZOW-gaJpZM4I4uXr
.

@bparees
Copy link
Contributor

bparees commented Jul 25, 2016

one nit and lgtm but i'd like @Kargakis or @deads2k to sign off.

@smarterclayton
Copy link
Contributor

I land on David's side on "not giving up" on this data, and it's the assumption status is built under now, so the burden of creation will be here.

The output looks fine to me for now, but I haven't looked at the graph code.

@gabemontero
Copy link
Contributor Author

@smarterclayton bump ... sounded like you wanted to look at the graph code but were good with the output
@deads2k I believe you had posted igtm, but just in case ...
@bparees fyi

@gabemontero
Copy link
Contributor Author

@smarterclayton bump

@smarterclayton
Copy link
Contributor

LGTM [merge]

@smarterclayton
Copy link
Contributor

[merge] #9490
https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_check/4736/

On Tue, Aug 9, 2016 at 1:52 PM, OpenShift Bot notifications@github.com
wrote:

continuous-integration/openshift-jenkins/merge FAILURE (
https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7678/)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#9411 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_pzYD_F8qdxzAWCjt8byKAUZS8BJ9ks5qeL5igaJpZM4I4uXr
.

@gabemontero
Copy link
Contributor Author

There was one failure in the conformance tests that looks like a prior flake (will open explicit flake if that proves to be the case ).

Investigating with a local repro attempt.

@gabemontero
Copy link
Contributor Author

(Thanks @smarterclayton for rehitting the merge button in interim)

@gabemontero
Copy link
Contributor Author

@gabemontero
Copy link
Contributor Author

test passes in my local copy of this branch

@openshift-bot
Copy link
Contributor

openshift-bot commented Aug 9, 2016

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

@gabemontero
Copy link
Contributor Author

this time, the integration test suffered a panic in github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/unversioned.RetryOnConflict.func1 at /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/unversioned/util.go:64

and the origin_check failed with:

FAILURE after 0.335s: test/cmd/migrate.sh:38: executing 'oc import-image --from=php:latest test:2 --confirm' expecting success: the command returned the wrong error code
There was no output from the command.
Standard error from the command:
Error from server: Operation cannot be fulfilled on imagestream "test": the image stream was updated from "5720" to "5721"

Bot unrelated to the oc status change.

@bparees
Copy link
Contributor

bparees commented Aug 9, 2016

@gabemontero do we have open flake issues for all 3 of those things? seems like we should.

@gabemontero
Copy link
Contributor Author

@bparees Created https://ci.openshift.redhat.com/jenkins/failure-cause-management/57aa4522e4b05a5281cce649 for the import image issue on the origin_check

And created https://ci.openshift.redhat.com/jenkins/failure-cause-management/57aa465fe4b05a5281cce64d for the k8s panic.

Mind hitting the merge button one more time? thanks ...

@bparees
Copy link
Contributor

bparees commented Aug 9, 2016

now that we have flake issues for them, i don't :)
[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 3b70f9c

@openshift-bot openshift-bot merged commit 92c4448 into openshift:master Aug 9, 2016
@gabemontero gabemontero deleted the issue8338 branch August 10, 2016 13:43
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.

5 participants