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

fix: anta nrfu table --group-by is broken #948

Closed
mtache opened this issue Dec 5, 2024 · 2 comments · Fixed by #962
Closed

fix: anta nrfu table --group-by is broken #948

mtache opened this issue Dec 5, 2024 · 2 comments · Fixed by #962
Milestone

Comments

@mtache
Copy link
Collaborator

mtache commented Dec 5, 2024

mtache@cactus:/mnt/lab/projects/anta-demo$ anta nrfu -c 1-network-tests/nrfu.yml table --group-by device
╭────────────────────── Settings ──────────────────────╮
│ - ANTA Inventory contains 6 devices (AsyncEOSDevice) │
│ - Tests catalog contains 11 tests                    │
╰──────────────────────────────────────────────────────╯

[12:27:19] INFO     Preparing ANTA NRFU Run ...                                                                                                                                                                                                                                                                                                                                                                                                                            tools.py:293
           INFO     Connecting to devices ...                                                                                                                                                                                                                                                                                                                                                                                                                              tools.py:293
           INFO     Connecting to devices completed in: 0:00:00.030.                                                                                                                                                                                                                                                                                                                                                                                                       tools.py:301
           INFO     Preparing the tests ...                                                                                                                                                                                                                                                                                                                                                                                                                                tools.py:293
           INFO     Preparing the tests completed in: 0:00:00.001.                                                                                                                                                                                                                                                                                                                                                                                                         tools.py:301
           INFO     --- ANTA NRFU Run Information ---                                                                                                                                                                                                                                                                                                                                                                                                                     runner.py:276
                    Number of devices: 6 (6 established)                                                                                                                                                                                                                                                                                                                                                                                                                               
                    Total number of selected tests: 50                                                                                                                                                                                                                                                                                                                                                                                                                                 
                    Maximum number of open file descriptors for the current ANTA process: 16384                                                                                                                                                                                                                                                                                                                                                                                        
                    ---------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                  
           INFO     Preparing ANTA NRFU Run completed in: 0:00:00.034.                                                                                                                                                                                                                                                                                                                                                                                                     tools.py:301
           INFO     Running ANTA tests ...                                                                                                                                                                                                                                                                                                                                                                                                                                 tools.py:293
           INFO     Running ANTA tests completed in: 0:00:00.125.                                                                                                                                                                                                                                                                                                                                                                                                          tools.py:301
           INFO     Cache statistics for 'spine1': 0 hits / 8 command(s) (0.00%)                                                                                                                                                                                                                                                                                                                                                                                           runner.py:75
           INFO     Cache statistics for 'spine2': 0 hits / 8 command(s) (0.00%)                                                                                                                                                                                                                                                                                                                                                                                           runner.py:75
           INFO     Cache statistics for 'leaf1': 1 hits / 10 command(s) (10.00%)                                                                                                                                                                                                                                                                                                                                                                                          runner.py:75
           INFO     Cache statistics for 'leaf2': 1 hits / 10 command(s) (10.00%)                                                                                                                                                                                                                                                                                                                                                                                          runner.py:75
           INFO     Cache statistics for 'leaf3': 1 hits / 10 command(s) (10.00%)                                                                                                                                                                                                                                                                                                                                                                                          runner.py:75
           INFO     Cache statistics for 'leaf4': 1 hits / 10 command(s) (10.00%)                                                                                                                                                                                                                                                                                                                                                                                          runner.py:75
  • Running NRFU Tests...100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50/50 • 0:00:00 • 0:00:00

                                            Summary per device                                            
┏━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Device ┃ # of success ┃ # of skipped ┃ # of failure ┃ # of errors ┃ List of failed or error test cases ┃
┡━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ leaf1  │ 0            │ 0            │ 0            │ 0           │                                    │
├────────┼──────────────┼──────────────┼──────────────┼─────────────┼────────────────────────────────────┤
│ leaf2  │ 0            │ 0            │ 0            │ 0           │                                    │
├────────┼──────────────┼──────────────┼──────────────┼─────────────┼────────────────────────────────────┤
│ leaf3  │ 0            │ 0            │ 0            │ 0           │                                    │
├────────┼──────────────┼──────────────┼──────────────┼─────────────┼────────────────────────────────────┤
│ leaf4  │ 0            │ 0            │ 0            │ 0           │                                    │
├────────┼──────────────┼──────────────┼──────────────┼─────────────┼────────────────────────────────────┤
│ spine1 │ 0            │ 0            │ 0            │ 0           │                                    │
├────────┼──────────────┼──────────────┼──────────────┼─────────────┼────────────────────────────────────┤
│ spine2 │ 0            │ 0            │ 0            │ 0           │                                    │
└────────┴──────────────┴──────────────┴──────────────┴─────────────┴────────────────────────────────────┘
mtache@cactus:/mnt/lab/projects/anta-demo$ anta nrfu -c 1-network-tests/nrfu.yml table --group-by test
╭────────────────────── Settings ──────────────────────╮
│ - ANTA Inventory contains 6 devices (AsyncEOSDevice) │
│ - Tests catalog contains 11 tests                    │
╰──────────────────────────────────────────────────────╯

