Skip to content

fix(cli): use Artifact Registry for Agent Engine deployment#435

Closed
anshulchikhale30-p wants to merge 3 commits into
google:mainfrom
anshulchikhale30-p:anshulchikhale30-p-patch-1
Closed

fix(cli): use Artifact Registry for Agent Engine deployment#435
anshulchikhale30-p wants to merge 3 commits into
google:mainfrom
anshulchikhale30-p:anshulchikhale30-p-patch-1

Conversation

@anshulchikhale30-p

@anshulchikhale30-p anshulchikhale30-p commented Jun 14, 2026

Copy link
Copy Markdown

#429

Replace deprecated gcr.io image registry with Artifact Registry (pkg.dev) for Agent Engine deployments and improve error handling for Vertex AI API responses.

Please ensure you have read the "contribution guide" (https://google.github.io/adk-docs/contributing-guide/) before creating a pull request.

Link to Issue or Description of Change

  1. Link to an existing issue (if applicable):
  • Closes: N/A
  • Related: N/A
  1. Or, if no issue exists, describe the change:

This PR updates the Agent Engine deployment workflow to use Artifact Registry ("*.pkg.dev") instead of the deprecated "gcr.io" registry and improves deployment error visibility by surfacing Vertex AI API errors before processing the deployment response.

Problem:

  • Agent Engine deployments currently generate container image URLs using "gcr.io".
  • Artifact Registry ("pkg.dev") is the recommended registry for modern Google Cloud deployments.
  • Deployment failures returned by the Vertex AI Agent Engine API are not explicitly handled, making debugging more difficult.

Solution:

  • Replace the generated container image URL from "gcr.io" to Artifact Registry format ("${region}-docker.pkg.dev/${project}/${repository}/...").
  • Add explicit checks for "apiResponse.error" and throw a descriptive error when deployment fails.
  • Keep the existing deployment workflow unchanged apart from registry selection and error reporting.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

No new unit tests were added.

Manual End-to-End (E2E) Tests:

  • Reviewed the deployment flow and image URI generation logic.
  • Verified that the generated image path uses Artifact Registry format.
  • Verified that API errors are surfaced before processing the deployment response.

Checklist

  • I have read the "CONTRIBUTING.md" (https://github.com/google/adk-js/blob/main/CONTRIBUTING.md) document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

This change aims to align Agent Engine deployments with current Google Cloud container registry recommendations while improving troubleshooting when Vertex AI deployment operations return errors.._

Replace deprecated gcr.io image registry with Artifact Registry (pkg.dev) for Agent Engine deployments and improve error handling for Vertex AI API responses.
@google-cla

google-cla Bot commented Jun 14, 2026

Copy link
Copy Markdown

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.

@AmaadMartin

Copy link
Copy Markdown
Collaborator

Thank you so much for kicking this off! This is a high-priority feature that we need to get merged as soon as possible. To expedite the process and ensure full test coverage, I’ve built upon your initial work and split the implementation into two separate PRs: #440 and #441.

Since those PRs fully cover this functionality, I'm going to close this one. We really appreciate you highlighting this and getting the momentum going. Looking forward to your future contributions!

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.

2 participants