atlanticwave-sdx / pce

Path Computation Element for AtlanticWave SDX.
https://www.atlanticwave-sdx.net
0 stars 3 forks source link

Test suite is broken #200

Closed sajith closed 1 month ago

sajith commented 1 month ago

With recent changes in datamodel and with the fact that pce is now using datamodel's main branch, pce's test suite is broken now:

FAILED tests/test_te_manager.py::TEManagerTests::test_connection_amlight - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_amlight_to_zaoxi - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_amlight_to_zaoxi_many_identical_requests - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_amlight_to_zaoxi_two_distinct_requests - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_amlight_to_zaoxi_two_identical_requests - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_amlight_to_zaoxi_unreserve - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_amlight_to_zaoxi_user_port - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_amlight_to_zaoxi_user_port_v2 - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_amlight_to_zaoxi_with_merged_topology - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_amlight_user_port - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_breakdown_none_input - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_breakdown_some_input - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_breakdown_three_domains - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_breakdown_three_domains_sax_connection - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_breakdown_tm - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_connection_breakdown_two_similar_requests - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_expand_label_range - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_generate_graph_and_connection - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_generate_graph_and_connection_with_sax_2_invalid - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_generate_graph_and_connection_with_sax_2_valid - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_manager.py::TEManagerTests::test_generate_solver_input - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_solver_static.py::TESolverTests::test_computation_breakdown - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_solver_static.py::TESolverTests::test_computation_breakdown_many_topologies - AttributeError: 'Port' object has no attribute 'label_range'
FAILED tests/test_te_solver_static.py::TESolverTests::test_computation_update - AttributeError: 'Port' object has no attribute 'label_range'
sajith commented 1 month ago

Example CI run: https://github.com/atlanticwave-sdx/pce/actions/runs/10271724419

italovalcy commented 1 month ago

git blame helps find the source of the problem: https://github.com/atlanticwave-sdx/datamodel/pull/136

italovalcy commented 1 month ago

Hi @sajith I deeply apologize for creating the regression! When I worked on PR https://github.com/atlanticwave-sdx/datamodel/pull/136 I was working with a different target branch and on that situation it looks like the unit tests are not running. Then after changing the target to main, I should have waited the unit tests to pass (or even force a new workflow execution). Sorry about that.

Looking from the positive side of this: thanks to this failure I was able to identify a few inconsistencies on some topology examples provided on data model repo, opportunity to add backward compatibility to Port.label_range attribute, found an improvement opportunity when reserving VLAN on TEManager, and finally spotted a situation regarding what to do when the user request a VLAN ID not authorized by the OXP. Hopefully this all will be sorted out soon.

Thanks again for reporting this!

sajith commented 1 month ago

No need for apologies @italovalcy! I think we should let issues surface whenever we can and fix them. It is a good thing that we have tests, even though they could use some improvements. :-)

I also had been looking at the test failures but obviously I am not as quick as you are. Glad you are able to spot and fix these. :-D