Skip to content

feat: Add Grpc registry store for Go feature server#362

Open
piket wants to merge 3 commits into
masterfrom
grpc-registry-store-go
Open

feat: Add Grpc registry store for Go feature server#362
piket wants to merge 3 commits into
masterfrom
grpc-registry-store-go

Conversation

@piket
Copy link
Copy Markdown
Collaborator

@piket piket commented May 6, 2026

What this PR does / why we need it

The Go feature server previously only supported FileRegistryStore, HttpRegistryStore, and
S3RegistryStore. Projects using a remote gRPC registry (Python registry_type: remote) had no
supported Go-side equivalent, causing GetOnlineFeatures and GetOnlineFeaturesRange calls to
fail with "sorted feature view X doesn't exist" — even when the view was correctly registered.

This PR adds GrpcRegistryStore to the Go feature server, enabling it to connect to the Feast
remote registry over gRPC with TLS.

Root cause of the "doesn't exist" error: All per-item fallback lookups in registry.go were
hard-cast to *HttpRegistryStore (e.g.
r.registryStore.(*HttpRegistryStore).getSortedFeatureView(...)). This meant any non-HTTP store
would fail the type assertion at runtime, causing registry lookups to always return an error. This
PR introduces the FallbackRegistryStore interface and replaces all five casts, so any store
implementing HasFallback() == true can be used interchangeably.

Changes

  • grpc.go — New GrpcRegistryStore backed by RegistryServerClient. TLS is enabled when
    config.IsTls is true, config.Cert is set, or the path uses https://. Supports system cert
    pool or a custom PEM root CA for self-signed certs.
  • registrystore.go — New FallbackRegistryStore interface abstracting per-item fetch methods
    (getEntity, getFeatureView, getSortedFeatureView, getOnDemandFeatureView,
    getFeatureService).
  • registry.go — Registers "remote" scheme → GrpcRegistryStore in the scheme map; adds
    GrpcRegistryStore case to getRegistryStoreFromType; replaces all (*HttpRegistryStore) casts
    with (FallbackRegistryStore).
  • repoconfig.go — Adds Cert and IsTls fields to RegistryConfig; adds parsing for
    registry_type (resolves through the existing scheme map), cert, and is_tls keys.
  • grpc_test.go — Full unit test suite using bufconn for in-process gRPC: covers all fetch
    methods, HasFallback, Teardown, UpdateRegistryProto not-implemented, and parseGrpcTarget
    TLS scheme detection.
  • repoconfig_test.go — Extended with tests for remote, http, https registry types;
    cert/is_tls fields; default client_id; and YAML-based config loading.

Which issue(s) this PR fixes

Fixes the "sorted feature view X doesn't exist" error on the Go feature server when
registry_type: remote is configured in feature_store.yaml.

Testing

  • Unit tests: GOTOOLCHAIN=go1.23.12 go test ./go/internal/feast/registry/ -run TestGrpc -v
  • Live registry validated against mlpfs-range-query-perf-test test env — all three registered
    SortedFeatureViews resolve and GetOnlineFeaturesRange reaches Cassandra successfully

piket and others added 3 commits May 6, 2026 10:50
Adds a gRPC-backed registry store that mirrors the Python RemoteRegistry,
allowing the Go feature server to connect directly to a Feast registry
gRPC server without going through the HTTP translation layer.

Key changes:
- go/internal/feast/registry/grpc.go: GrpcRegistryStore using the existing
  RegistryServer gRPC stubs. Supports plain (grpc://) and TLS (grpcs://)
  connections, plus cert/is_tls config fields from Python RemoteRegistryConfig.
- go/internal/feast/registry/registrystore.go: Add FallbackRegistryStore
  interface to replace *HttpRegistryStore type casts in registry.go.
- go/internal/feast/registry/registry.go: Wire grpc/grpcs/remote schemes to
  GrpcRegistryStore in factory; replace 5 hard *HttpRegistryStore casts with
  FallbackRegistryStore interface assertions. Propagate errors on init for
  GrpcRegistryStore alongside FileRegistryStore and HttpRegistryStore.
- go/internal/feast/registry/repoconfig.go: Add Cert and IsTls fields to
  RegistryConfig; parse registry_type: remote as GrpcRegistryStore.
- go/internal/feast/registry/grpc_test.go: 10 tests using in-process bufconn
  server; 3 new config-parsing tests in repoconfig_test.go.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace hardcoded "remote" -> GrpcRegistryStore mapping with a lookup
against REGISTRY_STORE_CLASS_FOR_SCHEME so all scheme keys ("http",
"https", "grpc", "grpcs", "remote", "s3", "file") resolve correctly
via a single source of truth. Update all repoconfig tests to use
registry_type instead of registry_store_type.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@piket piket marked this pull request as ready for review May 19, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant