grafana/scripts/modowners
Matheus Macabu 51b2bf3fc8
Lint Frontend / Verify i18n (push) Waiting to run Details
Lint Frontend / Lint (push) Waiting to run Details
Lint Frontend / Typecheck (push) Waiting to run Details
Lint Frontend / Betterer (push) Waiting to run Details
End-to-end tests / Build & Package Grafana (push) Waiting to run Details
End-to-end tests / ${{ matrix.suite }} (dashboards-suite) (push) Blocked by required conditions Details
End-to-end tests / ${{ matrix.suite }} (panels-suite) (push) Blocked by required conditions Details
End-to-end tests / ${{ matrix.suite }} (smoke-tests-suite) (push) Blocked by required conditions Details
End-to-end tests / ${{ matrix.suite }} (various-suite) (push) Blocked by required conditions Details
End-to-end tests / ${{ matrix.suite }} (old arch) (old-arch/dashboards-suite) (push) Blocked by required conditions Details
End-to-end tests / ${{ matrix.suite }} (old arch) (old-arch/panels-suite) (push) Blocked by required conditions Details
End-to-end tests / ${{ matrix.suite }} (old arch) (old-arch/smoke-tests-suite) (push) Blocked by required conditions Details
End-to-end tests / ${{ matrix.suite }} (old arch) (old-arch/various-suite) (push) Blocked by required conditions Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (1) (push) Waiting to run Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (2) (push) Waiting to run Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (3) (push) Waiting to run Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (4) (push) Waiting to run Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (5) (push) Waiting to run Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (6) (push) Waiting to run Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (7) (push) Waiting to run Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (8) (push) Waiting to run Details
Integration Tests / Sqlite (push) Waiting to run Details
Integration Tests / MySQL (push) Waiting to run Details
Integration Tests / Postgres (push) Waiting to run Details
Dispatch sync to mirror / dispatch-job (push) Waiting to run Details
Backend Unit Tests / Grafana (push) Has been cancelled Details
Backend Unit Tests / Grafana Enterprise (push) Has been cancelled Details
CodeQL checks / Analyze (go) (push) Has been cancelled Details
CodeQL checks / Analyze (javascript) (push) Has been cancelled Details
CodeQL checks / Analyze (python) (push) Has been cancelled Details
[release-11.2.10] Chore: Bump Go version to 1.24.3 (#105113)
Chore: Bump Go version to 1.24.3
2025-05-08 16:09:01 +02:00
..
.gitignore
README.md Chore: Replace backend platform codeownership (#86010) 2024-04-19 19:12:59 +02:00
go.mod [release-11.2.10] Chore: Bump Go version to 1.24.3 (#105113) 2025-05-08 16:09:01 +02:00
go.sum [release-11.2.8] Chore: Bump dependencies to address security issues (#101648) 2025-03-07 10:14:08 +01:00
modowners.go Chore: Remove `grafana-delivery` references (#82505) 2024-02-15 10:00:30 +01:00
modowners_test.go Chore: Replace backend platform codeownership (#86010) 2024-04-19 19:12:59 +02:00

README.md

Modowners

Intro

Modowners is a way to ensure that each Go dependency has at least one team responsible for maintaining and upgrading it.

The validate-modfile drone step checks go.mod and will pass if every dependency has an owner. When adding a new dependency, add the responsible team in a line comment.

Currently validate-modfile is non-blocking, but will eventually become a blocking step. All newly added dependencies will require an assigned owner.

Example of ownership assignment

cloud.google.com/go/storage v1.30.1 // @grafana/grafana-backend-group

Utilities

check

Validate go.mod and exit with an error if a dependency does not have an owner.

Example CLI command:

go run scripts/modowners/modowners.go check go.mod

If go.mod is valid, there will be no output.

owners

List owners of given dependency.

Example CLI command to get a list of all owners with a count of the number of dependencies they own:

go run scripts/modowners/modowners.go owners -a -c go.mod

Example output:

@grafana/grafana-release-guild 5
@grafana/grafana-bi-squad 2
@grafana/grafana-app-platform-squad 13
@grafana/observability-metrics 4
@grafana/observability-traces-and-profiling 6
@grafana/aws-datasources 2
@grafana/alerting-squad-backend 22
@grafana/plugins-platform-backend 7
@grafana/grafana-operator-experience-squad 3
@grafana/dataviz-squad 1
@grafana/grafana-backend-group 75
@grafana/grafana-as-code 11
@grafana/identity-access-team 6
@grafana/partner-datasources 4

Example CLI command to get the owner for a specific dependency (you must use dependency@version, not dependency version):

go run scripts/modowners/modowners.go owners -d cloud.google.com/go/storage@v1.30.1 go.mod

Example output:

@grafana/grafana-backend-group

module

List all dependencies of given owner(s).

Example CLI command to list all direct dependencies owned by Delivery and Authnz:

go run scripts/modowners/modowners.go modules -o @grafana/grafana-release-guild,@grafana/identity-access-team go.mod

Example output:

github.com/BurntSushi/toml@v1.2.1
github.com/go-ldap/ldap/v3@v3.4.4
github.com/magefile/mage@v1.14.0
golang.org/x/oauth2@v0.8.0
github.com/drone/drone-cli@v1.6.1
github.com/google/go-github/v45@v45.2.0
github.com/Masterminds/semver/v3@v3.1.1
gopkg.in/square/go-jose.v2@v2.6.0
filippo.io/age@v1.1.1
github.com/docker/docker@v23.0.4+incompatible

Action items

For existing dependencies, please review and update ownership of your teams dependencies in go.mod.

  • If any assignments are incorrect, you can replace your team name with the correct team in go.mod.
  • If you dont know who the correct team is, you can reassign the dependency back to backend platform. Afterwards, open a PR and assign backend platform as reviewers.