kytos-ng / of_core

Kytos Main OpenFlow Network Application (NApp)
MIT License
0 stars 5 forks source link

fix: release 2022.3.1: experimenter class deser shouldn't use old `pyof ActionExperimenter.body` #104

Closed viniarck closed 1 year ago

viniarck commented 1 year ago

Closes #103

Summary

See updated changelog file.

This bug was a result of me using a older version of pyof when I fixed issue #87 on PR https://github.com/kytos-ng/of_core/pull/88, it fixed the original issue, but then I also relied on an old removed body value from ActionExperimenter.body which introduced this issue here. Since the classes are being registered correctly by noviflow NApp then from_of_action should work as it used to.

Local Tests

kytos $> 2023-02-22 18:57:49,762 - INFO [kytos.napps.kytos/flow_manager] (Thread-92) Send FlowMod from request dpid: 00:00:00:00:00:00:00:01, command: add, force: False, flows_dict: {'flows': [{'priority': 100, 'match': {'in_port': 1}, 'actions': [{'action_type': 'push_int'}]}]}
2023-02-22 18:57:52,383 - INFO [kytos.napps.kytos/flow_manager] (Thread-93) Send FlowMod from request dpid: 00:00:00:00:00:00:00:01, command: add, force: False, flows_dict: {'flows': [{
'priority': 100, 'match': {'in_port': 2}, 'actions': [{'action_type': 'pop_int'}]}]}
kytos $>                                                                                                                                                                                 

End-to-End Tests

I have dispatched an e2e execution, I don't expect much surprises though.

@jab1982 thanks for catching this issue and helping out to validate this branch.

viniarck commented 1 year ago

Having python-openflow on PyPI will also help out developers to avoid hitting this https://github.com/kytos-ng/kytos/issues/271.

Good thing that our docker build is all set.

viniarck commented 1 year ago

e2e tests are passing too as expected with this branch:

+ python3 -m pytest tests/ --reruns 2 -r fEr
============================= test session starts ==============================
platform linux -- Python 3.9.2, pytest-7.2.0, pluggy-1.0.0
rootdir: /builds/amlight/kytos-end-to-end-tester/kytos-end-to-end-tests
plugins: rerunfailures-10.2, timeout-2.1.0
collected 206 items
tests/test_e2e_01_kytos_startup.py ..                                    [  0%]
tests/test_e2e_05_topology.py ..................                         [  9%]
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.                                  [ 30%]
tests/test_e2e_13_mef_eline.py .....xxXx......xxXx.XXxX.xxxx..x......... [ 50%]
...                                                                      [ 51%]
tests/test_e2e_14_mef_eline.py x                                         [ 51%]
tests/test_e2e_15_mef_eline.py ..                                        [ 52%]
tests/test_e2e_20_flow_manager.py ....................                   [ 62%]
tests/test_e2e_21_flow_manager.py ..                                     [ 63%]
tests/test_e2e_22_flow_manager.py ...............                        [ 70%]
tests/test_e2e_23_flow_manager.py ..............                         [ 77%]
tests/test_e2e_30_of_lldp.py ....                                        [ 79%]
tests/test_e2e_31_of_lldp.py ...                                         [ 81%]
tests/test_e2e_32_of_lldp.py ...                                         [ 82%]
tests/test_e2e_40_sdntrace.py ....                                       [ 84%]
tests/test_e2e_41_kytos_auth.py ........                                 [ 88%]
tests/test_e2e_50_maintenance.py ........................                [100%]
=============================== warnings summary ===============================
= 182 passed, 2 skipped, 17 xfailed, 5 xpassed, 793 warnings in 10686.70s (2:58:06) =

In the future, when we also start running e2e with NoviFlow switches as a target that will also allow us to have better cov for experimenter e2e tests (at that point we'll need to evolve our test selection as well for some particular tests only run if a particular target or topology is available)