tests: integration: cover kubernetes pod association isolation - #12208
Conversation
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe integration test adds threaded TLS pod-association servers, generates configuration for two Kubernetes filters with separate endpoints, and verifies that both filters perform multiple independent refresh requests. ChangesKubernetes filter refresh validation
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 350ba70208
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| import http.server | ||
| import os | ||
| import shlex | ||
| import ssl |
There was a problem hiding this comment.
The commit message has no Signed-off-by: trailer, so it does not satisfy the repository's DCO requirement; recreate the commit with git commit -s before submission.
AGENTS.md reference: AGENTS.md:L140-L140
Useful? React with 👍 / 👎.
| assert "kube token command test" in log_text | ||
|
|
||
|
|
||
| def test_filter_kubernetes_pod_association_is_independent_per_instance(tmp_path): |
There was a problem hiding this comment.
Wrap the commit body to 80 columns
Several commit-message lines exceed the repository's 80-character limit, including prose at 91–197 characters and verification commands up to 230 characters; rewrap the body before submission.
AGENTS.md reference: AGENTS.md:L138-L138
Useful? React with 👍 / 👎.
Summary
Add focused Python integration coverage for Kubernetes pod association when two filter instances are configured.
Each filter targets an independent local TLS endpoint. The test requires both instances to complete repeated refresh cycles and verifies clean shutdown.
Context
PR #12153 fixed the process-global pod-association thread, mutex, event loop, and context state that allowed multiple Kubernetes filter instances to overwrite and concurrently destroy shared state.
This follow-up protects that per-instance ownership and lifecycle behavior from regression.
Refs #12152
Follow-up to #12153
Verification
make -j 8tests/integration/.venv/bin/python -m pytest tests/integration/scenarios/filter_kubernetes/tests/test_filter_kubernetes_001.py::test_filter_kubernetes_pod_association_is_independent_per_instance -qVALGRIND=1 VALGRIND_STRICT=1 tests/integration/.venv/bin/python -m pytest tests/integration/scenarios/filter_kubernetes/tests/test_filter_kubernetes_001.py::test_filter_kubernetes_pod_association_is_independent_per_instance -qtests/integration/.venv/bin/python -m pytest tests/integration/scenarios/filter_kubernetes/tests/test_filter_kubernetes_001.py -qGITHUB_EVENT_NAME=pull_request GITHUB_BASE_REF=master tests/integration/.venv/bin/python .github/scripts/commit_prefix_check.pySummary by CodeRabbit