kytos-ng / kytos

Kytos SDN Platform. Kytos is designed to be easy to install, use, develop and share Network Apps (NApps).
https://kytos-ng.github.io/
MIT License
2 stars 7 forks source link

chore: Upgraded python and dependencies #460

Closed Alopalao closed 3 months ago

Alopalao commented 4 months ago

Closes #456 Closes #448 Closes #420 Closes #350 Closes #313

Summary

Updated python3.11 Created this PR to see remote tests results. This PR only works with 3.11 because ipython==8.22.1 requirements Updated python dependencies. Major ones would be openapi-core, tox, pydantic, pytest, pymongo, ipython, tenacity and more Listing here the related PRs:

Local Tests

Created venv with python 3.11.2 Run tox, kytosd

End-to-End Tests

PR

============================= test session starts ==============================
platform linux -- Python 3.11.2, pytest-7.2.1, pluggy-1.4.0
rootdir: /tests
plugins: rerunfailures-13.0, timeout-2.2.0, anyio-4.3.0
collected 261 items

tests/test_e2e_01_kytos_startup.py ..                                    [  0%]
tests/test_e2e_05_topology.py ....................                       [  8%]
tests/test_e2e_10_mef_eline.py ..........ss.....x.....x................  [ 23%]
tests/test_e2e_11_mef_eline.py ......                                    [ 26%]
tests/test_e2e_12_mef_eline.py .....Xx.                                  [ 29%]
tests/test_e2e_13_mef_eline.py ....Xs.s.....Xs.s.XXxX.xxxx..X........... [ 44%]
.                                                                        [ 45%]
tests/test_e2e_14_mef_eline.py x                                         [ 45%]
tests/test_e2e_15_mef_eline.py .....                                     [ 47%]
tests/test_e2e_16_mef_eline.py .                                         [ 47%]
tests/test_e2e_20_flow_manager.py .....................                  [ 55%]
tests/test_e2e_21_flow_manager.py ...                                    [ 57%]
tests/test_e2e_22_flow_manager.py ...............                        [ 62%]
tests/test_e2e_23_flow_manager.py ..............                         [ 68%]
tests/test_e2e_30_of_lldp.py ....                                        [ 69%]
tests/test_e2e_31_of_lldp.py ...                                         [ 70%]
tests/test_e2e_32_of_lldp.py ...                                         [ 72%]
tests/test_e2e_40_sdntrace.py ..............                             [ 77%]
tests/test_e2e_41_kytos_auth.py ........                                 [ 80%]
tests/test_e2e_42_sdntrace.py ..                                         [ 81%]
tests/test_e2e_50_maintenance.py ............................            [ 91%]
tests/test_e2e_60_of_multi_table.py .....                                [ 93%]
tests/test_e2e_70_kytos_stats.py ........                                [ 96%]
tests/test_e2e_80_pathfinder.py ss......                                 [100%]
Alopalao commented 4 months ago

Scrutinizer tests were passing with these changes. Changing this PR to draft.

Alopalao commented 4 months ago

Detected one error from elastic-apm. Everythin works, this issue only appears when closing kytos with the following message:

2024-03-03 03:51:55,807 - ERROR [elasticapm.transport] (MainThread) Closing the transport connection timed out.

And it is inconsistent.

Detected an error with starlette, every request is disconnected causing an error when getting request.body(). Looking into it. UPDATE: I was getting this error by saving the request in memory which was my old method to test it. API requests are working normally now.

Alopalao commented 4 months ago

Updated pydantic in commit dbc8b29cca3a999420ab72ef262449bd64d565c2

Alopalao commented 3 months ago

Updated testing libraries, commit 5eda4340f81187b92751e52889780d21c133db73.

viniarck commented 3 months ago

@Alopalao mef_eline's POST /v2/evc/ is still returning 405 method not allowed.

❯ echo '{ "name": "epl", "service_level": 7, "dynamic_backup_path": true, "uni_a": { "interface_id": "00:00:00:00:00:00:00:01:1" }, "uni_z": { "interface_id": "00:00:00:00:00:00:00:03:1"
 } }' | http http://127.0.0.1:8181/api/kytos/mef_eline/v2/evc/
HTTP/1.1 405 Method Not Allowed
content-length: 47
content-type: application/json
date: Tue, 26 Mar 2024 12:55:14 GMT
server: uvicorn

{
    "code": 405,
    "description": "Method Not Allowed"
}

That's unexpected considering you said e2e were passing, can you double check this? Once threads have been addressed, e2e tests passing, flows stress tested with the latest commits, let me known and I'll do a final review. So, I'll request changes again here to make it explicit.

It turns out this was a result of wrong installation of conflict dependencies with openapi-core. pythons setup.py develop is not longer recommended due to upstream changes, for more information check out Aldo's PR updating the docs

Alopalao commented 3 months ago

Created issue for egg fragments warnings.