Skip to content

Commit b3fe39c

Browse files
authored
feat: SQLAlchemy Registry Support (#2734)
* feat: WIP SQLAlchemy Registry Support Signed-off-by: Achal Shah <[email protected]> * hack hack hack Signed-off-by: Achal Shah <[email protected]> * fix repo config Signed-off-by: Achal Shah <[email protected]> * reduce duplication Signed-off-by: Achal Shah <[email protected]> * simplify Signed-off-by: Achal Shah <[email protected]> * postgres tests Signed-off-by: Achal Shah <[email protected]> * tests for pg and mysql Signed-off-by: Achal Shah <[email protected]> * fix requirements Signed-off-by: Achal Shah <[email protected]> * pin protobuf again Signed-off-by: Achal Shah <[email protected]> * fix macos test Signed-off-by: Achal Shah <[email protected]> * fix macos test Signed-off-by: Achal Shah <[email protected]> * fix quotes Signed-off-by: Achal Shah <[email protected]> * add macos Signed-off-by: Achal Shah <[email protected]> * remove macos Signed-off-by: Achal Shah <[email protected]> * install mysql library but don't try to run tests Signed-off-by: Achal Shah <[email protected]> * Fix CR comments Signed-off-by: Achal Shah <[email protected]> * add a comment Signed-off-by: Achal Shah <[email protected]>
1 parent d024e5e commit b3fe39c

File tree

14 files changed

+1088
-47
lines changed

14 files changed

+1088
-47
lines changed

.github/workflows/unit_tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
fail-fast: false
99
matrix:
1010
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
11-
os: [ ubuntu-latest, macOS-latest]
11+
os: [ ubuntu-latest, macOS-latest ]
1212
exclude:
1313
- os: macOS-latest
1414
python-version: "3.8"
@@ -32,9 +32,14 @@ jobs:
3232
uses: actions/setup-go@v2
3333
with:
3434
go-version: 1.17.7
35+
- name: Install mysql on macOS
36+
if: startsWith(matrix.os, 'macOS')
37+
run: |
38+
brew install mysql
39+
PATH=$PATH:/usr/local/mysql/bin
3540
- name: Upgrade pip version
3641
run: |
37-
pip install --upgrade "pip>=21.3.1,<22.1"
42+
pip install --upgrade "pip>=22.1,<23"
3843
- name: Get pip cache dir
3944
id: pip-cache
4045
run: |
@@ -83,7 +88,7 @@ jobs:
8388
python-version: "3.7"
8489
- name: Upgrade pip version
8590
run: |
86-
pip install --upgrade "pip>=21.3.1,<22.1"
91+
pip install --upgrade "pip>=22.1,<23"
8792
- name: Setup Go
8893
id: setup-go
8994
uses: actions/setup-go@v2

sdk/python/feast/feature_store.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
)
7272
from feast.infra.infra_object import Infra
7373
from feast.infra.provider import Provider, RetrievalJob, get_provider
74+
from feast.infra.registry_stores.sql import SqlRegistry
7475
from feast.on_demand_feature_view import OnDemandFeatureView
7576
from feast.online_response import OnlineResponse
7677
from feast.protos.feast.core.InfraObject_pb2 import Infra as InfraProto
@@ -138,8 +139,11 @@ def __init__(
138139
raise ValueError("Please specify one of repo_path or config.")
139140

140141
registry_config = self.config.get_registry_config()
141-
self._registry = Registry(registry_config, repo_path=self.repo_path)
142-
self._registry._initialize_registry()
142+
if registry_config.registry_type == "sql":
143+
self._registry = SqlRegistry(registry_config, None)
144+
else:
145+
self._registry = Registry(registry_config, repo_path=self.repo_path)
146+
self._registry._initialize_registry()
143147
self._provider = get_provider(self.config, self.repo_path)
144148
self._go_server = None
145149

0 commit comments

Comments
 (0)