Skip to content

🐛 Clean Pydantic model_dumps warnings #7358

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

Conversation

giancarloromeo
Copy link
Contributor

@giancarloromeo giancarloromeo commented Mar 13, 2025

What do these changes do?

Clean warnings on director-v2 integration tests, also seen on production.

/home/runner/work/osparc-simcore/osparc-simcore/.venv/lib/python3.11/site-packages/pydantic/main.py:426: UserWarning: Pydantic serializer warnings:
    Expected `uuid` but got `str` with value `'e1e2ea96-ce8f-5abc-8712-b8ed312a782c'` - serialized value may not be as expected
    return self.__pydantic_serializer__.to_python(

Cause

The StandardSimcoreDockerLabels object is created using .model_construct and the node_id was a str instead of UUID.

Related issue/s

How to test

cd services/director-v2
pytest -vv --pdb -W error::UserWarning tests/integration/

Dev-ops checklist

@giancarloromeo giancarloromeo added the a:director-v2 issue related with the director-v2 service label Mar 13, 2025
@giancarloromeo giancarloromeo self-assigned this Mar 13, 2025
@giancarloromeo giancarloromeo added this to the The Awakening milestone Mar 13, 2025
Copy link

codecov bot commented Mar 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.80%. Comparing base (7dd5842) to head (93260a3).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7358      +/-   ##
==========================================
+ Coverage   87.41%   88.80%   +1.39%     
==========================================
  Files        1729     1386     -343     
  Lines       66864    57085    -9779     
  Branches     1133      481     -652     
==========================================
- Hits        58449    50696    -7753     
+ Misses       8094     6257    -1837     
+ Partials      321      132     -189     
Flag Coverage Δ
integrationtests 65.20% <100.00%> (+0.02%) ⬆️
unittests 87.86% <80.00%> (+1.26%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 92.05% <100.00%> (ø)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration 70.03% <ø> (ø)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.46% <ø> (ø)
agent 96.46% <ø> (ø)
api_server 90.73% <ø> (ø)
autoscaling 96.08% <ø> (ø)
catalog 91.82% <ø> (ø)
clusters_keeper 99.24% <ø> (ø)
dask_sidecar 91.25% <ø> (ø)
datcore_adapter 98.11% <ø> (ø)
director 76.78% <ø> (ø)
director_v2 91.30% <100.00%> (ø)
dynamic_scheduler 97.35% <ø> (ø)
dynamic_sidecar 90.11% <ø> (ø)
efs_guardian 89.79% <ø> (ø)
invitations 93.28% <ø> (ø)
payments 92.66% <ø> (ø)
resource_usage_tracker 89.12% <ø> (ø)
storage 86.87% <ø> (-0.23%) ⬇️
webclient ∅ <ø> (∅)
webserver 85.93% <ø> (+0.07%) ⬆️

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 7dd5842...93260a3. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@giancarloromeo giancarloromeo marked this pull request as ready for review March 13, 2025 16:09
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

maybe the description of the PR is incomplete

@giancarloromeo giancarloromeo added the 🤖-automerge marks PR as ready to be merged for Mergify label Mar 14, 2025
@giancarloromeo giancarloromeo enabled auto-merge (squash) March 17, 2025 11:49
@giancarloromeo giancarloromeo disabled auto-merge March 18, 2025 14:39
@giancarloromeo giancarloromeo removed the 🤖-automerge marks PR as ready to be merged for Mergify label Mar 18, 2025
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

is this ready for review or not?

@giancarloromeo giancarloromeo enabled auto-merge (squash) March 25, 2025 13:18
@giancarloromeo giancarloromeo added the 🤖-automerge marks PR as ready to be merged for Mergify label Mar 25, 2025
Copy link

sonarqubecloud bot commented Apr 2, 2025

@giancarloromeo giancarloromeo merged commit bcc60b5 into ITISFoundation:master Apr 2, 2025
93 of 94 checks passed
@giancarloromeo giancarloromeo deleted the clean-pydantic-model-dump-warnings branch May 13, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖-automerge marks PR as ready to be merged for Mergify a:director-v2 issue related with the director-v2 service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants