From ffc547ded7232d3e355961f9fdfa2be21dc7d8b5 Mon Sep 17 00:00:00 2001 From: Pavel Borobov Date: Tue, 20 Apr 2021 17:59:05 -0700 Subject: [PATCH 1/4] Added ability to define nested keys is s3 registry --- sdk/python/feast/infra/aws_dynamo_provider.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sdk/python/feast/infra/aws_dynamo_provider.py b/sdk/python/feast/infra/aws_dynamo_provider.py index 846514ce4a..923f468b30 100644 --- a/sdk/python/feast/infra/aws_dynamo_provider.py +++ b/sdk/python/feast/infra/aws_dynamo_provider.py @@ -28,10 +28,6 @@ class AwsDynamoProvider(Provider): def __init__(self, config: RepoConfig): assert isinstance(config.online_store, DynamoOnlineStoreConfig) - if config and config.online_store and config.online_store.project_id: - self._aws_project_id = config.online_store.project_id - else: - self._aws_project_id = None def _initialize_dynamodb(self): return boto3.resource('dynamodb') From 81b1199db5bfbc87c63a658705c1ee9c929f8598 Mon Sep 17 00:00:00 2001 From: Pavel Borobov Date: Tue, 20 Apr 2021 17:59:13 -0700 Subject: [PATCH 2/4] Added ability to define nested keys is s3 registry --- sdk/python/feast/registry.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sdk/python/feast/registry.py b/sdk/python/feast/registry.py index d2f4ef967a..9782471588 100644 --- a/sdk/python/feast/registry.py +++ b/sdk/python/feast/registry.py @@ -540,10 +540,13 @@ def _write_registry(self, registry_proto: RegistryProto): registry_proto.version_id = str(uuid.uuid4()) registry_proto.last_updated.FromDatetime(datetime.utcnow()) # we have already checked the bucket exists so no need to do it again - registry_bucket = boto3.resource('s3').Bucket(self._bucket) - registry_db = registry_bucket.Object(self._key) file_obj = TemporaryFile() file_obj.write(registry_proto.SerializeToString()) file_obj.seek(0) - registry_db.upload_fileobj(file_obj) - return + s3 = boto3.client('s3') + s3.put_object( + Bucket=self._bucket, + Body=file_obj, + Key=self._key + ) + return \ No newline at end of file From ff208bf04507ed62bcdd89b803dbe01f1167bf6d Mon Sep 17 00:00:00 2001 From: Pavel Borobov Date: Tue, 20 Apr 2021 17:59:17 -0700 Subject: [PATCH 3/4] Added ability to define nested keys is s3 registry --- sdk/python/feast/repo_config.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/python/feast/repo_config.py b/sdk/python/feast/repo_config.py index 05b5557e45..6f5ac00612 100644 --- a/sdk/python/feast/repo_config.py +++ b/sdk/python/feast/repo_config.py @@ -38,7 +38,6 @@ class DynamoOnlineStoreConfig(FeastBaseModel): """Online store config for DynamoDB store""" type: Literal["dynamo"] = "dynamo" """Online store type selector""" - project_id: Optional[StrictStr] = None OnlineStoreConfig = Union[DatastoreOnlineStoreConfig, SqliteOnlineStoreConfig, DynamoOnlineStoreConfig] From 89326ecd4530898f86aadc7d1f08fc98d3833a15 Mon Sep 17 00:00:00 2001 From: Pavel Borobov Date: Tue, 20 Apr 2021 18:24:24 -0700 Subject: [PATCH 4/4] remove class field --- sdk/python/feast/infra/aws_dynamo_provider.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/python/feast/infra/aws_dynamo_provider.py b/sdk/python/feast/infra/aws_dynamo_provider.py index 923f468b30..7aeea45c2b 100644 --- a/sdk/python/feast/infra/aws_dynamo_provider.py +++ b/sdk/python/feast/infra/aws_dynamo_provider.py @@ -24,7 +24,6 @@ class AwsDynamoProvider(Provider): - _aws_project_id: Optional[str] def __init__(self, config: RepoConfig): assert isinstance(config.online_store, DynamoOnlineStoreConfig)