From af25a1c250e64a994642ed8927a51ec0ab27ba1c Mon Sep 17 00:00:00 2001 From: Chris White Date: Fri, 8 Nov 2024 07:18:11 -0800 Subject: [PATCH] Ignore some StateCreate fields for 2dot0 --- test_oss_cloud_api_compatibility.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test_oss_cloud_api_compatibility.py b/test_oss_cloud_api_compatibility.py index 7ba2e10..9d7fa4b 100644 --- a/test_oss_cloud_api_compatibility.py +++ b/test_oss_cloud_api_compatibility.py @@ -312,6 +312,11 @@ def extract_format(d): # failures when looping over fields print("parameter name:", oss_name) + if oss_name == "history_interval_seconds": + oss_name = "history_interval" # cloud aliases this which doesn't appear in the schema + elif oss_name == "schema" and PREFECT_V2: + oss_name = "json_schema" # UI schema validation doesnt really matter for 2.x OSS compat + assert oss_name in cloud_props[1] ( cloud_name, @@ -410,6 +415,14 @@ def preprocess_pydantic_v1_type(schema): # test failures when looping over fields print("field name:", field_name) + # fields are ignored in all cases + if ( + PREFECT_V2 + and name == "StateCreate" + and field_name in ["timestamp", "id"] + ): + continue + assert field_name in cloud_props oss_options = set()