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

🐛 Fixes OrderBy serialization error in pydanticv2 #6828

Merged
merged 7 commits into from
Nov 26, 2024

Conversation

pcrespov
Copy link
Member

What do these changes do?

Fixes AttributeError: Can't pickle local object 'create_ordering_query_model_classes.<locals>._OrderBy'
introduce by the update to pydantic 2 of OrderBy-like factory model.

Related issue/s

How to test

cd packages/models-library
make install-dev
pytest -vv tests/test_rest_ordering.py

Dev-ops

None

@pcrespov pcrespov self-assigned this Nov 25, 2024
@pcrespov pcrespov added a:webserver issue related to the webserver service a:models-library labels Nov 25, 2024
@pcrespov pcrespov changed the title 🐛 Fixes OrderBy serialization error in pydantic-2 🐛 Fixes OrderBy serialization error in pydanticv2 Nov 25, 2024
@pcrespov pcrespov added this to the Event Horizon milestone Nov 25, 2024
@pcrespov pcrespov enabled auto-merge (squash) November 25, 2024 17:36
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.34%. Comparing base (1f18a84) to head (b534b66).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6828      +/-   ##
==========================================
- Coverage   88.40%   88.34%   -0.06%     
==========================================
  Files        1550     1383     -167     
  Lines       61750    57970    -3780     
  Branches     2164     1661     -503     
==========================================
- Hits        54589    51215    -3374     
+ Misses       6832     6492     -340     
+ Partials      329      263      -66     
Flag Coverage Δ
integrationtests 64.77% <100.00%> (-3.37%) ⬇️
unittests 86.24% <100.00%> (-0.77%) ⬇️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 91.16% <100.00%> (ø)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration 70.00% <ø> (ø)
pkg_service_library 76.10% <ø> (ø)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.36% <ø> (ø)
agent 97.00% <ø> (ø)
api_server 89.72% <ø> (ø)
autoscaling 95.21% <ø> (ø)
catalog 90.57% <ø> (ø)
clusters_keeper 98.73% <ø> (ø)
dask_sidecar 91.26% <ø> (ø)
datcore_adapter 93.17% <ø> (ø)
director 76.40% <ø> (-0.18%) ⬇️
director_v2 91.04% <ø> (-0.10%) ⬇️
dynamic_scheduler 96.59% <ø> (ø)
dynamic_sidecar 89.75% <ø> (ø)
efs_guardian 90.12% <ø> (ø)
invitations 93.44% <ø> (ø)
osparc_gateway_server 85.49% <ø> (ø)
payments 92.76% <ø> (ø)
resource_usage_tracker 90.79% <ø> (ø)
storage 89.66% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 88.68% <100.00%> (-0.01%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f18a84...b534b66. Read the comment docs.

Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

Thanks! (its getting pretty long :D )

Copy link
Contributor

@giancarloromeo giancarloromeo left a comment

Choose a reason for hiding this comment

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

👌

Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix!

@pcrespov pcrespov merged commit afd66d4 into ITISFoundation:master Nov 26, 2024
87 of 90 checks passed
@pcrespov pcrespov deleted the fix/pydantic-2-order-by branch December 6, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:models-library a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants