-
Notifications
You must be signed in to change notification settings - Fork 363
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 AntreaNetworkPolicyStats with drop action #1606
Fix AntreaNetworkPolicyStats with drop action #1606
Conversation
Thanks for your PR. The following commands are available:
|
Codecov Report
@@ Coverage Diff @@
## master #1606 +/- ##
==========================================
- Coverage 63.31% 61.90% -1.42%
==========================================
Files 170 181 +11
Lines 14250 15433 +1183
==========================================
+ Hits 9023 9554 +531
- Misses 4292 4856 +564
- Partials 935 1023 +88
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
thanks @ceclinux, LGTM overall.
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.
some pretty minor comments, otherwise LGTM
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.
LGTM
/test-all |
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.
A race condition needs to be fixed
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.
Could you also rebase on master and squash the commits when addressing the remaining comments?
I have rebased and re-organized the commits |
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.
@ceclinux Typically we take only one commit from a PR unless it's a branch merging so you don't have to split the commits. Of course you could amend your patches when addressing commits for ease of review, and normally we will use the squash button to merge them into one before checking in, but in this PR's case I need to reorganize your commit message since you used 4 patches in this PR. I would appreciate if you could squash it manually and have a single commit message to list what it does.
test/e2e/antreapolicy_test.go
Outdated
if err != nil { | ||
return false, err | ||
} | ||
t.Logf("Got AntreaNetworkPolicy stat: %v", stats) |
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.
t.Logf("Got AntreaNetworkPolicy stat: %v", stats) | |
t.Logf("Got AntreaNetworkPolicy stats: %v", stats) |
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.
Very reasonable, I have squashed into single commit.
I think the commit title can just be "Fix ANP with drop action when stats is enabled(#1599)", "by an e2e test" seems not useful here. And a typo "s/matric/metric" |
1. refactor parseMetricFlow to map format 2. add AntreaNetworkPolicyStats test with drop action 3. add extra ansible version check, forgotten by(#1611) 4. change metric to stats in terms of NetworkPolicyStats
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.
LGTM
/test-all |
…a-io#1606) 1. refactor parseMetricFlow to map format 2. add AntreaNetworkPolicyStats test with drop action 3. add extra ansible version check, forgotten by(antrea-io#1611) 4. change metric to stats in terms of NetworkPolicyStats
This PR fixes #1599. The test added would successfully collect dropped packet from AntreaNetworkPolicyStat because the agent is not crashed after the fix