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

Update build status to indicate build failure reason #10817

Merged
merged 1 commit into from
Dec 1, 2016

Conversation

PI-Victor
Copy link
Contributor

@PI-Victor
Copy link
Contributor Author

cc @bparees
bcc: @mfojtik

@@ -266,6 +266,18 @@ const (
// secret for pushing the output image.
// The build will stay in the pending state until the secret is created, or the build times out.
StatusReasonMissingPushSecret = "MissingPushSecret"

// StatusReasonFailedPostCommitHook indicates that the postcommit failed
Copy link
Contributor

Choose a reason for hiding this comment

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

"indicates the post-commit hook failed"

Copy link
Contributor

Choose a reason for hiding this comment

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

comment shoudl say StatusReasonPostCommitHookFailed

@PI-Victor
Copy link
Contributor Author

@mfojtik you said these errors should also end up in oc status, right?

@@ -110,25 +112,39 @@ type detailsStrategy struct {

// Prepares a build for update by only allowing an update to build details.
// For now, this is the Spec.Revision field
// We now need to update the build.status.Reason and build.Status.Message
Copy link
Contributor

Choose a reason for hiding this comment

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

// build details currently consists of: Spec.Revision, Status.Reason, and Status.Message, all of which are updated from within the build pod

@mfojtik
Copy link
Contributor

mfojtik commented Sep 6, 2016

@mfojtik you said these errors should also end up in oc status, right?

in future yes, that is how I'm thinking about these errors

oldRevision := oldBuild.Spec.Revision
newRevision := newBuild.Spec.Revision
glog.V(0).Infof("newbuild: %#v", newRevision)
glog.V(0).Infof("oldBuild: %#v", oldRevision)
Copy link
Contributor

Choose a reason for hiding this comment

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

extraneous debugging?

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. thought i cleaned it up pretty noice, was wrong

@PI-Victor PI-Victor force-pushed the update_build_status branch 2 times, most recently from b3a5c06 to eedd08a Compare September 8, 2016 14:19
@PI-Victor
Copy link
Contributor Author

@csrwng thank you for the help, was able to figure it out in the end.

glog.V(4).Infof("Setting build revision to %#v", d.build.Spec.Revision.Git)
updateBuildRevision(d.build, sourceInfo)
if _, err = d.client.UpdateDetails(d.build); err != nil {
glog.V(0).Infof("error: An error occure while updating the build revision")
Copy link
Contributor

Choose a reason for hiding this comment

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

s/occure/occured/

@smarterclayton
Copy link
Contributor

Split the messages out into their own chunk and make a comment that they
are NOT guaranteed not to change

On Fri, Nov 18, 2016 at 9:00 AM, Ben Parees [email protected]
wrote:

@bparees commented on this pull request.

In pkg/build/api/types.go #10817
:

  • StatusMessagePushImageToRegistryFailed = "Failed to push the image to the registry"
  • // StatusReasonPullBuilderImageFailed indicates that we failed to pull the
  • // builder image.
  • StatusReasonPullBuilderImageFailed StatusReason = "PullBuilderImageFailed"
  • StatusMessagePullBuilderImageFailed = "Failed pulling builder image"
    +
  • // StatusReasonFetchSourceFailed indicates that fetching the source of the
  • // build has failed.
  • StatusReasonFetchSourceFailed StatusReason = "FetchSourceFailed"
  • StatusMessageFetchSourceFailed = "Failed to fetch the input source"
    +
  • // StatusReasonCancelledBuild indicates that the build was cancelled by the
  • // user.
  • StatusReasonCancelledBuild StatusReason = "CancelledBuild"
  • StatusMessageCancelledBuild = "The build was cancelled by the user"

this is the internal api file, not the public api..and there is precedence:
https://github.com/openshift/origin/blob/master/pkg/deploy/
api/types.go#L95-L100


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
#10817, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_p3VFTz6FcADmXpWSqpIvspeS1o6Kks5q_dmdgaJpZM4J121e
.

@bparees
Copy link
Contributor

bparees commented Nov 24, 2016 via email

@bparees
Copy link
Contributor

bparees commented Nov 28, 2016

[testextended][extended:core(builds|image_ecosystem)]

@bparees
Copy link
Contributor

bparees commented Nov 28, 2016

@PI-Victor looks like some extended test compilation issues to work through:

[WARNING] No compiled `extended.test` binary was found. Attempting to build one using:
[WARNING]   $ hack/build-go.sh test/extended/extended.test
++ Building go targets for linux/amd64: test/extended/extended.test
# github.com/openshift/origin/test/extended/builds
test/extended/builds/failure_status.go:31: oc.KubeREST undefined (type *"github.com/openshift/origin/test/extended/util".CLI has no field or method KubeREST)
test/extended/builds/failure_status.go:44: oc.REST undefined (type *"github.com/openshift/origin/test/extended/util".CLI has no field or method REST)
test/extended/builds/failure_status.go:60: oc.REST undefined (type *"github.com/openshift/origin/test/extended/util".CLI has no field or method REST)
test/extended/builds/failure_status.go:76: oc.REST undefined (type *"github.com/openshift/origin/test/extended/util".CLI has no field or method REST)
test/extended/builds/failure_status.go:92: oc.REST undefined (type *"github.com/openshift/origin/test/extended/util".CLI has no field or method REST)
test/extended/builds/failure_status.go:108: oc.REST undefined (type *"github.com/openshift/origin/test/extended/util".CLI has no field or method REST)

@PI-Victor
Copy link
Contributor Author

@bparees yes, seems that KubeRest was removed from there, looking into other test packages to see how to fix this.

@mfojtik
Copy link
Contributor

mfojtik commented Nov 28, 2016

@PI-Victor it is Client and KubeClient now.

@PI-Victor
Copy link
Contributor Author

@mfojtik thanks.
tests for me are not passing locally because [insert reason here] so i want to see if they pass online. this was a working state PR the last time i ran extended tests on it :/

@PI-Victor PI-Victor force-pushed the update_build_status branch 2 times, most recently from 2ea7681 to 7ab3371 Compare November 29, 2016 18:56
@openshift-bot
Copy link
Contributor

openshift-bot commented Nov 29, 2016

continuous-integration/openshift-jenkins/test Waiting: Determining build queue position

@openshift-bot
Copy link
Contributor

Evaluated for origin testextended up to 4b54d01

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 4b54d01

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11813/) (Base Commit: 44fc84b)

@PI-Victor
Copy link
Contributor Author

flake #10663

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/testextended FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin_extended/846/) (Base Commit: 74d945c) (Extended Tests: core(builds|image_ecosystem))

@bparees
Copy link
Contributor

bparees commented Nov 30, 2016

extended test failure is a known issue.
[merge]

@PI-Victor
Copy link
Contributor Author

@bparees thanks! was hoping this will pass, i've fixed the tests and the one that was faulty.

@bparees
Copy link
Contributor

bparees commented Dec 1, 2016

yum repo issues.
[merge]

@bparees
Copy link
Contributor

bparees commented Dec 1, 2016

flake #10663
[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 4b54d01

@openshift-bot
Copy link
Contributor

openshift-bot commented Dec 1, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11844/) (Base Commit: 166273b) (Image: devenv-rhel7_5453)

@openshift-bot openshift-bot merged commit 46f4630 into openshift:master Dec 1, 2016
@PI-Victor PI-Victor deleted the update_build_status branch January 23, 2017 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants