Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces field masking support for Data Connect service, schema, and connector API calls to improve performance and reduce payload sizes. The changes include updating client methods to accept optional field arrays, modifying command-line tools and deployment logic to utilize these masks, and updating corresponding unit tests. Per the repository style guide, I have flagged several instances where static configuration arrays should be extracted to top-level constants and marked as 'as const' or 'readonly' to avoid unnecessary re-allocation and ensure consistency.
Contributor
|
Thank you! Did an audit
|
fredzqm
approved these changes
Nov 18, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
NOTE: This CL replaces #11321 (identical commits). Re-opened from an in-repo branch because the CI workflow now only runs integration tests for PRs whose head branch lives in
firebase/firebase-tools; fork-based PRs leave the required integration checks permanently "expected".Context: b/534865211
Specifying precise field masks will ensure we only request the fields we actually need, allowing the backend to optimize resource usage and compute expensive fields on-demand.
Note: this change excludes cross-location aggregate list requests (
.../locations/-/...), which do not yet support field masks (b/442666798).Scenarios Tested (paste into PR)
dataconnect:services:list— per-serviceGetSchemasendsfields=datasources,updateTime,ListConnectorssendsfields=connectors.name,connectors.updateTime,nextPageToken. Table output (instance, database, schema/connector update times) matches unmaskedcurlof the same resources.deploy --only dataconnect --dry-run—ensureServiceIsConnectedToCloudSqlfetches the schema with nofieldsparam (full object, all 8 keys) before thevalidateOnlyupsert. Confirms both the full-fetch-before-upsert fix and that an empty mask omits the parameter entirely.deploy --only dataconnect(new service, schema + 2 connectors) — end-to-end create: service LRO, Cloud SQL link, SQL migration, connectors. Release phase issuesListConnectors/ListSchemaswithfields=<name>,nextPageToken; deploy completes.deploy --only dataconnectafter removing one connector locally — maskedListConnectors(name-only) still identifies the orphanedsecondconnector;DELETE …/connectors/secondis issued and succeeds.nextPageTokenmasking behaviour (curl,ListServices?pageSize=1) — maskservices.name→nextPageTokenstripped;services.name,nextPageToken→ present;fields=(empty) → full response.client.spec.ts,release.spec.ts(nock URLs assert the masks),schemaMigration.spec.ts,init/dataconnect/index.spec.ts— all passing.Sample Commands (paste into PR)