build icon indicating copy to clipboard operation
build copied to clipboard

Emit Events for BuildRun objects

Open adambkaplan opened this issue 4 years ago • 3 comments

Idea:

The build controller should emit Kubernetes events for BuildRun objects. These should reflect the important state transitions for the BuildRun's lifecycle - namely if it started, if it succeeded, or if it failed.

The set of events we emit to the cluster can be the building blocks for events that can be emitted outside the cluster, through specifications like CloudEvents.

/kind feature

adambkaplan avatar Jun 25 '21 20:06 adambkaplan

@SaschaSchwarze0 following up on your comment here: https://github.com/shipwright-io/build/pull/824#pullrequestreview-693314397

I wasn't sure if adding events to the controller by itself warranted a SHP, since my initial intent was to not expose an API or configuration to tune the emitted events. In my experience controllers don't allow events to be configurable - they fire "Normal" events to provide object lifecycle information, and "Warning" events if something went wrong.

Kubernetes events are also considered ephemeral in nature - I believe by default events are reaped/deleted by the cluster after one hour.

adambkaplan avatar Jun 28 '21 19:06 adambkaplan

(I do, however, think we need a SHP if we want to emit events outside the cluster via CloudEvents)

adambkaplan avatar Jun 28 '21 19:06 adambkaplan

Based on the feedback in #824 - we should discuss in a SHIP what events we want to emit, and consider how Shiwpright events may overlap/conflict with Tekton events.

adambkaplan avatar Nov 17 '21 23:11 adambkaplan