Skip to content

Getting modified event on build when nothing has changed #5258

Closed

Description

@jwforres

You can compare the two lines below, nothing has changed except the resourceVersion. I think this has to do with the new status message on the build. I'm getting the modified event across the websocket every second.

To recreate just create an app and then delete the image stream, cancel the running build and start a new build. You'll get a build stuck in new without a status message.

{"type":"MODIFIED","object":{"kind":"Build","apiVersion":"v1","metadata":{"name":"nodejs-ex-2","namespace":"deleted-is","selfLink":"/oapi/v1/namespaces/deleted-is/builds/nodejs-ex-2","uid":"964cbce1-7750-11e5-af49-54ee75107c12","resourceVersion":"5198","creationTimestamp":"2015-10-20T17:32:50Z","labels":{"app":"nodejs-ex","buildconfig":"nodejs-ex"},"annotations":{"openshift.io/build.number":"2"}},"spec":{"serviceAccount":"builder","source":{"type":"Git","git":{"uri":"https://github.com/openshift/nodejs-ex.git","ref":"master"}},"strategy":{"type":"Source","sourceStrategy":{"from":{"kind":"DockerImage","name":"openshift/nodejs-010-centos7@sha256:5feccb8e8973945e727dca02cca60a2442108a1162405899c9c604c6040f5783"}}},"output":{"to":{"kind":"ImageStreamTag","name":"nodejs-ex:latest"}},"resources":{}},"status":{"phase":"New","message":"the referenced output image stream deleted-is/nodejs-ex does not exist","config":{"kind":"BuildConfig","namespace":"deleted-is","name":"nodejs-ex"}}}}
{"type":"MODIFIED","object":{"kind":"Build","apiVersion":"v1","metadata":{"name":"nodejs-ex-2","namespace":"deleted-is","selfLink":"/oapi/v1/namespaces/deleted-is/builds/nodejs-ex-2","uid":"964cbce1-7750-11e5-af49-54ee75107c12","resourceVersion":"5199","creationTimestamp":"2015-10-20T17:32:50Z","labels":{"app":"nodejs-ex","buildconfig":"nodejs-ex"},"annotations":{"openshift.io/build.number":"2"}},"spec":{"serviceAccount":"builder","source":{"type":"Git","git":{"uri":"https://github.com/openshift/nodejs-ex.git","ref":"master"}},"strategy":{"type":"Source","sourceStrategy":{"from":{"kind":"DockerImage","name":"openshift/nodejs-010-centos7@sha256:5feccb8e8973945e727dca02cca60a2442108a1162405899c9c604c6040f5783"}}},"output":{"to":{"kind":"ImageStreamTag","name":"nodejs-ex:latest"}},"resources":{}},"status":{"phase":"New","message":"the referenced output image stream deleted-is/nodejs-ex does not exist","config":{"kind":"BuildConfig","namespace":"deleted-is","name":"nodejs-ex"}}}}

Activity

  1. jwforres commented on Oct 20, 2015

    @jwforres
    MemberAuthor
  2. rhcarvalho commented on Oct 20, 2015

    @rhcarvalho
    Contributor

    @jwforres thanks for reporting this, I'll have a look tomorrow morning (UTC+2)

  3. bparees commented on Oct 20, 2015

    @bparees
    Contributor

    yeah so once per second means it's going through our retrycontroller logic which makes sense.

    the code that @rhcarvalho added needs to check if the status message is already set to what it wants to set it to, and if so, do not set it/update the build object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions