Skip to content

fix: add deployment_target to conditional config for adk_live service.tf exclusion#725

Merged
eliasecchig merged 1 commit intomainfrom
fix/adk-live-service-tf-exclusion
Jan 21, 2026
Merged

fix: add deployment_target to conditional config for adk_live service.tf exclusion#725
eliasecchig merged 1 commit intomainfrom
fix/adk-live-service-tf-exclusion

Conversation

@eliasecchig
Copy link
Collaborator

Summary

  • Fix adk_live agent_engine deployment failures
  • Add missing deployment_target key to conditional_config dict
  • Enable proper exclusion of service.tf files for adk_live agents

Problem

E2E tests were failing when deploying adk_live agents to agent_engine:

Error: Cannot update the agent engine deployed with spec.deployment_source 
to use spec.package_spec

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.

….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.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Fix adk_live agent deployment failures: Resolved E2E test failures that occurred when deploying adk_live agents to agent_engine by addressing an issue with conditional file exclusion.
  • Add deployment_target to conditional_config: Included the missing 'deployment_target' key and its corresponding value in the 'conditional_config' dictionary within 'template.py'.
  • Enable proper exclusion of service.tf files: Ensured that the conditional logic correctly triggers to exclude 'service.tf' files for adk_live agents, thereby preventing Terraform from creating conflicting agent engine resources.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

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

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 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.

@eliasecchig eliasecchig merged commit 493432c into main Jan 21, 2026
34 checks passed
enriquekalven pushed a commit to enriquekalven/agent-starter-pack that referenced this pull request Feb 7, 2026
….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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant