fix: add deployment_target to conditional config for adk_live service.tf exclusion#725
Conversation
….tf exclusion The conditional logic to exclude service.tf files for adk_live + agent_engine was failing because the deployment_target key was missing from the conditional_config dict. This caused Terraform to create source-based agent engines while deploy.py tried to update them with pickle-based deployment, resulting in API errors.
Summary of ChangesHello @eliasecchig, 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 deployment issue for 'adk_live' agents targeting the 'agent_engine'. The problem was caused by a missing 'deployment_target' key in the conditional configuration, which prevented the correct exclusion of 'service.tf' files. By adding this key, the system can now properly evaluate conditional logic, ensuring successful deployments and avoiding Terraform conflicts. Highlights
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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses a bug causing deployment failures for adk_live agents on agent_engine. The root cause was a missing deployment_target key in the conditional_config dictionary, which prevented the conditional exclusion of service.tf files. The fix correctly adds this key, resolving the issue as described. The change is simple, accurate, and well-implemented.
….tf exclusion (GoogleCloudPlatform#725) The conditional logic to exclude service.tf files for adk_live + agent_engine was failing because the deployment_target key was missing from the conditional_config dict. This caused Terraform to create source-based agent engines while deploy.py tried to update them with pickle-based deployment, resulting in API errors.
Summary
Problem
E2E tests were failing when deploying adk_live agents to agent_engine:
The conditional logic to exclude service.tf files for adk_live + agent_engine
was never triggering because the deployment_target key was missing from the
conditional_config dict in template.py.
Solution
Added "deployment_target": deployment_target to the conditional_config dict
at line 1633. This allows the existing _exclude_adk_live_agent_engine
condition to properly evaluate and exclude service.tf files for adk_live
agents, preventing Terraform from creating conflicting agent engine resources.