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

Using one request per path. #570

Merged
merged 5 commits into from
Nov 25, 2024
Merged

Using one request per path. #570

merged 5 commits into from
Nov 25, 2024

Conversation

Alopalao
Copy link

@Alopalao Alopalao commented Nov 19, 2024

Closes #514

Summary

  • Now using new flow_manager requests flows_by_switch to deploy paths in the method _send_flow_mods.
  • Modified content for requests when deleting path. Now only 1 is sent for most cases.

Local Tests

Created/removed EVCs and looked at installed/deleted flows.

End-to-End Tests

+ python3 -m pytest tests/ --reruns 2 -r fEr
============================= test session starts ==============================
platform linux -- Python 3.11.2, pytest-8.1.1, pluggy-1.5.0
rootdir: /tests
plugins: rerunfailures-13.0, timeout-2.2.0, anyio-4.3.0
collected 271 items

tests/test_e2e_01_kytos_startup.py ..                                    [  0%]
tests/test_e2e_05_topology.py ..................                         [  7%]
tests/test_e2e_06_topology.py ....                                       [  8%]
tests/test_e2e_10_mef_eline.py ..........ss.....x......................  [ 23%]
tests/test_e2e_11_mef_eline.py ......                                    [ 25%]
tests/test_e2e_12_mef_eline.py .....Xx.                                  [ 28%]
tests/test_e2e_13_mef_eline.py ....Xs.s.....Xs.s.XXxX.xxxx..X........... [ 43%]
.                                                                        [ 44%]
tests/test_e2e_14_mef_eline.py x                                         [ 44%]
tests/test_e2e_15_mef_eline.py .....                                     [ 46%]
tests/test_e2e_16_mef_eline.py ..                                        [ 47%]
tests/test_e2e_20_flow_manager.py ..........................             [ 56%]
tests/test_e2e_21_flow_manager.py ...                                    [ 57%]
tests/test_e2e_22_flow_manager.py ...............                        [ 63%]
tests/test_e2e_23_flow_manager.py ..............                         [ 68%]
tests/test_e2e_30_of_lldp.py ....                                        [ 70%]
tests/test_e2e_31_of_lldp.py ...                                         [ 71%]
tests/test_e2e_32_of_lldp.py ...                                         [ 72%]
tests/test_e2e_40_sdntrace.py .............R...                          [ 78%]
tests/test_e2e_41_kytos_auth.py ........                                 [ 81%]
tests/test_e2e_42_sdntrace.py ..                                         [ 81%]
tests/test_e2e_50_maintenance.py ............................            [ 92%]
tests/test_e2e_60_of_multi_table.py .....                                [ 94%]
tests/test_e2e_70_kytos_stats.py ........                                [ 97%]
tests/test_e2e_80_pathfinder.py ss......                                 [100%]

@Alopalao Alopalao requested a review from a team as a code owner November 19, 2024 14:18
- Fixed lint
@Alopalao
Copy link
Author

Alopalao commented Nov 19, 2024

Uni tests updated but still new ones are missing. Unit tests added.

Copy link
Member

@viniarck viniarck left a comment

Choose a reason for hiding this comment

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

Nicely done @Alopalao, that's an excellent gradual improvement.

Changelog needs to be updated, even though it's just an internal change, it's expected to contribute to a bit more of stability in certain cases where subsequent requests could still fail.

Other than that, related to single request changes, cleanup_evcs_old_path event could benefit from using this request too as mentioned on #517 (comment), but let's leave that for issue #517 since it needs discussion since it might end up being backported (I opened a thread with Italo in the devops channel to reassess if Ops is comfortable with the risk, we'll see how it unfolds) cc'ing @Ktmi for his information since he's involved with that one.

models/evc.py Outdated Show resolved Hide resolved
models/evc.py Show resolved Hide resolved
models/evc.py Outdated Show resolved Hide resolved
models/evc.py Outdated Show resolved Hide resolved
- Changed method name from `_install_unni_flows` to `_install_flows`
@viniarck viniarck self-requested a review November 21, 2024 17:37
Copy link
Member

@viniarck viniarck left a comment

Choose a reason for hiding this comment

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

Nicely done @Alopalao, if you don't have any other local exploratory tests, it should be good to get merged. Great that e2e tests are passing.

@Ktmi
Copy link

Ktmi commented Nov 21, 2024

This looks good on this end. What changes would be needed on flow_manager for the backport?

@viniarck
Copy link
Member

This looks good on this end. What changes would be needed on flow_manager for the backport?

@Ktmi, flow_manager PR 206. It introduced the /flows_by_switch endpoints and augmented /flows to support a list of switches in the payload.

Also, regarding backporting issue #517 to 2024.1, we could potentially avoid having to backport it if we were to cut and ship 2024.2 early December, but based on how 2024.2 is unfolding there's a high chance that it'll turn into 2025.1, since we had to deal with many bug fixes that impacted the scope version and most of them were backported too (so as of now we don't have much other major things to ship 2024.2, unless we only consider it as a "maintenance" bug fix version). So, backporting to 2024.1 can still be strategic and valuable.

@viniarck viniarck merged commit a47e289 into master Nov 25, 2024
2 checks passed
@viniarck viniarck deleted the enhace/reduce_flow_requests branch November 25, 2024 13:40
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.

Reduce the number of flow related requests.
3 participants