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

fix oc describe panic #9097

Merged
merged 1 commit into from
Jun 6, 2016
Merged

fix oc describe panic #9097

merged 1 commit into from
Jun 6, 2016

Conversation

PI-Victor
Copy link
Contributor

@PI-Victor
Copy link
Contributor Author

@bparees @mfojtik PTAL

@@ -1369,7 +1369,7 @@ func describeBuildTriggerCauses(causes []buildapi.BuildTriggerCause, out *tabwri
func squashGitInfo(sourceRevision *buildapi.SourceRevision, out *tabwriter.Writer) {
if sourceRevision != nil && sourceRevision.Git != nil {
rev := sourceRevision.Git
formatString(out, "Commit", fmt.Sprintf("%s (%s)", rev.Commit[:7], rev.Message))
formatString(out, "Commit", fmt.Sprintf("%s (%s)", rev.Commit, rev.Message))
Copy link
Contributor

Choose a reason for hiding this comment

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

can you check the length instead of showing the long commit hash here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that was my first solution, but went with this(i was thinking since we show the entire message...) . sure, i can do that.

@PI-Victor
Copy link
Contributor Author

@mfojtik changed my mind a couple of times, but now it's fixed :)

@@ -1369,7 +1369,11 @@ func describeBuildTriggerCauses(causes []buildapi.BuildTriggerCause, out *tabwri
func squashGitInfo(sourceRevision *buildapi.SourceRevision, out *tabwriter.Writer) {
if sourceRevision != nil && sourceRevision.Git != nil {
rev := sourceRevision.Git
formatString(out, "Commit", fmt.Sprintf("%s (%s)", rev.Commit[:7], rev.Message))
commit := ""
if len(rev.Commit) > 6 {
Copy link
Contributor

Choose a reason for hiding this comment

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

is there case when the commit would be >0 but less than 7? If not, we should just check if the commit is not empty and in that case don't print it at all (or just say "empty" or "unknown").

* fixes https://bugzilla.redhat.com/show_bug.cgi?id=1340784
* fix checking length of commit hash
@PI-Victor
Copy link
Contributor Author

@mfojtik @bparees merge, anyone?

@deads2k
Copy link
Contributor

deads2k commented Jun 1, 2016

lgtm [merge]

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@PI-Victor
Copy link
Contributor Author

re[test]

@PI-Victor
Copy link
Contributor Author

@deads2k thanks for the merge but can you try to merge this again, tests are really flaky?

@mfojtik
Copy link
Contributor

mfojtik commented Jun 2, 2016

[merge]

On Thu, Jun 2, 2016 at 2:56 PM, Ionut Palade [email protected]
wrote:

@deads2k https://github.com/deads2k thanks for the merge but can you
try to merge this again, tests are really flaky?


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


Michal Fojtik <[email protected] [email protected]>
Red Hat OpenShift, Engineering

@PI-Victor
Copy link
Contributor Author

anyone know what's going on with our merge queue, seems this keeps failing?

@PI-Victor
Copy link
Contributor Author

[test]

@mfojtik
Copy link
Contributor

mfojtik commented Jun 3, 2016

[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 3, 2016

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

@PI-Victor
Copy link
Contributor Author

[test]

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 9ade759

@openshift-bot
Copy link
Contributor

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

@PI-Victor
Copy link
Contributor Author

@bparees seems tests are passing, can you please merge?

@deads2k
Copy link
Contributor

deads2k commented Jun 6, 2016

[merge] again

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 9ade759

@openshift-bot openshift-bot merged commit de351a1 into openshift:master Jun 6, 2016
@PI-Victor
Copy link
Contributor Author

@deads2k i appreciate it, thanks!

@PI-Victor PI-Victor deleted the fix_webhook_git_panic branch June 8, 2016 09:41
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.

6 participants