Skip to content

Conversation

glasnt
Copy link
Contributor

@glasnt glasnt commented May 27, 2025

Description

  • Please merge this PR for me once it is approved

Note: Any check with (dev), (experimental), or (legacy) can be ignored and should not block your PR from merging (see CI testing).

@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: aiplatform Issues related to the AI Platform API. labels May 27, 2025
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.

Hello @glasnt, 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!

Summary of Changes

Hello! Gemini or gemini-code-assist here, providing a summary of this pull request. Based on the title, description, and the changes presented in the patch, the primary intent of this PR is to update the Continuous Integration (CI) configuration for the ai-platform/snippets tests. Specifically, it moves these tests from the list of tests that were previously failing or marked as TODO in the main production CI configuration (nodejs.jsonc) to the list of tests that are skipped in the development CI configuration (nodejs-dev.jsonc). Additionally, a new CI setup file is introduced for the ai-platform/snippets directory, likely to configure necessary secrets for these tests to run correctly in a different CI context.

Highlights

  • CI Configuration Update: The ai-platform/snippets tests have been removed from the main CI configuration's skip list (where they were marked as failing/TODO) and added to the development CI configuration's skip list.
  • Secret Configuration for AI Platform Snippets: A new file, ai-platform/snippets/ci-setup.json, has been added to define specific secrets required for the ai-platform/snippets tests, mapping the CAIP_PROJECT_ID to a secret path.

Changelog

  • .github/config/nodejs-dev.jsonc
    • Added "ai-platform/snippets" to the list of tests skipped in the development CI configuration.
  • .github/config/nodejs.jsonc
    • Removed "ai-platform/snippets" from the list of tests skipped in the main production CI configuration (specifically from the TODO section).
  • ai-platform/snippets/ci-setup.json
    • Added a new file to configure secrets for the ai-platform/snippets tests, defining the CAIP_PROJECT_ID secret.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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.


CI runs the tests,
Green checks bring happy rests,
Red means fix the code.

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 aims to migrate and fix the CI setup for ai-platform/snippets, primarily by introducing a ci-setup.json file to provide the necessary CAIP_PROJECT_ID secret and updating CI configuration files. The changes appear to address the previously noted PERMISSION_DENIED errors. One point of clarification regarding the new secret configuration would be beneficial.

Summary of Findings

  • Clarity of CI Secret Configuration: The format and resolution mechanism for the secret path specified in ai-platform/snippets/ci-setup.json ("nodejs-docs-samples-tests/nodejs-docs-samples-ai-platform-caip-project-id") could be clarified. Ensuring this path is correctly interpreted by the CI system is crucial for the effectiveness of the fix intended by this PR.

Merge Readiness

The changes in this PR are targeted at fixing CI issues for ai-platform/snippets, which is a valuable improvement. However, there is a medium-severity concern regarding the clarity and correctness of the new secret configuration in ai-platform/snippets/ci-setup.json. It's recommended to address the request for clarification on how the secret path is resolved before merging this PR. As a reviewer, I am not authorized to approve pull requests; please ensure further review and approval from authorized maintainers after addressing the feedback. Once the clarification confirms the secret configuration is robust, the PR should be in good shape.

@@ -0,0 +1,5 @@
{
"secrets": {
"CAIP_PROJECT_ID": "nodejs-docs-samples-tests/nodejs-docs-samples-ai-platform-caip-project-id"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This new ci-setup.json is a key part of resolving the permission issues for ai-platform/snippets. To ensure this configuration is effective, could you clarify the format and resolution mechanism for the secret path "nodejs-docs-samples-tests/nodejs-docs-samples-ai-platform-caip-project-id"?

Specifically:

  • How does the CI system interpret this string to fetch the secret? For instance, is nodejs-docs-samples-tests the GCP project ID where the secret is stored, and nodejs-docs-samples-ai-platform-caip-project-id the name of the secret itself?
  • Is this a standard convention within your CI, or if it's intended as a direct path, how does it align with typical Google Cloud Secret Manager path formats (e.g., projects/PROJECT_ID/secrets/SECRET_NAME/versions/latest)?

Confirming this will help ensure the CAIP_PROJECT_ID is correctly supplied to the tests. A brief note in the PR description or a comment in the file about this convention could also be beneficial for future maintainers.

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

Labels

api: aiplatform Issues related to the AI Platform API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant