Skip to content

chore(genai): replace deprecated genai image generation model#10254

Draft
alarconesparza wants to merge 2 commits intoGoogleCloudPlatform:mainfrom
alarconesparza:alarconesparza-update-virtual-try-on-model-505834660
Draft

chore(genai): replace deprecated genai image generation model#10254
alarconesparza wants to merge 2 commits intoGoogleCloudPlatform:mainfrom
alarconesparza:alarconesparza-update-virtual-try-on-model-505834660

Conversation

@alarconesparza
Copy link
Copy Markdown
Contributor

Description

Fixes internal b/505834660

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration
  • Appropriate changes to README are included in PR
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • Tests pass: mvn clean verify required
  • Lint passes: mvn -P lint checkstyle:check required
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Apr 24, 2026
Copy link
Copy Markdown
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 updates the virtual try-on model ID to 'virtual-try-on-001' in the sample code and integration tests. It also removes the test scope for the 'google-cloud-storage' dependency in the pom.xml. A review comment points out that this dependency should remain in the test scope to avoid unnecessary compile-time dependencies and a larger artifact footprint.

Comment thread genai/snippets/pom.xml
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<scope>test</scope>
</dependency>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The google-cloud-storage dependency is only used in the test classes (e.g., ImageGenerationIT.java) for cleaning up test resources. Removing the test makes it a compile-time dependency, which is unnecessary for the sample snippets and increases the artifact's footprint. It should remain in the test scope.

            <scope>test</scope>
        </dependency>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gemini-code-assist build is failing if the scope is set to test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the build is failing with <scope>test</scope>, it is likely because the google-cloud-storage dependency is being used in the main source code (e.g., src/main/java/...) rather than just in the test source code. If the main code requires this library, it must be a compile-time dependency, and the <scope>test</scope> tag should indeed be removed. Please verify if any classes in src/main/java/ import com.google.cloud.storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant