GreptimeTeam / greptimedb

An open-source, cloud-native, unified time series database for metrics, logs and events with SQL/PromQL supported. Available on GreptimeCloud.
https://greptime.com/
Apache License 2.0
4.34k stars 314 forks source link

libprotoc version is not correct in docker build #616

Closed bonito-skipjack closed 1 year ago

bonito-skipjack commented 1 year ago

What type of bug is this?

Other

What subsystems are affected?

Other

What happened?

The README.md file clearly states if I built from source, that protoc version needs greater or equal to 3.15. But in Dockerfile, after docker builds, the version is 3.12.4.

What operating system did you use?

Ubuntu 22.04

Relevant log output and stack trace

# protoc --version
libprotoc 3.12.4

How can we reproduce the bug?

Run docker build
waynexia commented 1 year ago

Thanks for your report!

I search into protoc's changelog and find out that

2020-05-12 version 3.12.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

  Protocol Compiler
  * [experimental] Singular, non-message typed fields in proto3 now support
    presence tracking. This is enabled by adding the "optional" field label and
    passing the --experimental_allow_proto3_optional flag to protoc.
    * For usage info, see docs/field_presence.md.
    * During this experimental phase, code generators s

2021-02-05 version 3.15.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

  Protocol Compiler
  * Optional fields for proto3 are enabled by default, and no longer require
    the --experimental_allow_proto3_optional flag.

And tonic-build also mentions this: https://github.com/hyperium/tonic/blob/933f5607350af983e479219a2ef3688484976968/tonic-build/src/prost.rs#L354-L360

But now the codebase doesn't contain optional protocol as we are in progress of refactoring our gRPC protocol. I guess that's why 3.12.4 could compile.