Skip to content

Conversation

@hivanalejandro
Copy link
Contributor

@hivanalejandro hivanalejandro commented Mar 27, 2025

Description

Fixes b/386956777

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

Checklist

@product-auto-label product-auto-label bot added api: compute Issues related to the Compute Engine API. samples Issues that are directly related to samples. labels Mar 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 @hivanalejandro, 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

This pull request migrates the region tag in the compute/sendgrid.js file. The changes involve adding // [START compute_sendgrid_nodejs] before the // [START compute_send] tag and adding // [END compute_sendgrid_nodejs] after the // [END compute_send] tag. This change is related to fixing issue b/386956777.

Highlights

  • Region Tag Migration: The region tag compute_sendgrid_nodejs is added to enclose the existing compute_send region tag in the compute/sendgrid.js file.

Changelog

  • compute/sendgrid.js
    • Added // [START compute_sendgrid_nodejs] before the // [START compute_send] tag.
    • Added // [END compute_sendgrid_nodejs] after the // [END compute_send] tag.
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.


Trivia time!

What is SendGrid's primary function?

Click here for the answer
SendGrid is a cloud-based email delivery platform that helps businesses with transactional and marketing email.

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

The pull request migrates a region tag in the compute/sendgrid.js file. The changes involve adding // [START compute_sendgrid_nodejs] and // [END compute_sendgrid_nodejs] tags to delineate the Sendgrid example code block. The changes look straightforward and the addition of the tags helps to clearly define the scope of the example.

Merge Readiness

The pull request appears to be ready for merging. The changes are simple and well-defined, and the addition of the region tags improves the clarity of the code. I am unable to directly approve the pull request, and recommend that others review and approve this code before merging.

@eapl-gemugami
Copy link
Contributor

eapl-gemugami commented Mar 27, 2025

@hivanalejandro suggestion: as a region tag migration requires 3 steps (Add valid region tags, update docs, delete invalid region tags), I'd recommend to add more context to the PR title, so we could avoid having PRs with duplicate titles in the future which may confuse the reviewers.
The step number could be enough.

See Python PR #13145 for an example.


'use strict';

// [START compute_sendgrid_nodejs]
Copy link
Contributor

@eapl-gemugami eapl-gemugami Mar 27, 2025

Choose a reason for hiding this comment

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

issue: As this file is Javascript source code, the language suffix SHOULD NOT be included in the region tag. See the internal naming guide for advice.
compute_sendgrid could be enough in this context.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, check the internal issue for the description from the reporter. It specifies the requested region tag.

Copy link
Contributor

@eapl-gemugami eapl-gemugami left a comment

Choose a reason for hiding this comment

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

LGTM

@hivanalejandro hivanalejandro marked this pull request as ready for review March 27, 2025 21:44
@hivanalejandro hivanalejandro requested review from a team as code owners March 27, 2025 21:44
@snippet-bot
Copy link

snippet-bot bot commented Mar 27, 2025

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@eapl-gemugami eapl-gemugami added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 31, 2025
Copy link
Contributor

@glasnt glasnt left a comment

Choose a reason for hiding this comment

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

Change is fine, CI is broken (helping correct in #4058)

@glasnt glasnt merged commit dc572e0 into main Apr 2, 2025
12 of 14 checks passed
@glasnt glasnt deleted the hivanalejandro-migrate-region-step1-386956777 branch April 2, 2025 04:06
rudrakhsha-crest pushed a commit to rudrakhsha-crest/nodejs-docs-samples that referenced this pull request Apr 18, 2025
* chore(compute): Migrate region tag

* chore(compute): Rename region tag
rudrakhsha-crest added a commit to rudrakhsha-crest/nodejs-docs-samples that referenced this pull request Apr 18, 2025
* chore(compute): Migrate region tag

* chore(compute): Rename region tag
rudrakhsha-crest added a commit to rudrakhsha-crest/nodejs-docs-samples that referenced this pull request Apr 18, 2025
* chore(compute): Migrate region tag

* chore(compute): Rename region tag
rudrakhsha-crest added a commit to rudrakhsha-crest/nodejs-docs-samples that referenced this pull request Apr 18, 2025
* chore(compute): Migrate region tag

* chore(compute): Rename region tag
rudrakhsha-crest pushed a commit to rudrakhsha-crest/nodejs-docs-samples that referenced this pull request Apr 18, 2025
* chore(compute): Migrate region tag

* chore(compute): Rename region tag
utsav1810 pushed a commit that referenced this pull request May 19, 2025
* Added CRUD code snippets with codeowners file

* Solved linting errors

* Added sanitization code snippets along with test cases

* Added header comment

* Removed hardcoded value from test file

* Removed crud related files

* Addressed gemini bot comments

* Updated prompts, tests and log statements for sanitization APIs

* chore(cloud-sql): migrate mysql, postgres samples to new CI (#4055)

* chore(cloud-sql): migrate mysql, postgres samples to new CI

* rename to match postgres version

* acquireTimeout warns in mysql2, remove

* mysql2 query returns [results, fields], so only return fields

* remove unused test scripts

* revert bot-suggested rename: would cause excessive region tag change

* chore(compute): Migrate region tag (#4047)

* chore(compute): Migrate region tag

* chore(compute): Rename region tag

* chore(compute): Renove older region tag (#4062)

overriding failure as this is jsut removing the region tag.

* feat: support testing on forked repos (#4057)

* feat: support testing on forked repos

* add pull_request to test on PR

* remove prod suffix

* decode json on matrix paths

* add experimental to check names

* add experimental to job names

* run test only if paths is not empty

* test explicitly against empty array

* move experimental as a prefix

* success check if no paths are found

* always set check to done

* remove pull_request trigger

* rearrange if check

* add more comments

* fix: add id-token to workflows (#4063)

* feat: support testing on forked repos

* add pull_request to test on PR

* remove prod suffix

* decode json on matrix paths

* add experimental to check names

* add experimental to job names

* run test only if paths is not empty

* test explicitly against empty array

* move experimental as a prefix

* success check if no paths are found

* always set check to done

* remove pull_request trigger

* rearrange if check

* add more comments

* fix: add id-token to workflows

* chore: update the minimum language based on maintenance mode

* chore(deps): pin dependencies (#4035)

* Added region tags to snippets

* Updated region tags for code snippets based on errors

* Removed extra csam assertions in sanitization tests

* Addressed review comments

* Updated test cases for sanitization snippets, added test for rai filter

* Updated tests as per review comments

* updated commented variables sample values in code snippets

* Addressed review comments and updated tests accordingly

* removed-todo-developer-comments

* add-new-line-eslintrc

* fix-linting-warnings-and-errors

* fixed-tests

* revert-security-center-change

* revert-security-center-change

* revert-security-center-change

* fix-minor-lint

---------

Co-authored-by: Eric Schmidt <[email protected]>
Co-authored-by: Harsh Nasit <[email protected]>
Co-authored-by: harshnasitcrest <[email protected]>
Co-authored-by: David Cavazos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: compute Issues related to the Compute Engine API. kokoro:force-run Add this label to force Kokoro to re-run the tests. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants