Skip to content

Commit

Permalink
Upgrade otel/build-protobuf image 0.2.1->0.11.0 (#46)
Browse files Browse the repository at this point in the history
* Upgrade otel/build-protobuf image 0.2.1->0.11.0

Upgrades `github.com/grpc-ecosystem/grpc-gateway` v1.16.0 -> v2.10.0

Upgrades `google.golang.org/protobuf` v1.27.1 -> v1.28.0

Switch from `github.com/golang/protobuf` to `google.golang.org/protobuf`
entirely.

* Set desired grpc-gateway version

* Update go.mod creation

* Go back to supporting build on Go 1.14

* Add upgrade of unconstrained packages

* Replace instead of require

* Remove trailing back slash

* Revert back to the required method
  • Loading branch information
MrAlias authored Mar 25, 2022
1 parent 595a21d commit 82d5892
Show file tree
Hide file tree
Showing 19 changed files with 375 additions and 106 deletions.
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ SOURCE_PROTO_FILES := $(subst $(OTEL_PROTO_SUBMODULE),$(PROTO_SOURCE_DIR),$(SUBM
GO_MOD_ROOT := go.opentelemetry.io/proto
OTLP_OUTPUT_DIR := otlp
GO_VERSION := 1.14
# TODO: Remove this when support for Go <1.17 is dropped. Versions > v2.7.0 of
# github.com/grpc-ecosystem/grpc-gateway/v2 require Go 1.17.
OTLP_REQUIRE := github.com/grpc-ecosystem/grpc-gateway/v2@v2.7.0

# Function to execute a command. Note the empty line before endef to make sure each command
# gets executed separately instead of concatenated with previous one.
Expand All @@ -51,7 +54,7 @@ $(1)

endef

OTEL_DOCKER_PROTOBUF ?= otel/build-protobuf:0.2.1
OTEL_DOCKER_PROTOBUF ?= otel/build-protobuf:0.11.0
PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${OTEL_DOCKER_PROTOBUF} --proto_path="$(PROTO_SOURCE_DIR)"

.DEFAULT_GOAL := protobuf
Expand Down Expand Up @@ -90,8 +93,10 @@ copy-otlp-protobuf:
rm -rf ./$(OTLP_OUTPUT_DIR)
mkdir -p ./$(OTLP_OUTPUT_DIR)
@rsync -a $(PROTOBUF_TEMP_DIR)/go.opentelemetry.io/proto/otlp/ ./$(OTLP_OUTPUT_DIR)
cd ./$(OTLP_OUTPUT_DIR) && go mod init $(GO_MOD_ROOT)/$(OTLP_OUTPUT_DIR)
@cd ./$(OTLP_OUTPUT_DIR) && go mod edit -go=$(GO_VERSION) && go get ./...
cd ./$(OTLP_OUTPUT_DIR) \
&& go mod init $(GO_MOD_ROOT)/$(OTLP_OUTPUT_DIR) \
&& go mod edit -go=$(GO_VERSION) -require=$(OTLP_REQUIRE) \
&& go mod tidy

.PHONY: clean
clean:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module go.opentelemetry.io/proto

go 1.15
go 1.15
9 changes: 2 additions & 7 deletions otlp/collector/logs/v1/logs_service.pb.go

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

14 changes: 6 additions & 8 deletions otlp/collector/logs/v1/logs_service.pb.gw.go

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

12 changes: 10 additions & 2 deletions otlp/collector/logs/v1/logs_service_grpc.pb.go

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

9 changes: 2 additions & 7 deletions otlp/collector/metrics/v1/metrics_service.pb.go

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

14 changes: 6 additions & 8 deletions otlp/collector/metrics/v1/metrics_service.pb.gw.go

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

12 changes: 10 additions & 2 deletions otlp/collector/metrics/v1/metrics_service_grpc.pb.go

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

9 changes: 2 additions & 7 deletions otlp/collector/trace/v1/trace_config.pb.go

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

9 changes: 2 additions & 7 deletions otlp/collector/trace/v1/trace_service.pb.go

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

14 changes: 6 additions & 8 deletions otlp/collector/trace/v1/trace_service.pb.gw.go

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

Loading

0 comments on commit 82d5892

Please sign in to comment.