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

Remove Pydantic V1 plugin #3040

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Remove Pydantic V1 plugin #3040

merged 1 commit into from
Jan 14, 2025

Conversation

Future-Outlier
Copy link
Member

@Future-Outlier Future-Outlier commented Jan 7, 2025

Tracking issue

flyteorg/flyte#5033

Why are the changes needed?

We discourage everyone not to use pydantic v1 plugin.

slack discussion screenshot:
image

What changes were proposed in this pull request?

Delete pydantic v1 plugin.

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

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

Related PRs

Docs link

Summary by Bito

This PR removes the deprecated Pydantic V1 plugin from the Flyte codebase, including all serialization, deserialization, and type transformation logic. The change aims to encourage direct usage of Pydantic V2 with Flytekit tasks. All plugin files, test files, and package configurations have been removed.

Unit tests added: False

Estimated effort to review (1-5, lower is better): 3

Signed-off-by: Future-Outlier <[email protected]>
@flyte-bot
Copy link
Contributor

flyte-bot commented Jan 7, 2025

Code Review Agent Run #7d0c67

Actionable Suggestions - 0
Review Details
  • Files reviewed - 9 · Commit Range: ea0eb4c..ea0eb4c
    • plugins/flytekit-pydantic/flytekitplugins/pydantic/__init__.py
    • plugins/flytekit-pydantic/flytekitplugins/pydantic/basemodel_transformer.py
    • plugins/flytekit-pydantic/flytekitplugins/pydantic/commons.py
    • plugins/flytekit-pydantic/flytekitplugins/pydantic/deserialization.py
    • plugins/flytekit-pydantic/flytekitplugins/pydantic/serialization.py
    • plugins/flytekit-pydantic/setup.py
    • plugins/flytekit-pydantic/tests/folder/test_file1.txt
    • plugins/flytekit-pydantic/tests/folder/test_file2.txt
    • plugins/flytekit-pydantic/tests/test_type_transformer.py
  • Files skipped - 1
    • plugins/flytekit-pydantic/README.md - Reason: Filter setting
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

AI Code Review powered by Bito Logo

@flyte-bot
Copy link
Contributor

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Feature Improvement - Remove Deprecated Pydantic V1 Plugin

__init__.py - Remove initialization and deprecation warning for Pydantic V1 plugin

basemodel_transformer.py - Remove BaseModel transformer implementation for Pydantic V1

commons.py - Remove common utilities for Pydantic V1 plugin

deserialization.py - Remove deserialization logic for Pydantic V1 models

serialization.py - Remove serialization logic for Pydantic V1 models

setup.py - Remove plugin package configuration and dependencies

Testing - Remove Pydantic V1 Tests

test_file1.txt - Remove test file used in Pydantic V1 tests

test_file2.txt - Remove test file used in Pydantic V1 tests

test_type_transformer.py - Remove test suite for Pydantic V1 type transformers

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.85%. Comparing base (87ac7f7) to head (ea0eb4c).
Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3040      +/-   ##
==========================================
- Coverage   78.61%   76.85%   -1.77%     
==========================================
  Files         288      202      -86     
  Lines       25120    21357    -3763     
  Branches     2734     2744      +10     
==========================================
- Hits        19749    16414    -3335     
+ Misses       4615     4184     -431     
- Partials      756      759       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Future-Outlier Future-Outlier enabled auto-merge (squash) January 14, 2025 01:16
Copy link
Member

@pingsutw pingsutw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @ArthurBook We have Pydantic plugin v2 that supports all the types right now. Mind giving it a try?

@Future-Outlier Future-Outlier merged commit a2bcf95 into master Jan 14, 2025
106 of 107 checks passed
@ArthurBook
Copy link
Contributor

hi @pingsutw ! we unfortunately deprecated the component where we were using flyte so I don't have any workloads at hand to try it with... :(

shuyingliang pushed a commit to shuyingliang/flytekit that referenced this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants