fix: update GkeCodeExecutor sandbox import from agentic_sandbox to k8s_agent_sandbox#4884
fix: update GkeCodeExecutor sandbox import from agentic_sandbox to k8s_agent_sandbox#4884leslyarun wants to merge 1 commit intogoogle:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
…s_agent_sandbox The k8s-agent-sandbox package renamed its module from `agentic_sandbox` to `k8s_agent_sandbox` in kubernetes-sigs/agent-sandbox#322 (Feb 18, 2026). The import in GkeCodeExecutor was added after the rename (Mar 2, 2026) but used the old module name, causing ImportError at runtime when using executor_type="sandbox". Also consolidates the runtime and TYPE_CHECKING imports into a single if/else block for maintainability. Fixes google#4883
bb2df51 to
5781294
Compare
|
Need to update the toml file as well. I will make a separate commit. |
Description
The
k8s-agent-sandboxpackage renamed its Python module fromagentic_sandboxtok8s_agent_sandboxin kubernetes-sigs/agent-sandbox#322 (merged Feb 18, 2026). TheGkeCodeExecutorsandbox support added in #4111 (merged Mar 2, 2026) used the old module name, causingImportErrorat runtime when usingexecutor_type="sandbox".Changes
src/google/adk/code_executors/gke_code_executor.py:from agentic_sandbox import SandboxClient→from k8s_agent_sandbox import SandboxClient(both runtime and TYPE_CHECKING imports)Testing
Before fix:
After fix:
Fixes #4883