Skip to content

Conversation

@thiyaguk09
Copy link
Owner

Description

Fixes #

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

Checklist

  • I have followed guidelines from CONTRIBUTING.MD and Samples Style Guide
  • Tests pass: npm test (see Testing)
  • Lint pass: npm run lint (see Style)
  • Required CI tests pass (see CI testing)
  • 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)
  • This pull request is from a branch created directly off of GoogleCloudPlatform/nodejs-docs-samples. Not a fork.
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new sample directory, and I created GitHub Actions workflow 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

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

Copy link

@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 introduces a set of new Node.js samples for Google Cloud Storage Batch Operations, covering essential functionalities like creating, retrieving, listing, canceling, and deleting jobs. My review highlights a recurring critical issue across all the new JavaScript files: asynchronous operations are not being properly awaited. This could cause the scripts to terminate prematurely before the operations complete. I have provided suggestions to refactor the code to use async/await correctly and implement a more robust error handling pattern. Additionally, I've noted a minor naming inconsistency in one file and a formatting issue in the package.json file.

@thiyaguk09 thiyaguk09 marked this pull request as ready for review September 12, 2025 07:18
@thiyaguk09 thiyaguk09 force-pushed the storagebatchoperations-samples branch from e7476df to c1d08bd Compare September 12, 2025 07:52
@thiyaguk09 thiyaguk09 force-pushed the storagebatchoperations-samples branch from c1d08bd to b424e2c Compare September 22, 2025 08:15
@thiyaguk09 thiyaguk09 force-pushed the storagebatchoperations-samples branch from fb51efe to 6f5d870 Compare October 17, 2025 13:38
Guiners and others added 7 commits October 22, 2025 17:03
* fixing tools-code-exec-with-txt.js

* fixing code from code review and adding linters

* fixing code from code review and adding linters

* linting

* Update genai/test/tools-google-search-with-txt.test.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* fixing functions names

* code review fixes

* sample update

* making timeout longer for ctrlgen-with-nullable-schema

---------

Co-authored-by: Guiners <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Sampath Kumar <[email protected]>
* update package.json

* adding new samples

* adding new samples

* adding new samples

* Update genai/tools/tools-urlcontext-with-txt.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update genai/test/tools-google-maps-coordinates-with-txt.test.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update genai/test/tools-google-search-and-urlcontext-with-txt.test.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update genai/test/tools-urlcontext-with-txt.test.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* adding new samples

* changed way of printing data

* changing response.candidates loop

* codereview fixes, url update

---------

Co-authored-by: Guiners <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Eric Dong <[email protected]>
…on & Error Handling)

Improve the robustness and clarity of the Storage Batch Operations API
samples:

* **Error Handling:** Wraps all asynchronous Batch Operations API
samples (Create, Get, List, Cancel) in `try...catch` blocks for
production readiness.
* **Specific Diagnostics:** Adds specific gRPC error code checks
(`NOT_FOUND`, `FAILED_PRECONDITION`) within the `catch` blocks to
provide detailed diagnostic feedback to users regarding job state or
non-existence.
* **Documentation:** Clarifies JSDoc for all function parameters (e.g.,
`projectId`, `jobId`, `objectPrefix`), ensuring examples and types are
clear for developers.
@thiyaguk09 thiyaguk09 force-pushed the storagebatchoperations-samples branch from 6f5d870 to 7dceecc Compare October 24, 2025 06:51
thiyaguk09 and others added 11 commits October 24, 2025 07:21
* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* fixing functions names

* linter changes and gemini code review fixes

* renamed sc to serverContent

* fixing package.json and adding delay to test

* adding mock to live-txt-with-audio test

* adding mock to live-ground-ragengine-with-txt

---------

Co-authored-by: Guiners <[email protected]>
Co-authored-by: Eric Dong <[email protected]>
* adding samples

* adding samples

* adding samples

* adding new samples

* adding new samples

* adding new samples

* adding new samples

* adding new samples

* adding new samples

* Update genai/image-generation/imggen-mmflash-locale-aware-with-txt.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update genai/image-generation/imggen-mmflash-multiple-imgs-with-txt.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fixing samples

* fixing samples

* fixing samples

* fix(genai): fix misspelled word based on suggestion from @gemini-code-assist[bot]

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* sample update

* model update

* test fix

* test fix

* test fix

* test fix

* adding delay and retries for textgen tests

* textgen-with-pdf test fix

---------

Co-authored-by: Guiners <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Davis <[email protected]>
Co-authored-by: Eric Dong <[email protected]>
* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* adding samples, test, lints

* fixing functions names

* linter changes and gemini code review fixes

* changing response.candidates loop

* renaming sc to ServerContent

* adding mock to live-conversation-audio-with-audio

* adding mock to live-conversation-audio-with-audio

* fixing prompt message

* Example output

* hardcoded values fix

* hardcoded values fix

---------

Co-authored-by: Guiners <[email protected]>
Co-authored-by: Eric Dong <[email protected]>
…dPlatform#4192)

* Update quickstart samples to Nodejs24

* Delete appengine/building-an-app/build/.gcloudignore

---------

Co-authored-by: Jennifer Davis <[email protected]>
* updating package.json

* updating SDK version to 1.30.0

---------

Co-authored-by: Guiners <[email protected]>
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.

6 participants