You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remote registry client fails with ModuleNotFoundError: No module named 'grpc' unless the unrelated [grpcio] extra is installed #6666
Installing Feast with any extra that supports a remote registry, and configuring registry_type: remote, should work — grpcio should be present because the
remote registry client cannot run without it.
Current Behavior
sdk/python/feast/infra/registry/remote.py does an unconditional module-level import grpc. grpcio is declared only in the grpcio optional-dependency
group in pyproject.toml, and no other extra depends on it. So an install such
as pip install feast[redis] or feast[postgres] resolves cleanly and then
fails at runtime as soon as the remote registry is constructed:
ModuleNotFoundError: No module named 'grpc'
The grpcio extra reads as being about serving gRPC (it also pulls grpcio-reflection and grpcio-health-checking, which a client does not need),
so there is nothing to suggest a registry client requires it. The failure
surfaces only at runtime, in a code path unrelated to anything the user
installed.
Steps to reproduce
pip install "feast[postgres]==0.64.0" in a clean virtualenv.
feature_store.yaml:
project: demoregistry:
registry_type: remotepath: registry.example:80provider: local
Fails with ModuleNotFoundError: No module named 'grpc'.
Specifications
Version: 0.64.0; unchanged on 0.65.0 (latest release) and master. On 0.65.0
the redis extra pulls only redis and hiredis, and grpcio remains
declared solely in the grpcio extra.
The dependency has to become reachable — the only question is how.
Move grpcio into the core dependencies. The remote registry is a
first-class registry type, and grpcio ships a wheel on every supported
platform. This is the only option that fixes an existing pip install feast[postgres] without the user changing anything.
Add a client-only extra (for example remote) that pulls just grpcio,
and document it as required for registry_type: remote. Users still have to
edit their install line, but there is then a correct one to point them at. The
existing grpcio extra is a poor substitute: it also pulls grpcio-reflection and grpcio-health-checking, which a registry client
does not need, and its name reads as being about serving gRPC.
A lazy import that raises a clear Feast error naming the extra would be an
improvement on the bare ModuleNotFoundError, but it is worth being explicit
that it does not fix this: the remote registry still cannot run, the call
still fails, and the user is still stuck until the dependency is installed. Good
diagnostics are worth having alongside (1) or (2), not instead of them.
Our workaround is to add grpcio to the dependency set of the module that builds
the store, which is invisible to anyone reading pyproject.toml for what a
remote registry needs.
Activity