examples: fix agent runtime and pcap configurations#437
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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.
Code Review
This pull request replaces the basic busybox container in the agent runtime example with a Python-based HTTP echo server, updates the router URL in the PCAP analyzer deployment, and updates the Python SDK usage example to dynamically retrieve configurations from environment variables. The review feedback suggests refactoring the Python example to use context managers (with statements) for the AgentRuntimeClient instances to ensure robust resource cleanup instead of calling .close() manually.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Pull request overview
This PR makes the Python SDK AgentRuntime example runnable against the repository’s Kubernetes manifests by adding a minimal echo HTTP server with health probes, updating the SDK usage example to call that echo endpoint, and correcting the Router service address used by the PCAP analyzer example.
Changes:
- Documented the deploy/port-forward/invoke workflow for the AgentRuntime SDK example.
- Updated the AgentRuntime SDK example script to use env-driven runtime name/namespace and invoke the
/echoendpoint. - Fixed the PCAP analyzer example’s
ROUTER_URLto point at the correct in-cluster Router service.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| sdk-python/examples/README.md | Adds step-by-step instructions for deploying and invoking the runnable AgentRuntime example. |
| sdk-python/examples/agent_runtime_usage.py | Updates example invocation payload/path and makes runtime/namespace configurable via environment variables. |
| example/pcap-analyzer/deployment.yaml | Corrects Router service DNS name for in-cluster access. |
| example/agent-runtime/agent-runtime.yaml | Replaces the sleep container with a minimal Python HTTP echo server and adds readiness/liveness probes. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #437 +/- ##
==========================================
+ Coverage 58.41% 58.56% +0.14%
==========================================
Files 36 36
Lines 3463 3463
==========================================
+ Hits 2023 2028 +5
+ Misses 1231 1227 -4
+ Partials 209 208 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
6cb56e9 to
a48cb77
Compare
Signed-off-by: Zhou Zihang <[email protected]>
a48cb77 to
c18707f
Compare
What type of PR is this?
/kind bug
/kind documentation
What this PR does / why we need it:
Make the AgentRuntime SDK example runnable with the repository manifest by adding a minimal echo HTTP server and health probes. Document the deployment and invocation flow, and fix the PCAP analyzer's Router service address.
Which issue(s) this PR fixes:
N/A
Special notes for your reviewer:
This change was prepared with AI assistance and manually verified.
Tested with:
python -m pytest sdk-python/tests/test_agent_runtime.py -qruff check sdk-python/examples/agent_runtime_usage.pyDoes this PR introduce a user-facing change?: