Commit 19f9bb8
authored
feat(go): Add MySQL registry store support for Go feature server (#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>1 parent 06e0ad8 commit 19f9bb8
File tree
7 files changed
+632
-33
lines changed- go/internal/feast/registry
7 files changed
+632
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | | - | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| 115 | + | |
| 116 | + | |
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
| |||
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
138 | | - | |
139 | | - | |
| 142 | + | |
| 143 | + | |
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
| |||
0 commit comments