Skip to content

feast-feature-server can't connect to postgresql as registry #3260

@jaeoheeail

Description

@jaeoheeail

Expected Behavior

Install feature-server helm-chart, I expect to see the pod running and be able to connect to the remote postgresql instance as a registry

Current Behavior

feature-server is unhealthy and can't connect to remote postgresql with this error message

Received base64 encoded feature_store.yaml
Traceback (most recent call last):
  File "/usr/local/bin/feast", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/feast/cli.py", line 704, in serve_command
    store = FeatureStore(repo_path=str(repo_path.resolve()))
  File "/usr/local/lib/python3.8/site-packages/feast/usage.py", line 352, in wrapper
    raise exc.with_traceback(traceback)
  File "/usr/local/lib/python3.8/site-packages/feast/usage.py", line 338, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/feast/feature_store.py", line 168, in __init__
    self._registry = SqlRegistry(registry_config, None)
  File "/usr/local/lib/python3.8/site-packages/feast/infra/registry/sql.py", line 184, in __init__
    self.engine: Engine = create_engine(registry_config.path, echo=False)
  File "<string>", line 2, in create_engine
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/deprecations.py", line 309, in warned
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/create.py", line 548, in create_engine
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 811, in dbapi
    import psycopg2
ModuleNotFoundError: No module named 'psycopg2'

Steps to reproduce

Use the instructions to deploy feature-server using helm: https://github.com/feast-dev/feast/tree/master/infra/charts/feast-feature-server

Create a file called feature_store.yaml with the content below:

project: test_feast
provider: aws
online_store:
type: dynamodb
region: xxx
registry:
registry_type: sql
path: postgresql://user:password@x.x.x.x:5432/registry
offline_store:
type: file
entity_key_serialization_version: 2
Run: helm install feast-feature-server feast-charts/feast-feature-server --set feature_store_yaml_base64=$(base64 feature_store.yaml)

Specifications

  • Version: Chart version 0.25.0
  • Platform: Kubernetes version 1.22.11
  • Subsystem:

Possible Solution

Add postgres to

RUN pip install ".[aws,gcp,snowflake,redis,go,mysql]"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions