grafana / tempo

Grafana Tempo is a high volume, minimal dependency distributed tracing backend.
https://grafana.com/oss/tempo/
GNU Affero General Public License v3.0
4.03k stars 522 forks source link

compile issue when make vendor-check #3905

Closed shalk closed 3 months ago

shalk commented 3 months ago

Describe the bug

I read the Contributing.md, run make vendor-check. When the code run gen-traceql-local , some error happen as follow

--
-- Gen proto --
--
docker run --rm -u 501 -v/Users/xiaokun/code/github.com/grafana/tempo:/Users/xiaokun/code/github.com/grafana/tempo -w/Users/xiaokun/code/github.com/grafana/tempo otel/build-protobuf:0.23.0 --proto_path=/Users/xiaokun/code/github.com/grafana/tempo -Ipkg/.patched-proto --gogofaster_out=plugins=grpc,paths=source_relative:./pkg/tempopb/ pkg/.patched-proto/common/v1/common.proto
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
docker run --rm -u 501 -v/Users/xiaokun/code/github.com/grafana/tempo:/Users/xiaokun/code/github.com/grafana/tempo -w/Users/xiaokun/code/github.com/grafana/tempo otel/build-protobuf:0.23.0 --proto_path=/Users/xiaokun/code/github.com/grafana/tempo -Ipkg/.patched-proto --gogofaster_out=plugins=grpc,paths=source_relative:./pkg/tempopb/ pkg/.patched-proto/resource/v1/resource.proto
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
docker run --rm -u 501 -v/Users/xiaokun/code/github.com/grafana/tempo:/Users/xiaokun/code/github.com/grafana/tempo -w/Users/xiaokun/code/github.com/grafana/tempo otel/build-protobuf:0.23.0 --proto_path=/Users/xiaokun/code/github.com/grafana/tempo -Ipkg/.patched-proto --gogofaster_out=plugins=grpc,paths=source_relative:./pkg/tempopb/ pkg/.patched-proto/trace/v1/trace.proto
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
docker run --rm -u 501 -v/Users/xiaokun/code/github.com/grafana/tempo:/Users/xiaokun/code/github.com/grafana/tempo -w/Users/xiaokun/code/github.com/grafana/tempo otel/build-protobuf:0.23.0 --proto_path=/Users/xiaokun/code/github.com/grafana/tempo -Ipkg/.patched-proto --gogofaster_out=plugins=grpc,paths=source_relative:./ pkg/tempopb/tempo.proto
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
docker run --rm -u 501 -v/Users/xiaokun/code/github.com/grafana/tempo:/Users/xiaokun/code/github.com/grafana/tempo -w/Users/xiaokun/code/github.com/grafana/tempo otel/build-protobuf:0.23.0 --proto_path=/Users/xiaokun/code/github.com/grafana/tempo -Ipkg/.patched-proto -Ivendor -Ivendor/github.com/gogo/protobuf --gogofaster_out=plugins=grpc,paths=source_relative:./ modules/frontend/v1/frontendv1pb/frontend.proto
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
rm -rf pkg/.patched-proto
go mod vendor
go mod tidy -e
/Library/Developer/CommandLineTools/usr/bin/make -C cmd/tempo-serverless update-mod
cd lambda && go mod tidy -e
cd cloud-run && go mod tidy -e
docker run --rm -v/Users/xiaokun/code/github.com/grafana/tempo:/src/loki grafana/loki-build-image:0.21.0 gen-traceql-local
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
make: Entering directory '/src/loki'
go: errors parsing go.mod:
/src/loki/go.mod:3: invalid go version '1.22.4': must match format 1.23
goyacc -o pkg/traceql/expr.y.go pkg/traceql/expr.y && rm y.output

conflicts: 1 shift/reduce
make: Leaving directory '/src/loki'
go run ./pkg/parquetquerygen/predicates.go > ./pkg/parquetquery/predicates.gen.go
git diff --exit-code -- **/go.sum **/go.mod vendor/ pkg/tempopb/ pkg/traceql/

The error info looks like https://github.com/golang/go/issues/61888, but i do't know if this is relate to grafana/loki-build-image:0.21.0

i also find the ci step is failed , but the ci step is passed .
see ci log https://github.com/grafana/tempo/actions/runs/10085732303/job/27887063416#step:5:804

To Reproduce Steps to reproduce the behavior:

  1. Start Tempo (SHA or version)
  2. Perform Operations (Read/Write/Others)

Expected behavior compile success

Environment:

Additional Context

javiermolinar commented 3 months ago

I'm able to reproduce it as well

javiermolinar commented 3 months ago

The problem seems to be in this target:

.PHONY: gen-traceql 
gen-traceql: ## Generate traceql 
    docker run --rm -v${PWD}:/src/loki ${LOKI_BUILD_IMAGE} gen-traceql-local

I think this target makes no sense at all. It should be removed and replaced it by gen-traceql-local