Skip to content

Commit

Permalink
feat: Added support for HTTP Registry (#7)
Browse files Browse the repository at this point in the history
* feat: Added support for HTTP Registry

* Enabled using cache object in http registry

* disabled pip cache to fix - cannot import name DEV_PKGS issue

* Updated pip-tools to latest version

---------

Co-authored-by: Bhargav Dodla <[email protected]>

Squashing and merging this PR to release this version of eg-feast as Bhargav is unavailable for a portion of this afternoon. We synced offline and decided I would do the merge and release.
  • Loading branch information
EXPEbdodla authored Jul 24, 2023
1 parent 1273a12 commit cea60a7
Show file tree
Hide file tree
Showing 11 changed files with 733 additions and 16 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10" ]
os: [ ubuntu-latest, macOS-latest ]
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest, macOS-latest]
exclude:
- os: macOS-latest
python-version: "3.9"
Expand All @@ -26,13 +26,13 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install mysql on macOS
if: startsWith(matrix.os, 'macOS')
if: startsWith(matrix.os, 'macOS')
run: |
brew install mysql
PATH=$PATH:/usr/local/mysql/bin
- name: Work around Homebrew MySQL being broken
# See https://github.com/Homebrew/homebrew-core/issues/130258 for more details.
if: startsWith(matrix.os, 'macOS')
if: startsWith(matrix.os, 'macOS')
run: |
brew install zlib
ln -sv $(brew --prefix zlib)/lib/libz.dylib $(brew --prefix)/lib/libzlib.dylib
Expand All @@ -54,13 +54,13 @@ jobs:
restore-keys: |
${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-pip-
- name: Install pip-tools
run: pip install pip-tools
run: |
pip install -U pip-tools
- name: Install dependencies
run: make install-python-ci-dependencies
- name: Test Python
run: pytest -n 8 --cov=./ --cov-report=xml --color=yes sdk/python/tests


unit-test-ui:
runs-on: ubuntu-latest
env:
Expand All @@ -69,8 +69,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '17.x'
registry-url: 'https://registry.npmjs.org'
node-version: "17.x"
registry-url: "https://registry.npmjs.org"
- name: Install yarn dependencies
working-directory: ./ui
run: yarn install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pydantic import BaseModel
from typing_extensions import Self

from feast import Field
from feast.field import Field
from feast.types import Array, PrimitiveFeastType


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ProjectMetadataModel(BaseModel):

project_name: str
project_uuid: str = ""
last_updated_timestamp: datetime = datetime.min
last_updated_timestamp: datetime = datetime.utcfromtimestamp(1)

def to_project_metadata(self) -> ProjectMetadata:
"""
Expand Down
3 changes: 3 additions & 0 deletions sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
from feast.infra.infra_object import Infra
from feast.infra.provider import Provider, RetrievalJob, get_provider
from feast.infra.registry.base_registry import BaseRegistry
from feast.infra.registry.http import HttpRegistry
from feast.infra.registry.registry import Registry
from feast.infra.registry.sql import SqlRegistry
from feast.on_demand_feature_view import OnDemandFeatureView
Expand Down Expand Up @@ -158,6 +159,8 @@ def __init__(
registry_config = self.config.registry
if registry_config.registry_type == "sql":
self._registry = SqlRegistry(registry_config, self.config.project, None)
if registry_config.registry_type == "http":
self._registry = HttpRegistry(registry_config, self.config.project, None)
elif registry_config.registry_type == "snowflake.registry":
from feast.infra.registry.snowflake import SnowflakeRegistry

Expand Down
Loading

0 comments on commit cea60a7

Please sign in to comment.