Commit Graph

7 Commits

Author SHA1 Message Date
Bolaji Olajide
20b858f6c3
fix(build-tracker): Failed back-compat doesn't count towards branch-locking quota (#63911)
Closes
[DINF-51](https://linear.app/sourcegraph/issue/DINF-51/failed-back-compat-doesnt-count-towards-branch-locking-quota)

## Context

If a back-compat step on main fails, the build is marked as having
failed. However, we don't treat that as a failure in build-tracker,
resulting in no #buildkite-main post and not counting towards failed
build quota for locking main.

The reason why this was happening is that the Backcompat build wasn't
linked to the main Sourcegraph build in anyway. However, when a
backcompat fails the main build reflects the status of this failure, but
we do not use this field when determining the status of a build, so it
doesn't work for our use case.

![CleanShot 2024-07-18 at 15 04
15@2x](https://github.com/user-attachments/assets/9553330a-ad98-45cc-b4ce-03a22ca1b99d)

We [instead do a walkthrough of all the jobs associated with a build to
figure
out](https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/dev/build-tracker/main.go?L349-372)
if the build has failed, fixed or is passing.

With this logic, it means we have to link the steps from child builds
that a particular build triggers to it's parent.

## Test plan

* Create a build that'll have backcompat failing
* The build tracker event associated with the main build will be
reported with a state of failed to buildkite.

![CleanShot 2024-07-18 at 15 10
45@2x](https://github.com/user-attachments/assets/1bf503ab-0020-47bf-9512-b3a9ee5d4e36)


## Changelog

<!-- OPTIONAL; info at
https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c
-->
2024-07-25 06:45:09 -05:00
Eric Fritz
807a789c20
errors: Remove additional cockroachdb uses (#31512) 2022-02-18 20:23:46 +00:00
Eric Fritz
4d2a39d303
lint: Fix fmt.Errorf guard (#30604) 2022-02-03 14:56:55 +00:00
Jean-Hadrien Chabran
f81dc63302
Fix bkstats handling of empty details, clarify CLI parameters (#29357) 2021-12-29 11:25:52 +01:00
Robert Lin
c700bbee3d
bkstats: add link to CI dashboard, use links for builds, clearer red time (#28002) 2021-11-21 10:16:41 -08:00
Jean-Hadrien Chabran
6ece41f85d
Post a report on a Slack channel about how long the main pipeline was red yesterday (#27064) 2021-11-09 13:28:05 +01:00
Jean Hadrien Chabran
3fae56ec2a
ci: add a script to compute red time for a given day (#26554) 2021-10-25 14:55:25 +02:00