-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 tests for hubble metrics handlers #22518
Add tests for hubble metrics handlers #22518
Conversation
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.
This is great, I'm really happy to see tests for the metrics, we really need these. I added few comments above, but in all the tests, there's no assertions against the actual metric values, so let's add that everywhere we're expecting a non-empty series.
e2e353d
to
bd2a2a6
Compare
Commit f4a279c9e272ba01ef92bbcbd43607a9d5ce66bf does not contain "Signed-off-by". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
f4a279c
to
c44028a
Compare
This looks good. Can you fix your commits and make sure everything passes the initial CI checks? |
7363f8f
to
88503aa
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.
New tests look good to me.
88503aa
to
d44ec07
Compare
You'll need to try and shorten the commit message.
|
d44ec07
to
ff8365e
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.
Thank you for the contribution @marqc patch LGTM!
/test Job 'Cilium-PR-K8s-1.26-kernel-net-next' failed: Click to show.Test Name
Failure Output
If it is a flake and a GitHub issue doesn't already exist to track it, comment |
ff8365e
to
a4cc061
Compare
Marking for v1.13 backport. This PR only adds unit tests to Hubble metrics and better test coverage is better overall in case of backport (assuming tests aren't flaky). As suggested by @gandro, I ran the test 1000 times and they always succeeded so I take it they're not flaky.
|
/test Job 'Cilium-PR-K8s-1.24-kernel-5.4' failed: Click to show.Test Name
Failure Output
If it is a flake and a GitHub issue doesn't already exist to track it, comment |
Not sure why Travis doesn't get triggered, it's basically the only truly relevant CI test. Let's try closing the PR and re-opening it. |
a4cc061
to
1afaa67
Compare
Looks like the testing environment is not stable. I rebased to master branch HEAD and re-pushed changes to trigger tests again. |
Unfortunately still failing on some k8s setup checks https://github.com/cilium/cilium/actions/runs/3703427000/jobs/6274901939 Test failed on this check https://github.com/cilium/cilium/blob/master/.github/workflows/conformance-gateway-api.yaml#L124 with info that coredns pod does not exist. Later in post test cluster dump there is another coredns pod visible healthy and ready. I tried performing these test steps manually on my local machine and I haven't seen any problems. Coredns does not transition into ready state until cilium gets installed, but right after that it becomes healthy. /test |
1afaa67
to
e89c688
Compare
@marqc Some tests are flaky indeed, let's ignore the test failures as long as the Travis test is ✔️ |
Signed-off-by: Marek Chodor <mchodor@google.com>
e89c688
to
c465899
Compare
I'm not sure what's wrong with Travis and why it doesn't trigger. This PR only adds unit tests to Hubble metrics. I have run them 1000 times without any failures, thus marking this PR as ready to merge. |
PortDistributionHandler and TcpHandler.
Signed-off-by: Marek Chodor mchodor@google.com
Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXX
line if the commit addresses a particularGitHub issue.
Fixes: <commit-id>
tag, thenplease add the commit author[s] as reviewer[s] to this issue.
Add tests for hubble metrics handlers: DropHandler, PortDistributionHandler and TcpHandler.