Skip to content

chore: depend on authorizer-proto-go instead of vendored stubs#23

Merged
lakhansamani merged 1 commit into
mainfrom
chore/use-proto-go-module
Jul 24, 2026
Merged

chore: depend on authorizer-proto-go instead of vendored stubs#23
lakhansamani merged 1 commit into
mainfrom
chore/use-proto-go-module

Conversation

@lakhansamani

Copy link
Copy Markdown
Contributor

Summary

Replaces the hand-copied internal/genpb protobuf/gRPC stubs with a real, versioned Go module dependency — authorizer-proto-go v0.1.0 — mirroring the prometheus/client_model pattern. This removes the cross-repo copy step that let the vendored stubs go stale (the drift behind authorizerdev/authorizer#726).

Changes

  • Remove internal/genpb/ (generated stubs, ~17.4k lines).
  • Add github.com/authorizerdev/authorizer-proto-go v0.1.0 to go.mod; protovalidate/genproto demote to indirect (now pulled transitively).
  • Rewrite import path internal/genpb/authorizer/v1 -> authorizer-proto-go/authorizer/v1 across 30 files (alias authorizerv1 unchanged).
  • authorizer-proto-go regenerates itself directly from buf.build/authorizerdev/authorizer (BSR) — no manual copy to forget.
  • REST transport unaffected: grpc-gateway JSON reuses the same proto message types, now sourced from the module.

Testing

  • go build ./..., go vet ./..., gofmt -l — clean.
  • go test ./test/ live integration against quay.io/authorizer/authorizer:2.4.0-rc.7 (GraphQL + REST + gRPC, public + admin): 25 passed, 0 failed.

Structural dependency change — leaving for human review, not self-merging.

Replace the hand-copied internal/genpb stubs with a real versioned module
dependency (github.com/authorizerdev/authorizer-proto-go v0.1.0).

- Removes the fragile cross-repo copy step that let the vendored stubs go
  stale (the drift that motivated authorizer#726).
- proto-go regenerates itself straight from buf.build/authorizerdev/authorizer,
  so there is no manual copy to forget.
- Import path internal/genpb/authorizer/v1 -> authorizer-proto-go/authorizer/v1
  across 30 files; protovalidate/genproto demote to indirect.
- REST transport is unaffected: grpc-gateway JSON uses the same proto message
  types, now sourced from the module.
@lakhansamani
lakhansamani merged commit 1cc14f6 into main Jul 24, 2026
1 check passed
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