[12:28:02] INFO     Preparing ANTA NRFU Run ...                                                                                                                                                                                                                                                                                                                                                                                                                            tools.py:293
           INFO     Connecting to devices ...                                                                                                                                                                                                                                                                                                                                                                                                                              tools.py:293
           INFO     Connecting to devices completed in: 0:00:00.027.                                                                                                                                                                                                                                                                                                                                                                                                       tools.py:301
           INFO     Preparing the tests ...                                                                                                                                                                                                                                                                                                                                                                                                                                tools.py:293
           INFO     Preparing the tests completed in: 0:00:00.001.                                                                                                                                                                                                                                                                                                                                                                                                         tools.py:301
           INFO     --- ANTA NRFU Run Information ---                                                                                                                                                                                                                                                                                                                                                                                                                     runner.py:276
                    Number of devices: 6 (6 established)                                                                                                                                                                                                                                                                                                                                                                                                                               
                    Total number of selected tests: 50                                                                                                                                                                                                                                                                                                                                                                                                                                 
                    Maximum number of open file descriptors for the current ANTA process: 16384                                                                                                                                                                                                                                                                                                                                                                                        
                    ---------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                  
           INFO     Preparing ANTA NRFU Run completed in: 0:00:00.033.                                                                                                                                                                                                                                                                                                                                                                                                     tools.py:301
           INFO     Running ANTA tests ...                                                                                                                                                                                                                                                                                                                                                                                                                                 tools.py:293
           INFO     Running ANTA tests completed in: 0:00:00.116.                                                                                                                                                                                                                                                                                                                                                                                                          tools.py:301
           INFO     Cache statistics for 'spine1': 0 hits / 8 command(s) (0.00%)                                                                                                                                                                                                                                                                                                                                                                                           runner.py:75
           INFO     Cache statistics for 'spine2': 0 hits / 8 command(s) (0.00%)                                                                                                                                                                                                                                                                                                                                                                                           runner.py:75
           INFO     Cache statistics for 'leaf1': 1 hits / 10 command(s) (10.00%)                                                                                                                                                                                                                                                                                                                                                                                          runner.py:75
           INFO     Cache statistics for 'leaf2': 1 hits / 10 command(s) (10.00%)                                                                                                                                                                                                                                                                                                                                                                                          runner.py:75
           INFO     Cache statistics for 'leaf3': 1 hits / 10 command(s) (10.00%)                                                                                                                                                                                                                                                                                                                                                                                          runner.py:75
           INFO     Cache statistics for 'leaf4': 1 hits / 10 command(s) (10.00%)                                                                                                                                                                                                                                                                                                                                                                                          runner.py:75
  • Running NRFU Tests...100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50/50 • 0:00:00 • 0:00:00

                                                    Summary per test                                                     
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Test Name                  ┃ # of success ┃ # of skipped ┃ # of failure ┃ # of errors ┃ List of failed or error nodes ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ VerifyBGPPeerCount         │ 0            │ 0            │ 0            │ 0           │                               │
├────────────────────────────┼──────────────┼──────────────┼──────────────┼─────────────┼───────────────────────────────┤
│ VerifyEOSVersion           │ 0            │ 0            │ 0            │ 0           │                               │
├────────────────────────────┼──────────────┼──────────────┼──────────────┼─────────────┼───────────────────────────────┤
│ VerifyInterfaceUtilization │ 0            │ 0            │ 0            │ 0           │                               │
├────────────────────────────┼──────────────┼──────────────┼──────────────┼─────────────┼───────────────────────────────┤
│ VerifyLoopbackCount        │ 0            │ 0            │ 0            │ 0           │                               │
├────────────────────────────┼──────────────┼──────────────┼──────────────┼─────────────┼───────────────────────────────┤
│ VerifyMlagInterfaces       │ 0            │ 0            │ 0            │ 0           │                               │
├────────────────────────────┼──────────────┼──────────────┼──────────────┼─────────────┼───────────────────────────────┤
│ VerifyMlagStatus           │ 0            │ 0            │ 0            │ 0           │                               │
├────────────────────────────┼──────────────┼──────────────┼──────────────┼─────────────┼───────────────────────────────┤
│ VerifyNTP                  │ 0            │ 0            │ 0            │ 0           │                               │
├────────────────────────────┼──────────────┼──────────────┼──────────────┼─────────────┼───────────────────────────────┤
│ VerifyReloadCause          │ 0            │ 0            │ 0            │ 0           │                               │
├────────────────────────────┼──────────────┼──────────────┼──────────────┼─────────────┼───────────────────────────────┤
│ VerifyZeroTouch            │ 0            │ 0            │ 0            │ 0           │                               │
└────────────────────────────┴──────────────┴──────────────┴──────────────┴─────────────┴───────────────────────────────┘
@carl-baillargeon
Copy link
Contributor

Regression from #840. Impacts Markdown reporting too.

@gmuloc gmuloc added this to the v1.2.0 milestone Dec 5, 2024
@gmuloc
Copy link
Collaborator

gmuloc commented Dec 5, 2024

ResultManager reacts on adding test to it (update stats and so on) - means we need to add ran test to the ResultManager only (if a TestResult status is changed after the ResultManager state is unsync => probably warrant to be fixed in deisgn but for now let's fixANTA flow)

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 a pull request may close this issue.

3 participants