Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

feat(ci): add GHA to report when Bazel test ownership drops below 70% threshold#62985

Merged
Strum355 merged 1 commit into
mainfrom
nsc/gha-test-ownership-check
May 31, 2024
Merged

feat(ci): add GHA to report when Bazel test ownership drops below 70% threshold#62985
Strum355 merged 1 commit into
mainfrom
nsc/gha-test-ownership-check

Conversation

@Strum355

@Strum355 Strum355 commented May 30, 2024

Copy link
Copy Markdown
Contributor

This PR adds a non-blocking GHA check to report when a branch's Bazel test ownership drops below 70%. See example messaging below to see how it looks like: https://github.com/sourcegraph/sourcegraph/pull/62985#issuecomment-2139439084. The message will be updated if the threshold is reached/breached whenever the branch changes.

Test plan

Extensive iteration in this PR, see below message https://github.com/sourcegraph/sourcegraph/pull/62985#issuecomment-2139439084

Changelog

@cla-bot cla-bot Bot added the cla-signed label May 30, 2024
Comment thread .github/workflows/bazel-test-ownership-check.yml Fixed
@Strum355 Strum355 force-pushed the nsc/gha-test-ownership-check branch 2 times, most recently from 5fd89f4 to ac4f111 Compare May 30, 2024 12:22
@github-actions

github-actions Bot commented May 30, 2024

Copy link
Copy Markdown
Contributor

Warning

Test ownership level below 70% on this branch.

We aim to have ~70% of Bazel test targets to help us (dev-infra) and you get insight into the impact of tests on CI times. This is a non-blocking requirement, but keeping on top of test attribution to maintain this threshold is appreciated.

See the list of tag variable names to use here, and reach out to #discuss-dev-infra if you need to add/change this list.

See an example of how to use the variables here.

@Strum355 Strum355 force-pushed the nsc/gha-test-ownership-check branch 7 times, most recently from b4f64d7 to e6edff6 Compare May 30, 2024 13:22
@Strum355 Strum355 marked this pull request as ready for review May 30, 2024 13:23
@Strum355 Strum355 force-pushed the nsc/gha-test-ownership-check branch 4 times, most recently from 39d1358 to 6021409 Compare May 31, 2024 12:55
@Strum355 Strum355 changed the title wip feature(ci): add GHA to report when Bazel test ownership drops below 70% threshold May 31, 2024
@Strum355 Strum355 changed the title feature(ci): add GHA to report when Bazel test ownership drops below 70% threshold feat(ci): add GHA to report when Bazel test ownership drops below 70% threshold May 31, 2024
@Strum355 Strum355 force-pushed the nsc/gha-test-ownership-check branch from af0dd5c to 08eddc1 Compare May 31, 2024 13:09
@Strum355 Strum355 requested a review from a team May 31, 2024 13:10
@Strum355 Strum355 self-assigned this May 31, 2024
env:
PERCENTAGE: ${{ steps.bazel-query.outputs.PERCENTAGE }}
with:
script: |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sooooooooooooo much cleaner

@Strum355 Strum355 merged commit 79fce8c into main May 31, 2024
@Strum355 Strum355 deleted the nsc/gha-test-ownership-check branch May 31, 2024 13:46
@varungandhi-src

Copy link
Copy Markdown
Contributor

@Strum355 could you add a Notion page documenting what test ownership is and link that from the message:

From reading the two kinds of messages:

We aim to have ~70% of Bazel test targets to help us (dev-infra) and you get insight into the impact of tests on CI times. This is a non-blocking requirement, but keeping on top of test attribution to maintain this threshold is appreciated.

Test ownership >= 70% again, thank you!

It's not clear what "test ownership" means, how to get the number higher etc.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants