-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat(anta.tests): Optimize VerifyRoutingTableEntry by quering all routes for a vrf. #682
feat(anta.tests): Optimize VerifyRoutingTableEntry by quering all routes for a vrf. #682
Conversation
fde582d
to
93be1ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey David, thanks for the PR! Did you test this against a large routing table? I remember going back and forth myself when I wrote this test. If I remember correctly I ran into issues with large routing tables and I think it was more efficient sending multiple commands.
Not really, that would be an interesting test. Maybe we can sync and test. Guillaume mentioned this and he proposed to have a parameter collect: [all|unique] that could control the behavior. |
Tested this with a full routing table and ANTA is in fact crashing. I need to investigate more but when doing the same command with curl or using HTTPX outside of ANTA, it works fine. We can probably reproduce easily with other commands that generate a very large output so that's a separate issue in my opinion. If we implement a knob to control that behavior, we open the door for users to hit that bug. @gmuloc Thoughts? |
|
Update: I was able to successfuly test the full routing table with ANTA 1.0 but we should still implement a knob in the inputs [ all | unique ] to cover the use case where we need to query a single route against a full routing table. |
5dfcf09
to
4ea6296
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see improvements with a full routing table. Makes sense since every indiviual route is unique, not hitting the cache.
Also, we are spending a lot of time waiting on the actual HTTP response since the output is super big. Let's implement the knob for maximum flexibility.
…r: one=a route per command, all=all routes in vrf
bef22e5
to
0094cb3
Compare
|
Description
Reduce number of commands executed on VerifyRoutingTableEntry by querying all routes of a vrf in one go.
Checklist:
pre-commit run
)tox -e testenv
)