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

api: upgrade python packages #554

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

JenySadadia
Copy link
Collaborator

@JenySadadia JenySadadia commented Oct 15, 2024

Depends on kernelci/kernelci-core#2710

Enable support for pydantic v2 along with the latest fastapi-pagination package.
To enable the upgrade fastapi and fastapi-users packages are also required to be upgraded.

@JenySadadia JenySadadia force-pushed the upgrade-python-packages branch 2 times, most recently from 2172173 to 542a969 Compare October 15, 2024 09:16
@JenySadadia JenySadadia added the staging-skip Don't test automatically on staging.kernelci.org label Oct 15, 2024
@JenySadadia JenySadadia force-pushed the upgrade-python-packages branch 3 times, most recently from f1f15b3 to 211eda5 Compare October 16, 2024 11:33
@JenySadadia
Copy link
Collaborator Author

Receiving pydantic warning on kci user group join command:

kernelci-api          | INFO:     172.21.0.1:46482 - "GET /latest/users?username=test_user&limit=100&offset=0 HTTP/1.1" 200 OK
kernelci-api          | /home/kernelci/.local/lib/python3.11/site-packages/pydantic/main.py:390: UserWarning: Pydantic serializer warnings:
kernelci-api          |   Expected `str` but got `UserGroup` with value `UserGroup(id=ObjectId('64...16ad'), name='kernelci')` - serialized value may not be as expected
kernelci-api          |   Expected `str` but got `UserGroup` with value `UserGroup(id=ObjectId('67...a017faa3'), name='test')` - serialized value may not be as expected
kernelci-api          |   return self.__pydantic_serializer__.to_python(
kernelci-api          | User 670e4486de0eba06b43e645f test_user has been updated.
kernelci-api          | INFO:     172.21.0.1:46492 - "PATCH /latest/user/670e4486de0eba06b43e645f HTTP/1.1" 200 OK

@JenySadadia JenySadadia removed the staging-skip Don't test automatically on staging.kernelci.org label Oct 17, 2024
@JenySadadia JenySadadia force-pushed the upgrade-python-packages branch from 211eda5 to a2a7fdc Compare October 17, 2024 07:09
@JenySadadia
Copy link
Collaborator Author

Looks like /doc endpoint broke with the upgrade.
Receiving Failed to load API definition for https://staging.kernelci.org:9000/docs.

@nuclearcat nuclearcat added the staging-skip Don't test automatically on staging.kernelci.org label Oct 18, 2024
@JenySadadia JenySadadia force-pushed the upgrade-python-packages branch 5 times, most recently from a3c1b2a to b7453e4 Compare October 22, 2024 06:38
@JenySadadia JenySadadia removed the staging-skip Don't test automatically on staging.kernelci.org label Oct 22, 2024
@JenySadadia JenySadadia force-pushed the upgrade-python-packages branch 2 times, most recently from c08a6a2 to bb8d0b4 Compare October 22, 2024 11:02
@JenySadadia JenySadadia marked this pull request as ready for review October 22, 2024 11:05
@pawiecz
Copy link
Contributor

pawiecz commented Oct 23, 2024

Regression tracker on staging seems to be working as expected with no hiccups:

$ docker logs kernelci-pipeline-regression_tracker
10/23/2024 08:39:14 AM UTC [INFO] Tracking regressions... 
10/23/2024 08:39:14 AM UTC [INFO] Press Ctrl-C to stop.
10/23/2024 10:49:01 AM UTC [INFO] Detected regression for node id: 6718c120e004de9d9a419d5c
10/23/2024 10:49:02 AM UTC [INFO] Regression submitted: 6718d49ee004de9d9a41b404
10/23/2024 10:49:15 AM UTC [INFO] Detected regression for node id: 6718c120e004de9d9a419d5d
10/23/2024 10:49:16 AM UTC [INFO] Regression submitted: 6718d4ace004de9d9a41b405
10/23/2024 10:51:20 AM UTC [INFO] Detected regression for node id: 6718c20fe004de9d9a41a3f9
10/23/2024 10:51:21 AM UTC [INFO] Regression submitted: 6718d529e004de9d9a41b406
10/23/2024 10:51:33 AM UTC [INFO] Detected regression for node id: 6718c20fe004de9d9a41a3fa
10/23/2024 10:51:34 AM UTC [INFO] Regression submitted: 6718d536e004de9d9a41b407
10/23/2024 11:15:55 AM UTC [INFO] Detected regression for node id: 6718c0d8e004de9d9a4199bd
10/23/2024 11:15:55 AM UTC [INFO] Regression submitted: 6718daebe004de9d9a41b408
10/23/2024 11:16:09 AM UTC [INFO] Detected regression for node id: 6718c0d8e004de9d9a4199be
10/23/2024 11:16:10 AM UTC [INFO] Regression submitted: 6718dafae004de9d9a41b409

Jeny Sadadia added 2 commits October 24, 2024 13:37
Enable support for `pydantic v2` along
with the latest `fastapi-pagination` package.
To enable the upgrade `fastapi` and `fastapi-users`
packages are also required to be upgraded.
Use `lifespan` functions for startup events as `on_event`
is deprecated in the latest `fastapi` version.

Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
Fix root and token endpoint unit tests.
Fix node creation test.

Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
@JenySadadia JenySadadia force-pushed the upgrade-python-packages branch from b4a5c2d to 7a69b48 Compare October 24, 2024 08:07
@nuclearcat nuclearcat added this pull request to the merge queue Oct 24, 2024
Merged via the queue into kernelci:main with commit d1b28bd Oct 24, 2024
6 checks passed
@JenySadadia JenySadadia deleted the upgrade-python-packages branch October 24, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants