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

Upgrade agent service (Pydantic v2) #6508

Conversation

giancarloromeo
Copy link
Contributor

@giancarloromeo giancarloromeo commented Oct 9, 2024

What do these changes do?

Upgrades the agent service to Pydantic v2.

Related issue/s

How to test

Dev-ops checklist

@giancarloromeo giancarloromeo self-assigned this Oct 9, 2024
@giancarloromeo giancarloromeo added this to the MartinKippenberger milestone Oct 9, 2024
Copy link

sonarqubecloud bot commented Oct 9, 2024

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##             pydantic_v2_migration   #6508   +/-   ##
=======================================================
  Coverage                         ?   97.8%           
=======================================================
  Files                            ?      13           
  Lines                            ?     324           
  Branches                         ?       0           
=======================================================
  Hits                             ?     317           
  Misses                           ?       7           
  Partials                         ?       0           
Flag Coverage Δ
unittests 97.8% <100.0%> (?)

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

Files with missing lines Coverage Δ
...gent/src/simcore_service_agent/core/application.py 100.0% <100.0%> (ø)
...s/agent/src/simcore_service_agent/core/settings.py 100.0% <100.0%> (ø)

@giancarloromeo giancarloromeo added the t:maintenance Some planned maintenance work label Oct 10, 2024
@@ -187,9 +188,8 @@ def caplog_info_debug(


@pytest.fixture(scope="module")
def mocked_s3_server_url(mocked_aws_server: ThreadedMotoServer) -> HttpUrl:
def mocked_s3_server_url(mocked_aws_server: ThreadedMotoServer) -> HttpUrlLegacy:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This HttpUrlLegacy has been introduced to be compliant with the previous HttpUrl (Pydantic v1). It solves the issue with the trailing slash.

See: https://docs.pydantic.dev/latest/migration/#url-and-dsn-types-in-pydanticnetworks-no-longer-inherit-from-str

@giancarloromeo giancarloromeo changed the title ⬆️ WIP: Upgrade agent service (Pydantic v2) Upgrade agent service (Pydantic v2) Oct 10, 2024
@giancarloromeo giancarloromeo marked this pull request as ready for review October 10, 2024 07:13
@giancarloromeo giancarloromeo requested a review from GitHK as a code owner October 10, 2024 07:13
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! looks good.

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

thx. go, go, go ... :-)

# via pydantic
fastapi==0.96.0
fastapi==0.115.0
Copy link
Member

Choose a reason for hiding this comment

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

OK so we also upgrade fastapi to the latest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup!

@giancarloromeo giancarloromeo merged commit 329b00d into ITISFoundation:pydantic_v2_migration Oct 10, 2024
54 of 58 checks passed
@giancarloromeo giancarloromeo deleted the is4481/upgrade-agent branch October 10, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants