Skip to content

examples: fix agent runtime and pcap configurations#437

Open
acsoto wants to merge 1 commit into
volcano-sh:mainfrom
acsoto:fix/agent-runtime-examples
Open

examples: fix agent runtime and pcap configurations#437
acsoto wants to merge 1 commit into
volcano-sh:mainfrom
acsoto:fix/agent-runtime-examples

Conversation

@acsoto

@acsoto acsoto commented Jul 13, 2026

Copy link
Copy Markdown
Member

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 -q
  • ruff check sdk-python/examples/agent_runtime_usage.py
  • Kubernetes API server dry-runs for both changed manifests
  • Direct health, echo POST, and 404 checks against the embedded HTTP server

Does this PR introduce a user-facing change?:

Fix the AgentRuntime and PCAP analyzer examples so they use runnable and correctly addressed services.

Copilot AI review requested due to automatic review settings July 13, 2026 06:41
@volcano-sh-bot volcano-sh-bot added kind/bug Something isn't working kind/documentation Improvements or additions to documentation labels Jul 13, 2026
@volcano-sh-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from acsoto and additionally assign yaozengzeng for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread sdk-python/examples/agent_runtime_usage.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /echo endpoint.
  • Fixed the PCAP analyzer example’s ROUTER_URL to 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.

Comment thread sdk-python/examples/README.md
Comment thread sdk-python/examples/README.md
Comment thread sdk-python/examples/README.md
Comment thread example/agent-runtime/agent-runtime.yaml Outdated
@codecov-commenter

codecov-commenter commented Jul 13, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.56%. Comparing base (3b19390) to head (c18707f).
⚠️ Report is 21 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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     
Flag Coverage Δ
unittests 58.56% <ø> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings July 13, 2026 07:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread sdk-python/examples/agent_runtime_usage.py Outdated
Copilot AI review requested due to automatic review settings July 13, 2026 07:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread example/agent-runtime/agent-runtime.yaml
Copilot AI review requested due to automatic review settings July 13, 2026 07:49
@acsoto
acsoto force-pushed the fix/agent-runtime-examples branch from 6cb56e9 to a48cb77 Compare July 13, 2026 07:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread example/agent-runtime/agent-runtime.yaml
Comment thread sdk-python/examples/agent_runtime_usage.py Outdated
Comment thread sdk-python/examples/agent_runtime_usage.py Outdated
Copilot AI review requested due to automatic review settings July 13, 2026 07:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 13, 2026 08:04
@acsoto
acsoto force-pushed the fix/agent-runtime-examples branch from a48cb77 to c18707f Compare July 13, 2026 08:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread example/agent-runtime/agent-runtime.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/documentation Improvements or additions to documentation size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants