Skip to content

Conversation

fredzqm
Copy link
Contributor

@fredzqm fredzqm commented Oct 13, 2025

Updated all dataconnect:* commands that previously used a positional argument for the service ID to use --service and --location flags instead.

This change improves the usability and consistency of the CLI.

The following commands were updated:

  • dataconnect:sql:migrate
  • dataconnect:sql:diff
  • dataconnect:sdk:generate
  • dataconnect:sql:grant
  • dataconnect:sql:setup
  • dataconnect:sql:shell

The pickService and loadAll functions in src/dataconnect/load.ts were also updated to support filtering by location.

Description

Scenarios Tested

Sample Commands

jrothfeder and others added 4 commits October 13, 2025 11:16
* feat(dataconnect): add confirmation for Gemini schema generation

Instead of directly asking for an app description to generate a schema with Gemini, this change first asks the user to confirm if they want to use Gemini.

If the user confirms, it then prompts for the app description with a default value of "an app for ${setup.projectId}".

* prompts

* changelog

* m

* feedback

* typo

* metrics

* Update index.ts

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Updated all `dataconnect:*` commands that previously used a positional argument for the service ID to use `--service` and `--location` flags instead.

This change improves the usability and consistency of the CLI.

The following commands were updated:
- `dataconnect:sql:migrate`
- `dataconnect:sql:diff`
- `dataconnect:sdk:generate`
- `dataconnect:sql:grant`
- `dataconnect:sql:setup`
- `dataconnect:sql:shell`

The `pickService` and `loadAll` functions in `src/dataconnect/load.ts` were also updated to support filtering by location.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

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

This pull request refactors the argument parsing for all dataconnect CLI commands, transitioning from positional arguments for service identification to explicit --service and --location flags. This change aims to enhance the clarity and consistency of the command-line interface, making it more intuitive for users to specify their target Data Connect services. The underlying service loading mechanisms were also adjusted to accommodate the new location-based filtering.

Highlights

  • CLI Command Argument Change: All dataconnect:* commands that previously used a positional argument for the service ID have been updated to use --service and --location flags instead, improving usability and consistency.
  • Updated Commands: The following commands now accept --service and --location flags: dataconnect:sql:migrate, dataconnect:sql:diff, dataconnect:sdk:generate, dataconnect:sql:grant, dataconnect:sql:setup, and dataconnect:sql:shell.
  • Service Loading Logic: The pickService and loadAll functions in src/dataconnect/load.ts were updated to support filtering Data Connect services by location.
  • Dependency Update: The ts-node dependency has been updated from ^10.4.0 to ^10.9.2.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

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.

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 is a great step towards improving the usability and consistency of the dataconnect:* commands by transitioning from positional arguments to flags. The changes are well-implemented across all the modified command files. My review includes a few suggestions to further enhance the code. I've recommended using commander's requiredOption for mandatory flags to make the code more idiomatic and consistent. Additionally, I've suggested an improvement to an error message to provide better context to the user when a location filter is applied.

@fredzqm fredzqm changed the title feat(dataconnect): Update dataconnect:* commands to use flags feat(dataconnect): Update dataconnect:* commands to use flags for --service & --location Oct 13, 2025
@fredzqm
Copy link
Contributor Author

fredzqm commented Oct 13, 2025

/gemini review

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 refactors the dataconnect:* commands to use --service and --location flags instead of positional arguments, which is a great improvement for usability and consistency. The changes in src/dataconnect/load.ts to introduce pickServices and pickOneService are well-structured.

I've added a few suggestions to improve error messages, enhance type safety in command actions, and fix a minor typo in tool descriptions. These changes should improve code clarity and maintainability.

@fredzqm fredzqm changed the base branch from master to next October 13, 2025 23:44
@fredzqm fredzqm changed the base branch from next to master October 13, 2025 23:47
@fredzqm fredzqm changed the base branch from master to next October 14, 2025 00:00
@fredzqm
Copy link
Contributor Author

fredzqm commented Oct 14, 2025

@joehan

To make the diff to next smaller. I created a PR to keep next up to date with master. #9313

@fredzqm fredzqm requested a review from joehan October 14, 2025 14:48
@fredzqm fredzqm requested a review from yuchenshi October 15, 2025 20:56
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.

4 participants