-
Notifications
You must be signed in to change notification settings - Fork 27
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
⬆️♻️ Updates pydantic repo-wide to the same version and fixes new issues in all services #6882
⬆️♻️ Updates pydantic repo-wide to the same version and fixes new issues in all services #6882
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6882 +/- ##
==========================================
- Coverage 88.16% 86.45% -1.72%
==========================================
Files 1517 1519 +2
Lines 59413 59144 -269
Branches 2095 2125 +30
==========================================
- Hits 52384 51134 -1250
- Misses 6698 7666 +968
- Partials 331 344 +13
Continue to review full report in Codecov by Sentry.
|
cdf445c
to
fade298
Compare
@bisgaard-itis let me know if you find a different explanation. Check with @giancarloromeo . He found the class that was causing troubles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes
packages/models-library/src/models_library/service_settings_labels.py
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
What do these changes do?
This pull request updates the pydantic version across the entire repository (see table below) to ensure consistency and prevent serialization issues. Such issues arise when one service serializes data using a newer pydantic version, and another service with an older version attempts to deserialize it. For example, we encountered the following error:
The latest version of pydantic (
2.10
) introduces stricter annotations, requiring code adjustments to align with these new rules. The most significant change involves handling field annotations withdefault
ordefault_factory
. Below is the proper way to annotate fields with these attributes in the updated pydantic version:_Unset
as default is used to indicatemypy
that this field has a default and at the same time letpydantic
know that it needs rundefault_factory
to get it. This technique is taken and adapted from https://github.com/fastapi/fastapi/blob/master/fastapi/_compat.py#L75-L78.UriSchema
annotation created to preserveopenapi.json
forapi-server
. There are some inconsistencies in the json-schemas generated by fastapi and pydantic that I explore inservices/api-server/tests/test_utils_pydantic.py
and I cannot explain. @bisgaard-itis I would appreciate some feedback here.Related issue/s
Upgrades
api-server⬆️
autoscaling⬆️
aws-library🧪
catalog⬆️
clusters-keeper⬆️
dask-sidecar⬆️
datcore-adapter⬆️
director-v2⬆️
director⬆️
dynamic-scheduler⬆️
dynamic-sidecar⬆️
efs-guardian⬆️
invitations⬆️
payments⬆️
resource-usage-tracker⬆️
service-library🧪
simcore-sdk🧪
storage⬆️
swarm-deploy🧪
web⬆️
autoscaling⬆️🧪
aws-library🧪🧪
catalog⬆️
clusters-keeper⬆️🧪
common-library🧪🧪
dask-sidecar⬆️🧪
dask-task-models-library🧪
datcore-adapter⬆️
director-v2⬆️
director⬆️
efs-guardian⬆️🧪
environment-setup🧪
models-library🧪
notifications-library🧪
osparc-gateway-server⬆️
postgres-database🧪
public-api🧪
resource-usage-tracker⬆️🧪
service-integration🧪
service-library🧪🧪
settings-library🧪
simcore-sdk🧪🧪
storage⬆️🧪
swarm-deploy🧪
web⬆️
autoscaling⬆️🧪
aws-library🧪🧪
catalog⬆️
clusters-keeper⬆️🧪
common-library🧪🧪
dask-sidecar⬆️🧪
dask-task-models-library🧪
datcore-adapter⬆️
director-v2⬆️
director⬆️
e2e-playwright🧪
efs-guardian⬆️🧪
environment-setup🧪
models-library🧪
notifications-library🧪
osparc-gateway-server⬆️
postgres-database🧪
public-api🧪
resource-usage-tracker⬆️🧪
service-integration🧪
service-library🧪🧪
settings-library🧪
simcore-sdk🧪🧪
storage⬆️🧪
swarm-deploy🧪
web⬆️
autoscaling⬆️🧪🔧
catalog⬆️🧪🔧
clusters-keeper⬆️🧪🔧
dask-sidecar⬆️🧪🔧
datcore-adapter⬆️🧪🔧
director-v2⬆️🧪🔧
resource-usage-tracker⬆️🧪🔧
storage⬆️🧪🔧
web⬆️🧪🔧
Legend: