feat(go): Add MySQL registry store support for Go feature server#5933
feat(go): Add MySQL registry store support for Go feature server#5933ntkathole merged 2 commits intofeast-dev:masterfrom
Conversation
522e2c7 to
d2fa326
Compare
This adds support for reading Feast registry data from a MySQL database in the Go feature server, enabling parity with the Python SDK's SQL registry store. - `mysql_registry_store.go`: MySQL registry store implementation - Parses SQLAlchemy-style URLs (mysql://user:pass@host:port/db) - Reads all registry tables (projects, entities, feature_views, etc.) - Uses generics for type-safe protobuf unmarshaling - Configurable connection pool settings - `mysql_registry_store_test.go`: Unit tests using in-memory SQLite - Tests registry loading with schema matching Python SQLAlchemy - Tests scheme routing for mysql:// URLs - `registry.go`: Added mysql scheme routing and MySQLRegistryStore factory - `repoconfig.go`: Added MySQL connection pool configuration options - mysql_max_open_conns (default: 20) - mysql_max_idle_conns (default: 10) - mysql_conn_max_lifetime_seconds (default: 300) - `repoconfig_test.go`: Added tests for new MySQL config options Users can configure the MySQL registry in feature_store.yaml: ```yaml registry: path: mysql://user:password@localhost:3306/feast_registry mysql_max_open_conns: 20 mysql_max_idle_conns: 10 mysql_conn_max_lifetime_seconds: 300 ``` The Go implementation reads from the same schema as the Python SQLAlchemy registry (sdk/python/feast/infra/registry/sql.py). When the Python schema evolves, the Go queries must be updated. Signed-off-by: PepeluDev <joseluislobell@gmail.com>
Signed-off-by: PepeluDev <joseluislobell@gmail.com>
88629a1 to
cb5b8ed
Compare
There was a problem hiding this comment.
🔴 InitializeRegistry silently ignores UpdateRegistryProto error for MySQLRegistryStore
When GetRegistryProto() fails for MySQLRegistryStore (e.g., database connection error, missing project), the InitializeRegistry function attempts to call UpdateRegistryProto() but ignores its return value. Since MySQLRegistryStore's UpdateRegistryProto always returns an error ("not implemented"), initialization silently "succeeds" even though the registry failed to load.
Root Cause
At registry.go:77, when getRegistryProto() fails for a non-FileRegistryStore, the code calls r.registryStore.UpdateRegistryProto(registryProto) without checking the error:
if err != nil {
if _, ok := r.registryStore.(*FileRegistryStore); ok {
log.Error().Err(err).Msg("Registry Initialization Failed")
return err
}
registryProto := &core.Registry{RegistrySchemaVersion: REGISTRY_SCHEMA_VERSION}
r.registryStore.UpdateRegistryProto(registryProto) // error ignored!
}MySQLRegistryStore returns an error at mysql_registry_store.go:219:
func (r *MySQLRegistryStore) UpdateRegistryProto(rp *core.Registry) error {
return errors.New("not implemented in MySQLRegistryStore")
}Impact: If the MySQL database is misconfigured or the project doesn't exist, the feature server starts successfully but with an empty registry. All subsequent feature lookups will fail with confusing errors about missing entities/feature views, making debugging difficult.
(Refers to line 77)
Prompt for agents
In go/internal/feast/registry/registry.go, the InitializeRegistry function at line 69-81 needs to handle MySQLRegistryStore similar to how it handles FileRegistryStore. Since MySQLRegistryStore is read-only and cannot create a new registry, errors from GetRegistryProto should propagate up instead of attempting to call UpdateRegistryProto. Add a type check for *MySQLRegistryStore alongside the FileRegistryStore check, so that both return the error from getRegistryProto rather than silently ignoring the failed UpdateRegistryProto call.
Was this helpful? React with 👍 or 👎 to provide feedback.
…st-dev#5933) * feat(go): Add MySQL registry store support for Go feature server This adds support for reading Feast registry data from a MySQL database in the Go feature server, enabling parity with the Python SDK's SQL registry store. - `mysql_registry_store.go`: MySQL registry store implementation - Parses SQLAlchemy-style URLs (mysql://user:pass@host:port/db) - Reads all registry tables (projects, entities, feature_views, etc.) - Uses generics for type-safe protobuf unmarshaling - Configurable connection pool settings - `mysql_registry_store_test.go`: Unit tests using in-memory SQLite - Tests registry loading with schema matching Python SQLAlchemy - Tests scheme routing for mysql:// URLs - `registry.go`: Added mysql scheme routing and MySQLRegistryStore factory - `repoconfig.go`: Added MySQL connection pool configuration options - mysql_max_open_conns (default: 20) - mysql_max_idle_conns (default: 10) - mysql_conn_max_lifetime_seconds (default: 300) - `repoconfig_test.go`: Added tests for new MySQL config options Users can configure the MySQL registry in feature_store.yaml: ```yaml registry: path: mysql://user:password@localhost:3306/feast_registry mysql_max_open_conns: 20 mysql_max_idle_conns: 10 mysql_conn_max_lifetime_seconds: 300 ``` The Go implementation reads from the same schema as the Python SQLAlchemy registry (sdk/python/feast/infra/registry/sql.py). When the Python schema evolves, the Go queries must be updated. Signed-off-by: PepeluDev <joseluislobell@gmail.com> * docs(go): Clarify MySQL registry store package documentation Signed-off-by: PepeluDev <joseluislobell@gmail.com> --------- Signed-off-by: PepeluDev <joseluislobell@gmail.com> Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
…st-dev#5933) * feat(go): Add MySQL registry store support for Go feature server This adds support for reading Feast registry data from a MySQL database in the Go feature server, enabling parity with the Python SDK's SQL registry store. - `mysql_registry_store.go`: MySQL registry store implementation - Parses SQLAlchemy-style URLs (mysql://user:pass@host:port/db) - Reads all registry tables (projects, entities, feature_views, etc.) - Uses generics for type-safe protobuf unmarshaling - Configurable connection pool settings - `mysql_registry_store_test.go`: Unit tests using in-memory SQLite - Tests registry loading with schema matching Python SQLAlchemy - Tests scheme routing for mysql:// URLs - `registry.go`: Added mysql scheme routing and MySQLRegistryStore factory - `repoconfig.go`: Added MySQL connection pool configuration options - mysql_max_open_conns (default: 20) - mysql_max_idle_conns (default: 10) - mysql_conn_max_lifetime_seconds (default: 300) - `repoconfig_test.go`: Added tests for new MySQL config options Users can configure the MySQL registry in feature_store.yaml: ```yaml registry: path: mysql://user:password@localhost:3306/feast_registry mysql_max_open_conns: 20 mysql_max_idle_conns: 10 mysql_conn_max_lifetime_seconds: 300 ``` The Go implementation reads from the same schema as the Python SQLAlchemy registry (sdk/python/feast/infra/registry/sql.py). When the Python schema evolves, the Go queries must be updated. Signed-off-by: PepeluDev <joseluislobell@gmail.com> * docs(go): Clarify MySQL registry store package documentation Signed-off-by: PepeluDev <joseluislobell@gmail.com> --------- Signed-off-by: PepeluDev <joseluislobell@gmail.com> Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
# [0.60.0](v0.59.0...v0.60.0) (2026-02-17) ### Bug Fixes * Added a flag to correctly download the go binaries ([0f77135](0f77135)) * Adds mapping of date Trino's type into string Feast's type ([531e839](531e839)) * **ci:** Use uv run for pytest in master_only benchmark step ([#5957](#5957)) ([5096010](5096010)) * Disable materialized odfvs for historical retrieval ([#5880](#5880)) ([739d28a](739d28a)) * Fix linting and formatting issues ([#5907](#5907)) ([42ca14a](42ca14a)) * Make timestamp field handling compatible with Athena V3 ([#5936](#5936)) ([e2bad34](e2bad34)) * Support pgvector under non-default schema ([#5970](#5970)) ([c636cd4](c636cd4)) * unit tests not running on main branch ([#5909](#5909)) ([62fe664](62fe664)) * Update java dep which blocking release ([#5903](#5903)) ([a5b8186](a5b8186)) * Update the dockerfile with golang 1.24.12. ([#5918](#5918)) ([be1b522](be1b522)) * Use context.Background() in client constructors ([#5897](#5897)) ([984f93a](984f93a)) ### Features * Add blog post for PyTorch ecosystem announcement ([#5906](#5906)) ([d2eb629](d2eb629)) * Add blog post on Feast dbt integration ([#5915](#5915)) ([b3c8138](b3c8138)) * Add DynamoDB in-place list update support for array-based features ([#5916](#5916)) ([aa5973f](aa5973f)) * Add HTTP connection pooling for remote online store client ([#5895](#5895)) ([e022bf8](e022bf8)) * Add integration tests for dbt import ([#5899](#5899)) ([a444692](a444692)) * Add lazy initialization and feature service caching ([#5924](#5924)) ([b37b7d0](b37b7d0)) * Add multiple entity support to dbt integration ([#5901](#5901)) ([05a4fb5](05a4fb5)), closes [#5872](#5872) * Add PostgreSQL online store support for Go feature server ([#5963](#5963)) ([b8c6f3d](b8c6f3d)) * Add publish docker image of Go feature server. ([#5923](#5923)) ([759d8c6](759d8c6)) * Add Set as feature type ([#5888](#5888)) ([52458fc](52458fc)) * Added online server worker config support in operator ([#5926](#5926)) ([193c72a](193c72a)) * Added support for OpenLineage integration ([#5884](#5884)) ([df70d8d](df70d8d)) * Adjust ray offline store to support abfs(s) ADLS Azure Storage ([#5911](#5911)) ([d6c0b2d](d6c0b2d)) * Batch_engine config injection in feature_store.yaml through operator ([#5938](#5938)) ([455d56c](455d56c)) * Consolidate Python packaging - remove setup.py/setup.cfg, standardize on pyproject.toml and uv ([16696b8](16696b8)) * **go:** Add MySQL registry store support for Go feature server ([#5933](#5933)) ([19f9bb8](19f9bb8)) * Improve local dev experience with file-aware hooks and auto parallelization ([#5956](#5956)) ([839b79e](839b79e)) * Modernize precommit hooks and optimize test performance ([#5929](#5929)) ([ea7d4fa](ea7d4fa)) * Optimize container infrastructure for production ([#5881](#5881)) ([5ebdac8](5ebdac8)) * Optimize DynamoDB online store for improved latency ([#5889](#5889)) ([fcc8274](fcc8274))
# [0.60.0](feast-dev/feast@v0.59.0...v0.60.0) (2026-02-17) ### Bug Fixes * Added a flag to correctly download the go binaries ([0f77135](feast-dev@0f77135)) * Adds mapping of date Trino's type into string Feast's type ([531e839](feast-dev@531e839)) * **ci:** Use uv run for pytest in master_only benchmark step ([feast-dev#5957](feast-dev#5957)) ([5096010](feast-dev@5096010)) * Disable materialized odfvs for historical retrieval ([feast-dev#5880](feast-dev#5880)) ([739d28a](feast-dev@739d28a)) * Fix linting and formatting issues ([feast-dev#5907](feast-dev#5907)) ([42ca14a](feast-dev@42ca14a)) * Make timestamp field handling compatible with Athena V3 ([feast-dev#5936](feast-dev#5936)) ([e2bad34](feast-dev@e2bad34)) * Support pgvector under non-default schema ([feast-dev#5970](feast-dev#5970)) ([c636cd4](feast-dev@c636cd4)) * unit tests not running on main branch ([feast-dev#5909](feast-dev#5909)) ([62fe664](feast-dev@62fe664)) * Update java dep which blocking release ([feast-dev#5903](feast-dev#5903)) ([a5b8186](feast-dev@a5b8186)) * Update the dockerfile with golang 1.24.12. ([feast-dev#5918](feast-dev#5918)) ([be1b522](feast-dev@be1b522)) * Use context.Background() in client constructors ([feast-dev#5897](feast-dev#5897)) ([984f93a](feast-dev@984f93a)) ### Features * Add blog post for PyTorch ecosystem announcement ([feast-dev#5906](feast-dev#5906)) ([d2eb629](feast-dev@d2eb629)) * Add blog post on Feast dbt integration ([feast-dev#5915](feast-dev#5915)) ([b3c8138](feast-dev@b3c8138)) * Add DynamoDB in-place list update support for array-based features ([feast-dev#5916](feast-dev#5916)) ([aa5973f](feast-dev@aa5973f)) * Add HTTP connection pooling for remote online store client ([feast-dev#5895](feast-dev#5895)) ([e022bf8](feast-dev@e022bf8)) * Add integration tests for dbt import ([feast-dev#5899](feast-dev#5899)) ([a444692](feast-dev@a444692)) * Add lazy initialization and feature service caching ([feast-dev#5924](feast-dev#5924)) ([b37b7d0](feast-dev@b37b7d0)) * Add multiple entity support to dbt integration ([feast-dev#5901](feast-dev#5901)) ([05a4fb5](feast-dev@05a4fb5)), closes [feast-dev#5872](feast-dev#5872) * Add PostgreSQL online store support for Go feature server ([feast-dev#5963](feast-dev#5963)) ([b8c6f3d](feast-dev@b8c6f3d)) * Add publish docker image of Go feature server. ([feast-dev#5923](feast-dev#5923)) ([759d8c6](feast-dev@759d8c6)) * Add Set as feature type ([feast-dev#5888](feast-dev#5888)) ([52458fc](feast-dev@52458fc)) * Added online server worker config support in operator ([feast-dev#5926](feast-dev#5926)) ([193c72a](feast-dev@193c72a)) * Added support for OpenLineage integration ([feast-dev#5884](feast-dev#5884)) ([df70d8d](feast-dev@df70d8d)) * Adjust ray offline store to support abfs(s) ADLS Azure Storage ([feast-dev#5911](feast-dev#5911)) ([d6c0b2d](feast-dev@d6c0b2d)) * Batch_engine config injection in feature_store.yaml through operator ([feast-dev#5938](feast-dev#5938)) ([455d56c](feast-dev@455d56c)) * Consolidate Python packaging - remove setup.py/setup.cfg, standardize on pyproject.toml and uv ([16696b8](feast-dev@16696b8)) * **go:** Add MySQL registry store support for Go feature server ([feast-dev#5933](feast-dev#5933)) ([19f9bb8](feast-dev@19f9bb8)) * Improve local dev experience with file-aware hooks and auto parallelization ([feast-dev#5956](feast-dev#5956)) ([839b79e](feast-dev@839b79e)) * Modernize precommit hooks and optimize test performance ([feast-dev#5929](feast-dev#5929)) ([ea7d4fa](feast-dev@ea7d4fa)) * Optimize container infrastructure for production ([feast-dev#5881](feast-dev#5881)) ([5ebdac8](feast-dev@5ebdac8)) * Optimize DynamoDB online store for improved latency ([feast-dev#5889](feast-dev#5889)) ([fcc8274](feast-dev@fcc8274)) Signed-off-by: soojin <soojin@dable.io>
What this PR does / why we need it
Adds MySQL registry store support to the Go feature server, enabling it to read registry data from MySQL databases. This brings the Go feature server to parity with the Python SDK's SQL registry store.
Changes
New files
go/internal/feast/registry/mysql_registry_store.go- MySQL registry store implementationmysql://user:pass@host:port/db)go/internal/feast/registry/mysql_registry_store_test.go- Unit testsmysql://URLsModified files
go/internal/feast/registry/registry.go- Addedmysqlscheme routing andMySQLRegistryStorefactorygo/internal/feast/registry/repoconfig.go- Added MySQL connection pool configuration optionsgo/internal/feast/registry/repoconfig_test.go- Added tests for new config optionsConfiguration example
Schema compatibility
The Go implementation reads from the same schema as the Python SQLAlchemy registry (
sdk/python/feast/infra/registry/sql.py). When the Python schema evolves, the Go queries must be updated accordingly.Does this PR introduce a user-facing change?
Yes - Go feature server now supports MySQL registry stores.
Release Notes