fix: Update Feast object metadata in the registry by msistla96 · Pull Request #4257 · feast-dev/feast
@tokoko, while adding the tests you mentioned, I noticed two bugs with Remote Registry:
- During
apply_materialization, when Remote Registry converts the start and end dates to Timestamp before making the request to Registry Server here, Timestamp doesn't preserve the timezone information. So when RegistryServer converts them back to dates before calling the proxyapply_materializationhere, the resultant date is timezone naive, i.e: it assumes the date relative to the local timezone rather than UTC timezone because of the mentioned reason. I made a change to RegistryServer in this PR to fix this as the integration tests were failing for Remote Registry.
(FYI, this issue wrt Timestamp was raised long ago but Timestamp is not meant to store timezone info in the first place from what I understood)
To reproduce Timestamp's behavior:
from google.protobuf.timestamp_pb2 import Timestamp
from datetime import datetime
from pytz import utc
current_date = datetime.utcnow().replace(tzinfo=utc)
print("Current date: ",current_date, ", timezone: ",current_date.tzinfo)
sample_timestamp = Timestamp()
sample_timestamp.FromDatetime(current_date)
converted_date = datetime.fromtimestamp(
sample_timestamp.seconds + sample_timestamp.nanos / 1e9)
print("Converted date: ", converted_date, ", timezone: ",converted_date.tzinfo)
apply_materializationfails for Stream Feature Views. ApplyMaterializationRequest for RegistryServer doesn't have Stream Feature View as a property even though ApplyFeatureViewRequest does. Fixing this is out of scope for this PR, so for now I've omitted test cases for materializing stream feature views to prevent the integration tests from failing. I added a TODO in the file, but let me know if you want me to raise this as a bug as well.