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

Skip NO_AF_LOG_ADDR when target=mixed #329

Merged
merged 3 commits into from
Aug 2, 2023
Merged

Skip NO_AF_LOG_ADDR when target=mixed #329

merged 3 commits into from
Aug 2, 2023

Conversation

jtwb
Copy link
Member

@jtwb jtwb commented Jul 25, 2023

Fixes #324

Aerleon will issue a warning when it finds a term where none of the match conditions are relevant for the current address family (the warning is called NO_AF_LOG_ADDR internally). However the code is too eager to generate this warning since the parent filter may have target=mixed, which is a two-pass process that ultimately will render these terms, making the warning inaccurate and unnecessary. This change removes that warning when target=mixed.

@jtwb jtwb requested a review from ankenyr July 25, 2023 22:03
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Patch coverage: 82.41% and project coverage change: -0.01% ⚠️

Comparison is base (484f6dc) 91.23% compared to head (bfd8a88) 91.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #329      +/-   ##
==========================================
- Coverage   91.23%   91.23%   -0.01%     
==========================================
  Files         102      102              
  Lines       22591    22664      +73     
  Branches     3385     3397      +12     
==========================================
+ Hits        20611    20677      +66     
- Misses       1284     1290       +6     
- Partials      696      697       +1     
Flag Coverage Δ
tests 91.18% <82.41%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
aerleon/lib/packetfilter.py 82.63% <0.00%> (-0.58%) ⬇️
aerleon/lib/pcap.py 71.64% <0.00%> (-0.73%) ⬇️
aerleon/lib/cisco.py 89.24% <60.00%> (+0.53%) ⬆️
aerleon/lib/juniper.py 86.39% <66.66%> (-0.49%) ⬇️
aerleon/lib/arista_tp.py 93.24% <71.42%> (-0.48%) ⬇️
tests/regression/arista_tp/arista_tp_test.py 99.66% <100.00%> (+<0.01%) ⬆️
tests/regression/cisco/cisco_test.py 99.07% <100.00%> (+0.07%) ⬆️
tests/regression/juniper/juniper_test.py 99.78% <100.00%> (+<0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jtwb jtwb merged commit 359161c into main Aug 2, 2023
6 of 7 checks passed
@jtwb jtwb deleted the fix_324 branch August 2, 2023 04:44
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.

Warnings for NO_AF_LOG_ADDR are only relevant for non-mixed filters
3 participants