Skip to content

Commit

Permalink
fix: disabled data deletion when feature view is deleted (#13)
Browse files Browse the repository at this point in the history
* disabled data deletion when feature view is deleted

---------

Co-authored-by: Bhargav Dodla <[email protected]>
  • Loading branch information
EXPEbdodla and Bhargav Dodla authored Aug 3, 2023
1 parent 84a8ea3 commit b541fa7
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
4 changes: 4 additions & 0 deletions sdk/python/feast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
from feast.infra.offline_stores.contrib.athena_offline_store.athena_source import (
AthenaSource,
)
from feast.infra.offline_stores.contrib.spark_offline_store.spark_source import (
SparkSource,
)
from feast.infra.offline_stores.file_source import FileSource
from feast.infra.offline_stores.redshift_source import RedshiftSource
from feast.infra.offline_stores.snowflake_source import SnowflakeSource
Expand Down Expand Up @@ -54,4 +57,5 @@
"PushSource",
"RequestSource",
"AthenaSource",
"SparkSource",
]
2 changes: 1 addition & 1 deletion sdk/python/feast/feature_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from feast.usage import log_exceptions
from feast.value_type import ValueType

warnings.simplefilter("once", DeprecationWarning)
warnings.simplefilter("ignore", DeprecationWarning)

# DUMMY_ENTITY is a placeholder entity used in entityless FeatureViews
DUMMY_ENTITY_ID = "__dummy_id"
Expand Down
21 changes: 12 additions & 9 deletions sdk/python/feast/infra/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,19 @@ def update_infra(
entities_to_keep: Sequence[Entity],
partial: bool,
):
# TODO: Temporarily disabling the capability of Deleting data
# from online stores when a Feature View is deleted.

# Call update only if there is an online store
if self.online_store:
self.online_store.update(
config=self.repo_config,
tables_to_delete=tables_to_delete,
tables_to_keep=tables_to_keep,
entities_to_keep=entities_to_keep,
entities_to_delete=entities_to_delete,
partial=partial,
)
# if self.online_store:
# self.online_store.update(
# config=self.repo_config,
# tables_to_delete=tables_to_delete,
# tables_to_keep=tables_to_keep,
# entities_to_keep=entities_to_keep,
# entities_to_delete=entities_to_delete,
# partial=partial,
# )

if self.repo_config.feature_server and self.repo_config.feature_server.enabled:
warnings.warn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
from feast.type_map import spark_schema_to_np_dtypes
from feast.usage import log_exceptions_and_usage

# Make sure spark warning doesn't raise more than once.
warnings.simplefilter("once", RuntimeWarning)
# Make sure spark warning are ignored
warnings.simplefilter("ignore", RuntimeWarning)


class SparkOfflineStoreConfig(FeastConfigBaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

logger = logging.getLogger(__name__)

# Make sure spark warning are ignored
warnings.simplefilter("ignore", RuntimeWarning)


class SparkSourceFormat(Enum):
csv = "csv"
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/tests/unit/test_sql_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def mysql_registry():

container.start()

# The log string uses '8.0.*' since the version might be changed as new Docker images are pushed.
log_string_to_wait_for = "/usr/sbin/mysqld: ready for connections. Version: '8.0.*' socket: '/var/run/mysqld/mysqld.sock' port: 3306"
# The log string uses '8.1.*' since the version might be changed as new Docker images are pushed.
log_string_to_wait_for = "/usr/sbin/mysqld: ready for connections. Version: '8.1.*' socket: '/var/run/mysqld/mysqld.sock' port: 3306"
waited = wait_for_logs(
container=container,
predicate=log_string_to_wait_for,
Expand Down

0 comments on commit b541fa7

Please sign in to comment.