feast-dev / feast-dev/feast

Bug Report: Incorrect Protobuf Version Compatibility

Open
#5,457 0 comments 0 reactions 0 assignees View on GitHub
kind/bug priority/p2
Dominant language
Python
Stars
7.3k
Forks
1.4k
Avg merge
3d 16h
Merged PRs (30d)
15

Description

# Bug Report: Incorrect Protobuf Version Compatibility

## Expected Behavior

Feast should work correctly when installed into an environment with `protobuf==4.25.6`, as allowed by its `pyproject.toml` specification (`protobuf >=3.20.3,<7`), or it should explicitly declare the minimum version of `protobuf` it requires to function.

## Current Behavior

Feast fails to import with the following error:

```
ImportError: cannot import name 'runtime_version' from 'google.protobuf'
```

This happens when using `protobuf==4.25.6`, even though that version satisfies the declared range. The `runtime_version` attribute is only available in `protobuf>=5.24.0`, indicating that Feast requires a higher version than it currently declares.

## Steps to Reproduce

1. Create a new Python environment (Python 3.11 used here, but Python 3.10 may also be affected).
2. Install `protobuf==4.25.6`.
3. Install Feast: `pip install feast`.
4. Try to import:

```python
from feast import FeatureStore
```

You’ll see this error:

```
ImportError: cannot import name 'runtime_version' from 'google.protobuf'
```

## Specifications

- **Feast Version**: Latest (as of June 2025)
- **Python Version**: 3.10.14
- **Protobuf Version**: 4.25.6
- **Platform**: Linux (Conda / Jupyter Notebook)
- **Subsystem**: pip, Python environment

## Possible Solution

Update the `protobuf` dependency in `pyproject.toml` to reflect the actual minimum version required. Based on usage of `google.protobuf.runtime_version`, the correct constraint should likely be:

```toml
protobuf = ">=6.30.2,<7"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.