feat(verifier): implement event-driven watching using kubewatch#8
feat(verifier): implement event-driven watching using kubewatch#8yuwenma wants to merge 2 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yuwenma 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 |
|
This PR depends on #5 cc @pradeepvrd |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new verifier subsystem that shifts pod/deployment verification from kubectl polling loops to an event-driven model using a locally-run kubewatch daemon and a local webhook receiver, with Pydantic-based spec parsing and accompanying tests.
Changes:
- Added an event-driven watcher service (
KubeWatchService) with an embedded local HTTP webhook receiver to wake verifiers on resource events. - Implemented
pod_healthyandscaling_completeverifiers that block onthreading.Event.wait()and re-check state only after notifications. - Introduced a typed
VerificationSpec(Pydantic v2 RootModel) plus aVerifierAgentfor evaluating single and compound verification specs, with tests and documentation.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Adds pydantic>=2.0.0 dependency for spec/result models. |
| Makefile | Adds install/test targets and a kubewatch install helper. |
| devops_bench/agents/verifier/watcher.py | Adds webhook server + kubewatch process lifecycle management. |
| devops_bench/agents/verifier/verifiers/pod_healthy_verifier.py | Adds event-driven pod readiness verifier. |
| devops_bench/agents/verifier/verifiers/scaling_complete_verifier.py | Adds event-driven deployment scaling verifier. |
| devops_bench/agents/verifier/verifiers/init.py | Initializes verifiers package. |
| devops_bench/agents/verifier/verifier.py | Adds agent entrypoint that executes single/compound verification specs. |
| devops_bench/agents/verifier/utils.py | Adds Timer and kubectl default timeout constant. |
| devops_bench/agents/verifier/test_verifier.py | Adds unit tests covering verifiers and compound spec execution. |
| devops_bench/agents/verifier/spec.py | Defines the typed Pydantic RootModel spec format. |
| devops_bench/agents/verifier/README.md | Documents the verifier API and event-driven kubewatch architecture. |
| devops_bench/agents/verifier/base.py | Adds base verifier interface and VerificationResult model. |
| devops_bench/agents/verifier/init.py | Initializes verifier package. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e820ad5 to
c1732d6
Compare
|
/label tide/merge-method-squash |
ecc4c58 to
c803343
Compare
c803343 to
5ac885c
Compare
|
/hold Per discussion with @pradeepvrd, we're considering some refactor before merging this. Hold this PR for now. |
|
PR needs rebase. 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. |
Description
This PR transitions the Verifier Agent from a kubectl polling loops to an event-driven architecture powered by robusta-dev/kubewatch
Tests
make testlocally. All 8 tests passed.Main changes: