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 describe build output improvements #8293

Conversation

php-coder
Copy link
Contributor

Trello card: https://trello.com/c/l8CyWprA/863-3-clean-up-the-build-describe-output
Fix #5247

PTAL @bparees @jwforres @smarterclayton

Note: build config describer mostly unchanged.

Example output:

$ oc describe build ruby-hello-world-1 
Name:           ruby-hello-world-1
Created:        58 seconds ago
Labels:         app=ruby-hello-world
                buildconfig=ruby-hello-world
                openshift.io/build-config.name=ruby-hello-world
Annotations:    openshift.io/build.number=1
                openshift.io/build.pod-name=ruby-hello-world-1-build

Status:         Complete
Started:        Fri, 01 Apr 2016 14:22:36 UTC
Duration:       46s
Build Config:   ruby-hello-world
Build Pod:      ruby-hello-world-1-build

Strategy:           Source
URL:                https://github.com/openshift/ruby-hello-world.git
Commit:             bd94cbb (Merge pull request #52 from bparees/stdout)
Author/Committer:   Ben Parees
From Image:         DockerImage centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c
Output to:          ImageStreamTag ruby-hello-world:latest
Push Secret:        builder-dockercfg-m9x7z

Events:
  FirstSeen LastSeen    Count   From                SubobjectPath           Type        Reason      Message
  --------- --------    -----   ----                -------------           --------    ------      -------
  58s       58s     1   {default-scheduler }                        Normal      Scheduled   Successfully assigned ruby-hello-world-1-build to localhost.localdomain
  57s       57s     1   {kubelet localhost.localdomain} spec.containers{sti-build}  Normal      Pulled      Container image "openshift/origin-sti-builder:v1.1.4" already present on machine
  56s       56s     1   {kubelet localhost.localdomain} spec.containers{sti-build}  Normal      Created     Created container with docker id 328f9f39f368
  56s       56s     1   {kubelet localhost.localdomain} spec.containers{sti-build}  Normal      Started     Started container with docker id 328f9f39f368
$ oc describe bc/ruby-hello-world
Name:           ruby-hello-world
Created:        11 minutes ago
Labels:         app=ruby-hello-world
Annotations:    openshift.io/generated-by=OpenShiftNewApp
Latest Version: 1

Strategy:           Source
URL:                https://github.com/openshift/ruby-hello-world.git
From Image:         ImageStreamTag ruby-22-centos7:latest
Output to:          ImageStreamTag ruby-hello-world:latest
Triggered by:       Config, ImageChange
Webhook GitHub:     https://localhost:8443/oapi/v1/namespaces/test/buildconfigs/ruby-hello-world/webhooks/Fbklht-OP-w1EMEWOJXY/github
Webhook Generic:    https://localhost:8443/oapi/v1/namespaces/test/buildconfigs/ruby-hello-world/webhooks/xshVl6kq2OYcdLJYabPl/generic

Build               Status      Duration    Creation Time
ruby-hello-world-1  complete    46s         2016-04-01 14:22:33 +0000 UTC

@php-coder php-coder force-pushed the gh5247_build_and_build_config_ux_improvements branch from de43648 to b75b543 Compare April 1, 2016 14:30
@jwforres
Copy link
Member

jwforres commented Apr 1, 2016

This is looking a lot better, the only thing i'm not sure about is that all the source details are before the Strategy: Source line.

@php-coder
Copy link
Contributor Author

@jwforres Yes, I can re-order them:

$ oc describe build ruby-hello-world-1 
...
Strategy:       Source
From Image:     DockerImage centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c
Output to:      ImageStreamTag ruby-hello-world:latest
Push Secret:    builder-dockercfg-m9x7z

URL:                https://github.com/openshift/ruby-hello-world.git
Commit:             bd94cbb (Merge pull request #52 from bparees/stdout)
Author/Committer:   Ben Parees
$ oc describe bc/ruby-hello-world
...
Strategy:           Source
From Image:         ImageStreamTag ruby-22-centos7:latest
Output to:          ImageStreamTag ruby-hello-world:latest
Triggered by:       Config, ImageChange
Webhook GitHub:     https://localhost:8443/oapi/v1/namespaces/test/buildconfigs/ruby-hello-world/webhooks/Fbklht-OP-w1EMEWOJXY/github
Webhook Generic:    https://localhost:8443/oapi/v1/namespaces/test/buildconfigs/ruby-hello-world/webhooks/xshVl6kq2OYcdLJYabPl/generic

URL:    https://github.com/openshift/ruby-hello-world.git

@bparees
Copy link
Contributor

bparees commented Apr 1, 2016

i'm not convinced we need a line break between the strategy/from/etc block and the url/commit/etc block.

all those items are config/input into the buildconfig or build that was run, so i think they can be grouped together ("From Image" has just as much impact on your build result as your "URL", for example, and either one can change for a given build)

putting the URL right under the strategy seems desirable since for most cases we'd then have:

Strategy: Source
URL: https://foo.bar/foo.git

which has a very natural flow to it, imo

@bparees
Copy link
Contributor

bparees commented Apr 1, 2016

otherwise i second @jwforres, this is a huge improvement, thanks!

@bparees
Copy link
Contributor

bparees commented Apr 1, 2016

will Author/Committer show two values if they are different? (under what circumstances could they be different? i'm not up on my git terminology :) )

@jwforres
Copy link
Member

jwforres commented Apr 1, 2016

Author is the original author of the commit (I think) and then in cases
where someone does a rebase that includes someone else's commits, then the
committer can be different, example see the 1.3 console branch
https://github.com/openshift/origin/pull/8214/commits

On Fri, Apr 1, 2016 at 11:22 AM, Ben Parees [email protected]
wrote:

will Author/Committer show two values if they are different? (under what
circumstances could they be different? i'm not up on my git terminology :) )


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8293 (comment)

@php-coder
Copy link
Contributor Author

will Author/Committer show two values if they are different?

@bparees Yes, it will show 2 values on the same line. For example:
Author/Committer: Ben Parees / Slava Semushin

(under what circumstances could they be different? i'm not up on my git terminology :) )

When you're cherry-pick-ing someone's commit or applying it with git am AFAIR.

@bparees
Copy link
Contributor

bparees commented Apr 1, 2016

@bparees Yes, it will show 2 values on the same line. For example:
Author/Committer: Ben Parees / Slava Semushin

cool, sounds good.

@php-coder php-coder force-pushed the gh5247_build_and_build_config_ux_improvements branch from b75b543 to b11459d Compare April 1, 2016 16:59
@php-coder
Copy link
Contributor Author

i'm not convinced we need a line break between the strategy/from/etc block and the url/commit/etc block.

I've combine them together.

@bparees
Copy link
Contributor

bparees commented Apr 1, 2016

@php-coder can you paste a sample of the new output for a BC and build? I think we're in good shape but it'd be easier to confirm w/ a sample.

@php-coder
Copy link
Contributor Author

@bparees I updated the example in the description.

@bparees
Copy link
Contributor

bparees commented Apr 1, 2016

I hate that we called our build sequence id "last version" but that's part of the api, so not your problem :)

can I see an example with a BC/build that declares 2+ image input sources, some with 1 path and some with multiple paths? this template contains the skeleton for such a BC:
https://github.com/openshift/origin/blob/master/test/extended/fixtures/test-imagesource-build.yaml

@php-coder
Copy link
Contributor Author

can I see an example with a BC/build that declares 2+ image input sources, some with 1 path and some with multiple paths?

@bparees Yes, sure:

$ oc describe bc/imagesourcebuild
Name:           imagesourcebuild
Created:        6 minutes ago
Labels:         build=imagesourcebuild
Annotations:    <none>
Latest Version: 1

Strategy:       Source
URL:            https://github.com/openshift/ruby-hello-world.git
From Image:     ImageStreamTag openshift/ruby:latest
Force Pull:     yes
Output to:      ImageStreamTag imagesourceapp:latest
Image Source:   copies /usr/lib/jenkins/jenkins.war from openshift/jenkins:latest to injected/dir
Triggered by:   <none>

Build               Status      Duration            Creation Time
imagesourcebuild-1  running     running for 3m4s    2016-04-04 12:21:05 +0000 UTC


$ oc describe build/imagesourcebuild-1
Name:           imagesourcebuild-1
Created:        3 minutes ago
Labels:         build=imagesourcebuild
                buildconfig=imagesourcebuild
                openshift.io/build-config.name=imagesourcebuild
Annotations:    openshift.io/build.number=1
                openshift.io/build.pod-name=imagesourcebuild-1-build

Status:         Complete
Started:        Mon, 04 Apr 2016 12:21:08 UTC
Duration:       3m5s
Build Config:   imagesourcebuild
Build Pod:      imagesourcebuild-1-build

Strategy:           Source
URL:                https://github.com/openshift/ruby-hello-world.git
Commit:             bd94cbb (Merge pull request #52 from bparees/stdout)
Author/Committer:   Ben Parees
From Image:         DockerImage centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c
Force Pull:         yes
Output to:          ImageStreamTag imagesourceapp:latest
Image Source:       copies /usr/lib/jenkins/jenkins.war from openshift/jenkins-1-centos7@sha256:be195f14530529244b45995aa7220b21b0eb407a37739c43ba9aaa6a5b4f0732 to injected/dir
Push Secret:        builder-dockercfg-y92fy

Events:
  FirstSeen LastSeen    Count   From                SubobjectPath           Type        Reason      Message
  --------- --------    -----   ----                -------------           --------    ------      -------
  3m        3m      1   {default-scheduler }                        Normal      Scheduled   Successfully assigned imagesourcebuild-1-build to localhost.localdomain
  3m        3m      1   {kubelet localhost.localdomain} spec.containers{sti-build}  Normal      Pulled      Container image "openshift/origin-sti-builder:v1.1.4" already present on machine
  3m        3m      1   {kubelet localhost.localdomain} spec.containers{sti-build}  Normal      Created     Created container with docker id 25acb47b78a6
  3m        3m      1   {kubelet localhost.localdomain} spec.containers{sti-build}  Normal      Started     Started container with docker id 25acb47b78a6

@smarterclayton
Copy link
Contributor

Looking pretty good. Can we use the short name printer for the images
(there should be a helper for that, if there isn't we should create it and
open an issue to use it most places)

On Mon, Apr 4, 2016 at 8:28 AM, Vyacheslav Semushin <
[email protected]> wrote:

can I see an example with a BC/build that declares 2+ image input sources,
some with 1 path and some with multiple paths?

@bparees https://github.com/bparees Yes, sure:

$ oc describe bc/imagesourcebuildName: imagesourcebuildCreated: 6 minutes agoLabels: build=imagesourcebuildAnnotations: Latest Version: 1
Strategy: SourceURL: https://github.com/openshift/ruby-hello-world.gitFrom Image: ImageStreamTag openshift/ruby:latestForce Pull: yesOutput to: ImageStreamTag imagesourceapp:latestImage Source: copies /usr/lib/jenkins/jenkins.war from openshift/jenkins:latest to injected/dirTriggered by:
Build Status Duration Creation Timeimagesourcebuild-1 running running for 3m4s 2016-04-04 12:21:05 +0000 UTC

$ oc describe build/imagesourcebuild-1Name: imagesourcebuild-1Created: 3 minutes agoLabels: build=imagesourcebuild buildconfig=imagesourcebuild openshift.io/build-config.name=imagesourcebuildAnnotations: openshift.io/build.number=1 openshift.io/build.pod-name=imagesourcebuild-1-build
Status: CompleteStarted: Mon, 04 Apr 2016 12:21:08 UTCDuration: 3m5sBuild Config: imagesourcebuildBuild Pod: imagesourcebuild-1-build
Strategy: SourceURL: https://github.com/openshift/ruby-hello-world.gitCommit: bd94cbb (Merge pull request #52 from bparees/stdout)Author/Committer: Ben PareesFrom Image: DockerImage centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28cForce Pull: yesOutput to: ImageStreamTag imagesourceapp:latestImage Source: copies /usr/lib/jenkins/jenkins.war from openshift/jenkins-1-centos7@sha256:be195f14530529244b45995aa7220b21b0eb407a37739c43ba9aaa6a5b4f0732 to injected/dirPush Secret: builder-dockercfg-y92fy
Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 3m 3m 1 {default-scheduler } Normal Scheduled Successfully assigned imagesourcebuild-1-build to localhost.localdomain 3m 3m 1 {kubelet localhost.localdomain} spec.containers{sti-build} Normal Pulled Container image "openshift/origin-sti-builder:v1.1.4" already present on machine 3m 3m 1 {kubelet localhost.localdomain} spec.containers{sti-build} Normal Created Created container with docker id 25acb47b78a6 3m 3m 1 {kubelet localhost.localdomain} spec.containers{sti-build} Normal Started Started container with docker id 25acb47b78a6


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8293 (comment)

@bparees
Copy link
Contributor

bparees commented Apr 4, 2016

@smarterclayton i think @php-coder tried to shorten the names and found they weren't pullable once he truncated the hash... is there some other shortening mechanism you're referring to?

@php-coder
Copy link
Contributor Author

@smarterclayton i think @php-coder tried to shorten the names and found they weren't pullable once he truncated the hash..

Yes, it doesn't work:

$ docker pull centos/ruby-22-centos7@sha256:990326b
Trying to pull repository docker.io/centos/ruby-22-centos7 ... failed
manifest unknown: manifest unknown
$ docker pull centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c
Trying to pull repository docker.io/centos/ruby-22-centos7 ... sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c: Pulling from centos/ruby-22-centos7

Digest: sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c
Status: Image is up to date for docker.io/centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c

@smarterclayton
Copy link
Contributor

For image stream tags, the expectation is the default command is:

oc describe istag/ruby-22-centos@sha256:990326b

not docker pull.

The docker pull may be a bug that is fixable.

On Mon, Apr 4, 2016 at 12:10 PM, Vyacheslav Semushin <
[email protected]> wrote:

@smarterclayton https://github.com/smarterclayton i think @php-coder
https://github.com/php-coder tried to shorten the names and found they
weren't pullable once he truncated the hash..

Yes, it doesn't work:

$ docker pull centos/ruby-22-centos7@sha256:990326bTrying to pull repository docker.io/centos/ruby-22-centos7 ... failedmanifest unknown: manifest unknown
$ docker pull centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28cTrying to pull repository docker.io/centos/ruby-22-centos7 ... sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c: Pulling from centos/ruby-22-centos7
Digest: sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28cStatus: Image is up to date for docker.io/centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8293 (comment)

@bparees
Copy link
Contributor

bparees commented Apr 4, 2016

ok but in this case it's a DockerImage, not an ImageStreamTag:

From Image: DockerImage centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c

so we'd truncate when it's an imagestreamtag reference and not when it's a dockerimage reference?

@smarterclayton
Copy link
Contributor

Yeah.

On Mon, Apr 4, 2016 at 12:28 PM, Ben Parees [email protected]
wrote:

ok but in this case it's a DockerImage, not an ImageStreamTag:

From Image: DockerImage centos/ruby-22-centos7@sha256
:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c

so we'd truncate when it's an imagestreamtag reference and not when it's a
dockerimage reference?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8293 (comment)

@php-coder
Copy link
Contributor Author

so we'd truncate when it's an imagestreamtag reference and not when it's a dockerimage reference?

In case of imagestreamtag there is nothing to truncate because we're not showing this hash:

$ oc describe bc/s2i-test | grep ImageStreamTag
From Image:     ImageStreamTag java:8
Output to:      ImageStreamTag s2i-test:latest
$ oc get istag
NAME      DOCKER REF                                                                     UPDATED       IMAGENAME
java:8    java@sha256:cedc6a5dcba447e77a300351faeae6f926d2b22cd384d35d102fc4bfb117abd2   4 hours ago   sha256:cedc6a5dcba447e77a300351faeae6f926d2b22cd384d35d102fc4bfb117abd2

@smarterclayton
Copy link
Contributor

The docker pull issue is fixable, but only if we can patch the registry to
redirect from the short digest to the long digest on a specific error
code. It might be worth carrying, I'll open an issue.

On Mon, Apr 4, 2016 at 12:24 PM, Clayton Coleman [email protected]
wrote:

For image stream tags, the expectation is the default command is:

oc describe istag/ruby-22-centos@sha256:990326b

not docker pull.

The docker pull may be a bug that is fixable.

On Mon, Apr 4, 2016 at 12:10 PM, Vyacheslav Semushin <
[email protected]> wrote:

@smarterclayton https://github.com/smarterclayton i think @php-coder
https://github.com/php-coder tried to shorten the names and found they
weren't pullable once he truncated the hash..

Yes, it doesn't work:

$ docker pull centos/ruby-22-centos7@sha256:990326bTrying to pull repository docker.io/centos/ruby-22-centos7 ... failedmanifest unknown: manifest unknown
$ docker pull centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28cTrying to pull repository docker.io/centos/ruby-22-centos7 ... sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c: Pulling from centos/ruby-22-centos7
Digest: sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28cStatus: Image is up to date for docker.io/centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8293 (comment)

@smarterclayton
Copy link
Contributor

Spawned #8354 for image pull by
short ID

On Tue, Apr 5, 2016 at 12:25 AM, Clayton Coleman [email protected]
wrote:

The docker pull issue is fixable, but only if we can patch the registry to
redirect from the short digest to the long digest on a specific error
code. It might be worth carrying, I'll open an issue.

On Mon, Apr 4, 2016 at 12:24 PM, Clayton Coleman [email protected]
wrote:

For image stream tags, the expectation is the default command is:

oc describe istag/ruby-22-centos@sha256:990326b

not docker pull.

The docker pull may be a bug that is fixable.

On Mon, Apr 4, 2016 at 12:10 PM, Vyacheslav Semushin <
[email protected]> wrote:

@smarterclayton https://github.com/smarterclayton i think @php-coder
https://github.com/php-coder tried to shorten the names and found
they weren't pullable once he truncated the hash..

Yes, it doesn't work:

$ docker pull centos/ruby-22-centos7@sha256:990326bTrying to pull repository docker.io/centos/ruby-22-centos7 ... failedmanifest unknown: manifest unknown
$ docker pull centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28cTrying to pull repository docker.io/centos/ruby-22-centos7 ... sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c: Pulling from centos/ruby-22-centos7
Digest: sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28cStatus: Image is up to date for docker.io/centos/ruby-22-centos7@sha256:990326b8ad8c4ae2619b24d019b7871bb10ab08c41e9d5b19d0b72cb0200e28c


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8293 (comment)

@php-coder
Copy link
Contributor Author

@smarterclayton What else I should improve as part of this PR? Add truncation for (unimplemented yet) docker's sums? Show truncated sum for ImageStreamTags?

@smarterclayton
Copy link
Contributor

we can avoid truncation for now, are the examples up to date?

On Tue, Apr 5, 2016 at 6:04 AM, Vyacheslav Semushin <
[email protected]> wrote:

@smarterclayton https://github.com/smarterclayton What else I should
improve as part of this PR? Add truncation for (unimplemented yet) docker's
sums? Show truncated sum for ImageStreamTags?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8293 (comment)

@php-coder
Copy link
Contributor Author

@smarterclayton yes, they are up to date.

@bparees
Copy link
Contributor

bparees commented Apr 7, 2016

@jwforres @smarterclayton i'm good w/ this going into 3.2, does it have api/ux approval?

@php-coder php-coder changed the title [WIP] oc describe build output improvements oc describe build output improvements Apr 7, 2016
@smarterclayton
Copy link
Contributor

Approved for 3.2

@bparees
Copy link
Contributor

bparees commented Apr 7, 2016

[merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/5538/) (Image: devenv-rhel7_3927)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to b11459d

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to b11459d

@openshift-bot
Copy link
Contributor

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

@openshift-bot openshift-bot merged commit 20967ed into openshift:master Apr 7, 2016
@bparees
Copy link
Contributor

bparees commented Apr 7, 2016

woo. nice work @php-coder

@php-coder php-coder deleted the gh5247_build_and_build_config_ux_improvements branch April 7, 2016 21:47
@php-coder
Copy link
Contributor Author

PR kubernetes/kubernetes#23988 for showing multiple labels/annotations on multiple lines was merged.

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