-
Notifications
You must be signed in to change notification settings - Fork 366
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
Add code coverage for flow aggregator #1898
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1898 +/- ##
===========================================
- Coverage 62.56% 46.27% -16.30%
===========================================
Files 204 187 -17
Lines 17534 16788 -746
===========================================
- Hits 10970 7768 -3202
- Misses 5402 8009 +2607
+ Partials 1162 1011 -151
Flags with carried forward coverage won't be shown. Click here to find out more.
|
0bdf69f
to
43766ca
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 see no logic in the e2e test framework to retrieve the coverage file for the flow aggregator and copy it to the correct directory?
9f8cbee
to
34881f3
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.
Thanks for your PR.
command: | ||
- flow-aggregator-coverage | ||
name: flow-aggregator | ||
image: antrea/flow-aggregator-coverage:latest |
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.
Missing a blank new line.
ci/jenkins/test-vmc.sh
Outdated
@@ -298,7 +298,11 @@ function deliver_antrea { | |||
VERSION="$CLUSTER" DOCKER_REGISTRY="${DOCKER_REGISTRY}" make && break | |||
fi | |||
done | |||
VERSION="$CLUSTER" DOCKER_REGISTRY="${DOCKER_REGISTRY}" make flow-aggregator-ubuntu | |||
if [[ "$COVERAGE" == true ]]; then | |||
VERSION="$CLUSTER" DOCKER_REGISTRY="${DOCKER_REGISTRY}" make flow-aggregator-ubuntu |
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.
swap L302 and L304?
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.
Yes, thats right. It was a mistake. Done.
ci/jenkins/test-vmc.sh
Outdated
@@ -298,7 +298,11 @@ function deliver_antrea { | |||
VERSION="$CLUSTER" DOCKER_REGISTRY="${DOCKER_REGISTRY}" make && break | |||
fi | |||
done | |||
VERSION="$CLUSTER" DOCKER_REGISTRY="${DOCKER_REGISTRY}" make flow-aggregator-ubuntu | |||
if [[ "$COVERAGE" == true ]]; then | |||
VERSION="$CLUSTER" DOCKER_REGISTRY="${DOCKER_REGISTRY}" make flow-aggregator-ubuntu |
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.
Yes, thats right. It was a mistake. Done.
34881f3
to
f131c4d
Compare
/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.
@weiqiangt I believe the codecov token is wrong, or something along these lines. The codecov reports are not being uploaded to the correct place. When I look at some logs for Github workflows running on the main branch, I see:
View reports at https://codecov.io/github/weiqiangt/antrea/commit/c9f526066d20de477ac2126f14090e1f4bfd8d6e
So I think we may be using a token for your personal fork and not for vmware-tanzu/antrea. I don't want to merge this PR before this is fixed, as I want to check that the coverage data for the aggregator is handled correctly.
Maybe I need to update the token myself?
test/e2e/framework.go
Outdated
} | ||
pods, err := data.clientset.CoreV1().Pods(flowAggregatorNamespace).List(context.TODO(), listOptions) | ||
if err != nil { | ||
return fmt.Errorf("failed to list Flow Aggregator: %v", err) |
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.
list Flow Aggregator Pods
I checked cov.out files in the kind e2e test artifacts and code coverage output for flow aggregator seemed to have populated there fine. Yes, I tried codecov UI, but could not locate it. I created my PR before the main branch fix went in. Does it have to do something with that? |
6a03e30
to
7261a51
Compare
I didn't hear from @weiqiangt about this, so I'll try updating the token myself to see if it resolves the issue |
/test-all |
@srikartati I think I have fixed the issue by changing the token |
7261a51
to
24b7cfd
Compare
/test-all |
88d0cfe
to
47335d6
Compare
/test-all |
47335d6
to
f2b942c
Compare
/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.
Looks like the coverage data is uploaded correctly now
dad463d
to
831e1de
Compare
Add code coverage for flow aggregator binary when running end-to-end tests on different platforms (kind, jenkins, VMC etc.)
831e1de
to
e8f4ccf
Compare
/test-all |
/test-conformance |
Add code coverage for flow aggregator binary when running end-to-end tests on different platforms (kind, jenkins, VMC etc.)
Add code coverage for flow aggregator binary when
running end-to-end tests on different platforms
(kind, jenkins, VMC etc.)