homu icon indicating copy to clipboard operation
homu copied to clipboard

Include extra information in metadata comments

Open bryanburgers opened this issue 6 years ago • 0 comments

Include the merge_sha in BuildFailed, TryBuildFailed, and TimedOut metadata comments.

This helps with synchronizing historical data, and will help in the future correlating which build a failure is associated with.

Also include started_at or ended_at in all build-related comments.

Timing information could be gleaned from comment times, but make it explicit in the metadata. This means we can get the true times, even if GitHub has delays.

This also gives us the opportunity to have more control in the future. For example, the check_run event includes started_at and completed_at information that is independent from when GitHub sent us the webhook.

There are no visible changes to any of the comments.

Example success:

<!-- homu: {
  "type":"TryBuildStarted",
  "head_sha":"3bad62d39be0c9431e2c7d559faf7853080e6754",
  "merge_sha":"0ca0d33271785934fe6a9b2dacdd301ea9efd967",
  "started_at":"2019-08-16T17:10:46+00:00"} -->

<!-- homu: {
  "type":"TryBuildCompleted",
  "builders":{"checks-travis":"https://travis-ci.com/bryanburgers/homu-test-2/builds/123541077"},
  "merge_sha":"0ca0d33271785934fe6a9b2dacdd301ea9efd967",
  "ended_at":"2019-08-16T17:11:49+00:00"} -->

Example timeout:

<!-- homu: {
  "type":"TryBuildStarted",
  "head_sha":"4d92d990ed2c511596d4f7bd064fbd610b30bcb1",
  "merge_sha":"afbca6e5862f53900d222e636e17ccf26b34f8e1",
  "started_at":"2019-08-16T17:06:39+00:00"} -->

<!-- homu: {
  "type":"TimedOut",
  "merge_sha":"afbca6e5862f53900d222e636e17ccf26b34f8e1",
  "ended_at":"2019-08-16T17:06:59+00:00"} -->

Example failure:

<!-- homu: {
  "type":"TryBuildStarted",
  "head_sha":"4d92d990ed2c511596d4f7bd064fbd610b30bcb1",
  "merge_sha":"896efebc02ec62855a3b93ed1497ecc3dd311c56",
  "started_at":"2019-08-16T17:07:48+00:00"} -->

<!-- homu: {
  "type":"TryBuildFailed",
  "builder_url":"https://travis-ci.com/bryanburgers/homu-test-2/builds/123540732",
  "builder_name":"checks-travis",
  "merge_sha":"896efebc02ec62855a3b93ed1497ecc3dd311c56",
  "ended_at":"2019-08-16T17:08:51+00:00"} -->

bryanburgers avatar Aug 16 '19 17:08 bryanburgers