Skip to content

Conversation

@sanderegg
Copy link
Member

@sanderegg sanderegg commented Oct 15, 2024

What do these changes do?

Changes:

  • AUTOSCALING_POLL_INTERVAL (and any timedelta types) must be defined as ISO8601 strings or integers/floats (e.g. "00:00:10" instead of "10" (this is not accepted anymore!!) ⚠️ DEvops
  • Re-generated the packages/models-library/src/models_library/generated_models/docker_rest_api.py using pydanticV2, this will generate some issues in other places, will be fixed later (e.g. all fields are now snake cased)

Related issue/s

How to test

make devenv
source .venv/bin/activate
cd services/autoscaling
make install-dev
make mypy
make test-dev-unit

Dev-ops checklist

@sanderegg sanderegg added the a:autoscaling autoscaling service in simcore's stack label Oct 15, 2024
@sanderegg sanderegg added this to the MartinKippenberger milestone Oct 15, 2024
@sanderegg sanderegg self-assigned this Oct 15, 2024
@giancarloromeo giancarloromeo self-requested a review October 15, 2024 08:05
@codecov
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (pydantic_v2_migration@5528772). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##             pydantic_v2_migration   #6535   +/-   ##
=======================================================
  Coverage                         ?   73.1%           
=======================================================
  Files                            ?     159           
  Lines                            ?    8380           
  Branches                         ?     553           
=======================================================
  Hits                             ?    6126           
  Misses                           ?    2175           
  Partials                         ?      79           
Flag Coverage Δ
unittests 73.1% <100.0%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ackages/aws-library/src/aws_library/ec2/_models.py 89.0% <ø> (ø)
...toscaling/src/simcore_service_autoscaling/_meta.py 100.0% <100.0%> (ø)
...aling/src/simcore_service_autoscaling/constants.py 100.0% <100.0%> (ø)
...rc/simcore_service_autoscaling/core/application.py 100.0% <100.0%> (ø)
...ing/src/simcore_service_autoscaling/core/errors.py 100.0% <100.0%> (ø)
...g/src/simcore_service_autoscaling/core/settings.py 100.0% <100.0%> (ø)
...e_service_autoscaling/modules/auto_scaling_core.py 89.3% <100.0%> (ø)
...scaling/modules/auto_scaling_mode_computational.py 87.3% <100.0%> (ø)
...ng/src/simcore_service_autoscaling/modules/dask.py 89.3% <100.0%> (ø)
...ore_service_autoscaling/utils/auto_scaling_core.py 93.6% <100.0%> (ø)
... and 4 more

@sanderegg sanderegg marked this pull request as ready for review October 15, 2024 14:13
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.

Thanks a lot.

Just a note: for performance, be sure to not instantiate TypeAdapters in loops/functions continuously called. In that case it's better to put their creation somewhere outside.

See: https://docs.pydantic.dev/latest/concepts/performance/#typeadapter-instantiated-once

@YuryHrytsuk
Copy link
Contributor

Is there a related PR in osparc-config updating AUTOSCALING_POLL_INTERVAL?

@sanderegg
Copy link
Member Author

Is there a related PR in osparc-config updating AUTOSCALING_POLL_INTERVAL?

@YuryHrytsuk this is coming...

@sonarqubecloud
Copy link

@sanderegg sanderegg merged commit c9a48cc into ITISFoundation:pydantic_v2_migration Oct 15, 2024
36 of 58 checks passed
@sanderegg sanderegg deleted the is4481/upgrade-autoscaling branch October 15, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:autoscaling autoscaling service in simcore's stack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants