grafana/scripts/modowners
dependabot[bot] ab9d5f227d
deps(go): bump golang.org/x/mod from 0.34.0 to 0.35.0 in /scripts/modowners (#124770)
deps(go): bump golang.org/x/mod in /scripts/modowners

Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.34.0 to 0.35.0.
- [Commits](https://github.com/golang/mod/compare/v0.34.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-version: 0.35.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 11:16:11 +02:00
..
.gitignore Feat: Add command line app to validate go.mod (#67796) 2023-05-30 18:18:05 +03:00
go.mod deps(go): bump golang.org/x/mod from 0.34.0 to 0.35.0 in /scripts/modowners (#124770) 2026-05-13 11:16:11 +02:00
go.sum deps(go): bump golang.org/x/mod from 0.34.0 to 0.35.0 in /scripts/modowners (#124770) 2026-05-13 11:16:11 +02:00
modowners.go Chore: Migrate DES and release-guild ownership to grafana-backend-services-squad (#123494) 2026-04-29 16:21:24 +02:00
modowners_test.go Chore: Replace backend platform codeownership (#86010) 2024-04-19 19:12:59 +02:00
README.md docs: update doc references from plugins-platform handles to @grafana/grafana-catalog (#124474) 2026-05-11 12:16:12 +02:00

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-backend-services-squad 5
@grafana/grafana-bi-squad 2
@grafana/grafana-app-platform-squad 13
@grafana/observability-metrics 4
@grafana/observability-traces-and-profiling 6
@grafana/alerting-squad-backend 22
@grafana/grafana-catalog 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/data-sources-plugins 6

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 Backend Services and Authnz:

go run scripts/modowners/modowners.go modules -o @grafana/grafana-backend-services-squad,@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

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.