-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Bug] protobuf dependency too lenient #223
Comments
Thanks for raising this @vglocus ! After internal discussion with our engineering team, we've decided to pin the lower bound and add some tests. |
We need to bump the lower bound of protobuf to the latest version that we use to generate the proto definitions in
It would be great to generate the lowest version of the prototype possible in the spec. |
We can also add tests that could either be pre-commit hooks or unit tests that ensure the generated proto files use the lowest supported version. This would ensure we don't introduce protos that are out of the supported range of our dependencies. Not a blocker for this work but would be neat to do at the same time. Example: https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/events/core_types_pb2.py#L12-L20 |
I ran into this bug today on |
Is this a new bug in dbt-common?
Current Behavior
As of #219 the new protobuf package dependency is set to ">=5.0,<=6.0".
However some files (e.g. dbt_common/events/types_pb2.py) are generated using a later version than 5.0.
With protobuf you should not run code generated with a later version on an earlier runtime. See cross-version-runtime-guarantee.
For example my environment has a 5.28.1 runtime (which satisfies ">=5.0,<=6.0") but is earlier than 5.28.3 which is what dbt_common/events/types_pb2.py is generated with.
The result is the following error when trying to run dbt_common/events/types_pb2.py
Suggested solution:
Set protobuf package dependency to ">=5.28.3,<=6.0" to allow dependency management of the users to solve this.
Expected Behavior
For dependency management (pip install) to not accept protobuf versions that will not work with dbt_common.
(In this case dbt_common says anything over 5.0 is fine, while really it must be 5.28.3 or later)
Steps To Reproduce
dbt-common==1.13.0
together withprotobuf==5.28.1
dbt deps
Relevant log output
Additional Context
No response
The text was updated successfully, but these errors were encountered: