Add network observability e2e tests#31342
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a new Ginkgo e2e suite for NetObserv that checks single-node absence cases and, on supported clusters, validates readiness, monitoring resources, logs, and metric exposure. ChangesNetObserv observability test suite
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 13 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (13 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kapjain-rh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/extended/networking/network_observability.go`:
- Around line 41-55: The SNO absence checks in the namespace lookups and
FlowCollector CRD check are too broad because they treat any error as success.
Update the assertions around the namespace Get calls and the
oc.AsAdmin().WithoutNamespace().Run("get").Args("crd",
"flowcollectors.flows.netobserv.io") path to only pass when the error is
specifically NotFound, using apierrors.IsNotFound(err), and fail for all other
errors so the test only confirms the resources are truly absent.
- Around line 58-63: Skip the health spec on single-node clusters by adding the
same IsSingleNode guard used in the earlier NetObserv test before the checks in
the flow data health case. In the test that starts with g.It("should have all
components healthy and producing flow data"), call g.Skip when IsSingleNode
returns true so the namespace and FlowCollector assertions are never run on SNO.
Use the existing IsSingleNode helper and the health spec block to locate the
change.
- Around line 277-290: The Prometheus check in the network observability test
only verifies that a time series exists, not that it contains a non-zero sample.
Update the parsing logic in the Prometheus response handling to extract the
returned sample value from the result payload, then assert that the value is
greater than zero instead of only checking len(result.Data.Result). Keep the
change localized to the promResult handling and the Should(o.BeTrue()) predicate
so the test proves flow ingestion actually produced data.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: ba6bd409-331b-4935-b969-c585e33c4f4c
📒 Files selected for processing (1)
test/extended/networking/network_observability.go
|
/test verify |
|
Scheduling required tests: |
|
Scheduling required tests: |
|
/retest |
|
@kapjain-rh: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Risk analysis has seen new tests most likely introduced by this PR. New Test Risks for sha: 70db7d9
New tests seen in this PR at sha: 70db7d9
|
Summary
PrometheusRules), and end-to-end flow data pipeline from FLP metrics to Prometheus ingestion
Test plan
Summary by CodeRabbit
Summary