feat: add support for updating existing Agent Engine instances#755
Open
hanorik wants to merge 3 commits intogoogle:mainfrom
Open
feat: add support for updating existing Agent Engine instances#755hanorik wants to merge 3 commits intogoogle:mainfrom
hanorik wants to merge 3 commits intogoogle:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the capability to update an existing Agent Engine instance by adding --update and --instance_name flags to the deployment command. It implements the gcloudUpdateAgentEngine method, which utilizes the ReasoningEngineClient to update the source code and class methods of a specified instance. A review comment suggests that the update request should also include DeploymentSpec and AgentFramework fields to ensure consistency with the creation logic and to correctly manage environment variables and framework identifiers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces the ability to update an existing Vertex AI Reasoning Engine (Agent Engine) instance using the
adkgodeployment tool, removing the need to always deploy a new instance when changes are made.Key Changes
CLI Flags: Added two new persistent flags to the agentEngine deployment command:
--update: A boolean flag to trigger the update workflow.--instance_name: Specifies the full resource name of the Agent Engine instance to update (required if--updateis set).Update Workflow: Implemented
gcloudUpdateAgentEngine()to handle the update process:--instance_nameto set up the correct regional endpoint.ListClassMethodsto ensure the instance specification matches the code.FieldMask(spec.source_code_spec, spec.class_methods) to selectively update the instance via theaiplatformclient.Deployment Logic: Updated
deployOnagentEngineto route to the update logic when the flags are present.