diff --git a/tecton_client/responses.py b/tecton_client/responses.py index db23c1c9..ec539853 100644 --- a/tecton_client/responses.py +++ b/tecton_client/responses.py @@ -102,6 +102,9 @@ class FeatureStatus(str, Enum): """The feature values were not found in the online store either because the join keys do not exist or the feature values are outside ttl.""" + CACHED = "CACHED" + """The feature values were cached in the backend and retrieved from the cache.""" + UNKNOWN = "UNKNOWN" """An unknown status code occurred, most likely because an error occurred during feature retrieval.""" diff --git a/tests/responses_test.py b/tests/responses_test.py index 2e60e162..e6f2fd12 100644 --- a/tests/responses_test.py +++ b/tests/responses_test.py @@ -102,7 +102,7 @@ def test_slo_response(self) -> None: (FloatType, FeatureStatus.MISSING_DATA, "2023-05-03T00:00:00"), (IntType, FeatureStatus.PRESENT, "2023-05-03T00:00:00"), (FloatType, FeatureStatus.PRESENT, "2023-05-03T00:00:00"), - (ArrayType, FeatureStatus.PRESENT, "2023-05-03T00:00:00"), + (ArrayType, FeatureStatus.CACHED, "2023-05-03T00:00:00"), ], ) ], diff --git a/tests/tecton_client_test.py b/tests/tecton_client_test.py index c391b21a..66854ad5 100644 --- a/tests/tecton_client_test.py +++ b/tests/tecton_client_test.py @@ -98,7 +98,7 @@ class TestTectonClient: (FloatType, FeatureStatus.MISSING_DATA, "2023-05-03T00:00:00"), (IntType, FeatureStatus.PRESENT, "2023-05-03T00:00:00"), (FloatType, FeatureStatus.PRESENT, "2023-05-03T00:00:00"), - (ArrayType, FeatureStatus.PRESENT, "2023-05-03T00:00:00"), + (ArrayType, FeatureStatus.CACHED, "2023-05-03T00:00:00"), ] expected_slo_info = { "dynamodb_response_size_bytes": None, diff --git a/tests/test_data/single/sample_response_metadata.json b/tests/test_data/single/sample_response_metadata.json index 083a036b..036d3b9a 100644 --- a/tests/test_data/single/sample_response_metadata.json +++ b/tests/test_data/single/sample_response_metadata.json @@ -55,7 +55,7 @@ "type": "string" } }, - "status": "PRESENT" + "status": "CACHED" } ], "sloInfo": {