Skip to content

Commit

Permalink
Ignore some StateCreate fields for 2dot0
Browse files Browse the repository at this point in the history
  • Loading branch information
cicdw committed Nov 8, 2024
1 parent 7ee6b89 commit af25a1c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test_oss_cloud_api_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit af25a1c

Please sign in to comment.