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

mimirpb gogoproto custom type removal #10314

Draft
wants to merge 6 commits into
base: main
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
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ images: ## Print all image names.
@echo > /dev/null

# Generating proto code is automated.
PROTO_DEFS := $(shell find . $(DONT_FIND) -type f -name '*.proto' -print)
PROTO_DEFS := $(shell find . $(DONT_FIND) -type f -name '*_custom_types.proto' -prune -o -name '*.proto' -print)
PROTO_GOS := $(patsubst %.proto,%.pb.go,$(PROTO_DEFS))

# Generating OTLP translation code is automated.
Expand Down Expand Up @@ -324,7 +324,14 @@ GENERATE_FILES ?= true

%.pb.go: %.proto
ifeq ($(GENERATE_FILES),true)
protoc -I $(GOPATH)/src:./vendor/github.com/gogo/protobuf:./vendor:./$(@D):./pkg/storegateway/storepb --gogoslick_out=plugins=grpc,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./$(@D) ./$(patsubst %.pb.go,%.proto,$@)
if case "$@" in *_custom_types.pb.go) false ;; *) true ;; esac; then \
protoc \
-I ./vendor -I ./ -I ./vendor/github.com/gogo/protobuf \
--gogoslick_out=plugins=grpc,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:. \
./$(patsubst %.pb.go,%.proto,$@); \
else \
echo "Skipping $@"; \
fi
else
@echo "Warning: generating files has been disabled, but the following file needs to be regenerated: $@"
@echo "If this is unexpected, check if the last modified timestamps on $@ and $(patsubst %.pb.go,%.proto,$@) are correct."
Expand Down
84 changes: 43 additions & 41 deletions pkg/alertmanager/alertmanagerpb/alertmanager.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pkg/alertmanager/alertmanagerpb/alertmanager.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ syntax = "proto3";

package alertmanagerpb;
import "gogoproto/gogo.proto";

option go_package = "alertmanagerpb";

import "github.com/grafana/dskit/httpgrpc/httpgrpc.proto";
Expand Down
82 changes: 42 additions & 40 deletions pkg/alertmanager/alertspb/alerts.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading