Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM-12723 Remove type name from generated enums #3343

Draft
wants to merge 1 commit into
base: v3
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions api/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ managed:
module: buf.build/grpc-ecosystem/grpc-gateway
- file_option: go_package
module: buf.build/envoyproxy/protoc-gen-validate
- file_option: go_package
module: buf.build/alta/protopatch
override:
- file_option: go_package_prefix
value: github.com/percona/pmm/api
plugins:
- local: ../bin/protoc-gen-go
- local: ../bin/protoc-gen-go-patch
out: .
opt: paths=source_relative
- local: ../bin/protoc-gen-go-grpc
opt:
- paths=source_relative
- plugin=go
- local: ../bin/protoc-gen-go-patch
out: .
opt: paths=source_relative
opt:
- paths=source_relative
- plugin=go-grpc
- local: ../bin/protoc-gen-grpc-gateway
out: .
opt: paths=source_relative
Expand Down
15 changes: 9 additions & 6 deletions api/buf.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/alta/protopatch
commit: cf22509f2c224a358bb5e749aa029444
digest: b5:4d31fce06011dd4996c55de9ef8a9352770bdff014b102cd8aeee1df67536112f4f2df142172bc0927b3b1c9ca5dcb3d1c8974b900958dc21b2aa6d4ab931f47
- name: buf.build/envoyproxy/protoc-gen-validate
commit: eac44469a7af47e7839a7f1f3d7ac004
digest: b5:2ef7b25d9671fde82d58278e94d209788fb6a42936cc2d60e42303b67dcdb72b2d0e121238ba44caf1870a34edab55518df5d3f1ee1e62b8d9b6cf98817eae6e
commit: daf171c6cdb54629b5f51e345a79e4dd
digest: b5:c745e1521879f43740230b1df673d0729f55704efefdcfc489d4a0a2d40c92a26cacfeab62813403040a8b180142d53b398c7ca784a065e43823605ee49681de
- name: buf.build/googleapis/googleapis
commit: 28151c0d0a1641bf938a7672c500e01d
digest: b5:93b70089baa4fc05a92d3e52db91a4b7812db3b57b9664f6cb301733938cb630e377a938e8a56779388171c749c1d42a2e9a6c6230f2ff45f127a8102a6a27d0
commit: c0913f24652a4cfc95f77d97443a5005
digest: b5:4edb1480036c60f7867d75417d7faa87c851c96a4988a9746058a24e8e9bb4978daed0af35d57f6043de5a60355978dceaaa93dc992be99193260ac8823cbb8f
- name: buf.build/grpc-ecosystem/grpc-gateway
commit: 3f42134f4c564983838425bc43c7a65f
digest: b5:291b947d8ac09492517557e4e72e294788cb8201afc7d0df7bda80fa10931adb60d4d669208a7696bf24f1ecb2a33a16d4c1e766e6f31809248b00343119569b
commit: a48fcebcf8f140dd9d09359b9bb185a4
digest: b5:330af8a71b579ab96c4f3ee26929d1a68a5a9e986c7cfe0a898591fc514216bb6e723dc04c74d90fdee3f3f14f9100a54b4f079eb273e6e7213f0d5baca36ff8
1 change: 1 addition & 0 deletions api/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: v2
modules:
- path: .
deps:
- buf.build/alta/protopatch
- buf.build/envoyproxy/protoc-gen-validate
- buf.build/googleapis/googleapis
- buf.build/grpc-ecosystem/grpc-gateway
Expand Down
2 changes: 2 additions & 0 deletions api/server/v1/server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import "common/common.proto";
import "google/api/annotations.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "patch/go.proto";
import "protoc-gen-openapiv2/options/annotations.proto";

// DistributionMethod defines PMM Server distribution method: Docker image, OVF/OVA, or AMI.
enum DistributionMethod {
option (go.enum).stringer = "OrigString";
DISTRIBUTION_METHOD_UNSPECIFIED = 0;
DISTRIBUTION_METHOD_DOCKER = 1;
DISTRIBUTION_METHOD_OVF = 2;
Expand Down
2 changes: 2 additions & 0 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ replace github.com/go-openapi/spec => github.com/Percona-Lab/spec v0.21.0-percon
require (
github.com/BurntSushi/go-sumtype v0.0.0-20190304192233-fcb4a6205bdc
github.com/Percona-Lab/swagger-order v0.0.0-20191002141859-166b3973d026
github.com/alta/protopatch v0.5.4-0.20241029232439-aa5698f2d7a2
github.com/apache/skywalking-eyes v0.6.0
github.com/bufbuild/buf v1.47.0
github.com/daixiang0/gci v0.13.0
Expand Down Expand Up @@ -86,6 +87,7 @@ require (
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/structtag v1.2.0 // indirect
github.com/felixge/fgprof v0.9.5 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafo
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
github.com/alta/protopatch v0.5.4-0.20241029232439-aa5698f2d7a2 h1:plDr9mHLqwdIxdVZ+Wfn6E6ONAY9DxUenkaF3IaF1nY=
github.com/alta/protopatch v0.5.4-0.20241029232439-aa5698f2d7a2/go.mod h1:1h+YAUhVUQCD/KYxc5RLPaqktXdmUPrCN/J+Jr7Tpgc=
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
Expand Down Expand Up @@ -216,6 +218,8 @@ github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6
github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4=
github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw=
github.com/felixge/fgprof v0.9.5 h1:8+vR6yu2vvSKn08urWyEuxx75NWPEvybbkBirEpsbVY=
github.com/felixge/fgprof v0.9.5/go.mod h1:yKl+ERSa++RYOs32d8K6WEXCB4uXdLls4ZaZPpayhMM=
Expand Down
2 changes: 2 additions & 0 deletions tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package tools
import (
_ "github.com/BurntSushi/go-sumtype"
_ "github.com/Percona-Lab/swagger-order"
_ "github.com/alta/protopatch/cmd/protoc-gen-go-patch"
_ "github.com/apache/skywalking-eyes/cmd/license-eye"
_ "github.com/bufbuild/buf/cmd/buf"
_ "github.com/daixiang0/gci"
Expand Down Expand Up @@ -56,6 +57,7 @@ import (
//go:generate go build -o ../bin/mockery github.com/vektra/mockery/v2
//go:generate go build -o ../bin/protoc-gen-go google.golang.org/protobuf/cmd/protoc-gen-go
//go:generate go build -o ../bin/protoc-gen-go-grpc google.golang.org/grpc/cmd/protoc-gen-go-grpc
//go:generate go build -o ../bin/protoc-gen-go-patch github.com/alta/protopatch/cmd/protoc-gen-go-patch
//go:generate go build -o ../bin/protoc-gen-grpc-gateway github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway
//go:generate go build -o ../bin/protoc-gen-openapiv2 github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
//go:generate go build -o ../bin/reform gopkg.in/reform.v1/reform
Expand Down
Loading