Skip to content

add filters and reduce page size#88

Open
laurenleach wants to merge 1 commit into
mainfrom
lauren/page-size-and-filters
Open

add filters and reduce page size#88
laurenleach wants to merge 1 commit into
mainfrom
lauren/page-size-and-filters

Conversation

@laurenleach
Copy link
Copy Markdown
Contributor

No description provided.

@laurenleach laurenleach requested a review from a team March 16, 2026 17:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 16, 2026

Claude finished @laurenleach's task in 54s —— View job


PR Review: add filters and reduce page size

  • Gather context and review changes
  • Analyze code quality and correctness
  • Post review feedback

Overall: This PR looks good. The changes are well-targeted and address a real issue (Google's 412 "response size too large" error).

What the PR does

  1. Adds a field mask (userListFields) to the Users.List() call, requesting only the specific user fields the connector actually uses instead of the full response payload.
  2. Reduces MaxResults from 500 to 200 to further mitigate response size issues.

Review

Field coverage is complete — I verified that every user.* field accessed in userResource(), userProfile(), userStatus(), and related helpers is included in the userListFields constant:
id, primaryEmail, name, suspended, suspensionReason, archived, deletionTime, creationTime, lastLoginTime, thumbnailPhotoUrl, isEnrolledIn2Sv, orgUnitPath, includeInGlobalAddressList, organizations, relations, customSchemas, posixAccounts, externalIds, customerId — all present.

nextPageToken is correctly included as a separate top-level field alongside the nested users(...) selector, ensuring pagination continues to work.

The Get() method is unaffected — it doesn't use the field mask, which is appropriate since single-user fetches won't hit response size limits.

One minor note: The comment on line 87 says "with full projection" but the field mask means it's no longer truly a "full" projection in terms of response data — it's a full projection with field filtering. This is a nitpick and the current wording is fine since .Projection("full") is still being passed to the API.

No issues found. LGTM.

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.

1 participant