Skip to content

Add explicit field_mask to Data Connect getConnector call#10799

Open
fredzqm wants to merge 4 commits into
mainfrom
dataconnect-getconnector-fields-4339466892693943361
Open

Add explicit field_mask to Data Connect getConnector call#10799
fredzqm wants to merge 4 commits into
mainfrom
dataconnect-getconnector-fields-4339466892693943361

Conversation

@fredzqm

@fredzqm fredzqm commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Updated getConnector in src/dataconnect/client.ts to explicitly specify the fields parameter ("name,source"), resolving an issue where the get call for Connectors used the default * instead of detailing the required fields explicitly.


PR created automatically by Jules for task 4339466892693943361 started by @fredzqm

Co-authored-by: fredzqm <9068391+fredzqm@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request updates the getConnector function in src/dataconnect/client.ts to limit the returned fields to "name,source" using query parameters. The reviewer pointed out that this restriction will omit other fields defined in the types.Connector interface, such as client_cache, which may be required by callers of this function. They suggested including client_cache in the fields mask to prevent potential issues.

Comment thread src/dataconnect/client.ts Outdated
const res = await dataconnectClient().get<types.Connector>(name);
const res = await dataconnectClient().get<types.Connector>(name, {
queryParams: {
fields: "name,source",

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 types.Connector interface (defined in src/dataconnect/types.ts) includes a client_cache field. By explicitly limiting the fields query parameter to "name,source", the client_cache field (and potentially other fields like createTime or updateTime from BaseResource) will be omitted from the response. If these fields are needed by any callers of getConnector, they should be included in the fields mask.

Suggested change
fields: "name,source",
fields: "name,source,client_cache",

fredzqm and others added 3 commits July 14, 2026 17:42
Co-authored-by: fredzqm <9068391+fredzqm@users.noreply.github.com>
Co-authored-by: fredzqm <9068391+fredzqm@users.noreply.github.com>
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.

2 participants