Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Schema version priority for union dataclass comparison #2959

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mao3267
Copy link
Contributor

@mao3267 mao3267 commented Nov 26, 2024

Tracking issue

flyteorg/flyte#5489

Why are the changes needed?

Since we plan to primarily support newer versions of JSON schemas in the future, we would like to update the JSON schema version priority in the literal metadata field.

What changes were proposed in this pull request?

  1. We are modifying the priority for generating JSON schemas. Initially, the schema from Marshmallow, which follows draft-7, was prioritized. Moving forward, we will prioritize the schema from Mashumaro, which adheres to the newer draft 2020-12 specification.
  2. Update related unit tests to make sure everything works as expected.
  3. Fix missing logic for dict while generating attribute list in generate_attribute_list_from_dataclass_json_mixin function.

How was this patch tested?

  1. Pass existing tests and modified tests

Setup process

git clone https://github.com/flytorg/flytekit.git
gh pr checkout 2952
pip install -e .

Screenshots

image
image

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

#2932
#2859

Docs link

None

Future-Outlier and others added 5 commits November 15, 2024 10:26
Signed-off-by: Future-Outlier <[email protected]>
…er-for-union-dataclass-comparison' into schema-version-priority-for-union-dataclass-comparison
…ema-version-priority-for-union-dataclass-comparison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants