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

Include extra information in metadata comments #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bryanburgers
Copy link
Contributor

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"} -->

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.
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][check_run] includes `started_at` and
`completed_at` information that is independent from when GitHub sent us
the webhook.

[check_run]: https://developer.github.com/v3/activity/events/types/#checkrunevent-api-payload
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.

1 participant