Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix: query Google Groups one label at a time - #280

Open
samueli-efp wants to merge 1 commit into
razorpay:masterfrom
samueli-efp:samueli-efp/google-groups-label-queries
Open

samueli-efp wants to merge 1 commit into
razorpay:masterfrom
samueli-efp:samueli-efp/google-groups-label-queries

Conversation

@samueli-efp

Copy link
Copy Markdown

What and why

Closes #279

Cloud Identity rejects an OR between label conditions with INVALID_ARGUMENT, so membership refresh failed on every request when Google Groups was enabled (and list endpoints returned 503), and group search found nothing.

  • TransitiveGroupsForMember and SearchGroups now query the discussion and security labels separately and merge the results, deduplicating groups that carry both.
  • SearchGroups asks for the FULL view, since BASIC omits the labels mapGroup checks.
  • groups:search results carry no parent, so the parent is filled from the configured customer, which the query already restricts results to.

How it was tested

  • Replayed the old and new queries against a Workspace Enterprise Standard customer with the deployment's delegated credentials: the OR form returns 400, each single-label form returns 200 with the expected groups; search with FULL returns labels, without a parent.
  • Ran the same change (discussion-label-only variant) in production on v0.4.0: membership refresh, list pages and share-dialog group search all work.
  • go test ./api/internal/googlegroups/ ./api/internal/server/ and golangci-lint run on the package pass. Tests now assert one label per query, merging across labels, the FULL view and parentless search results.

Checklist

  • make lint and make test pass locally (ran lint and tests for the changed packages only)
  • Tests added or updated for the change
  • Docs updated if behaviour or configuration changed (no configuration change)
  • No breaking change

Cloud Identity rejects an OR between label conditions with
INVALID_ARGUMENT, so with Google Groups enabled every membership refresh
failed (and list endpoints returned 503) and group search found nothing.
Query the discussion and security labels separately and merge the
results. groups:search also needs the FULL view, since BASIC omits labels,
and its results carry no parent, so fill it from the configured customer
that the query already restricts to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.

Google Groups: membership refresh and group search fail against Cloud Identity

1 participant