Repository navigation
[CXP-1251] - Promote v0.2.6-test to main: paginate group member grants - #85
agustin-conductor wants to merge 1 commit into
Conversation
…B response limit (#81) * Paginate group and workspace member grants to stay under Lambda payload limit Databricks returns every group member in a single Get group response and has no member pagination. Grants() emitted one grant per member in one response, so a group with ~11k+ members (e.g. an all-users account group) exceeded the 6MB Lambda response limit and failed with HTTP 413 on every retry. Page members locally (GrantsPageSize = 2000, ~1.1MB per page) using the page token as a member offset, and emit role rule-set grants on the first page only. Databricks returns members in a different order on every call, so they are sorted before slicing so pages line up across re-fetches in separate Lambda invocations. Apply the same paging to workspace assignment grants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Page member grants by last emitted key instead of offset An offset page token into a list that is re-fetched for every page drifts when members are added or removed between page invocations: a removal skips the first member of the next page (C1 reads that grant as revoked) and an addition grants one member twice. Store the key of the last emitted item (member Ref for groups, principal ID for workspaces) and start the next page after it, so membership churn no longer shifts page boundaries. Add churn tests for both paths, a workspace multi-page test, and mark the test-only shuffle as not security sensitive for gosec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Superseded — see the current review report for commit
|
Connector PR Review: [CXP-1251] - Promote v0.2.6-test to main: paginate group member grantsBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThis PR changes
I scanned the full PR diff for security and correctness and checked these behaviors against the code:
I applied the repo-local criteria:
New tests cover multi-page grants, members added or removed between pages, and the single-page case for small groups. Coverage gap: I did not verify the description's claim that Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. Reviewed commit: |
There was a problem hiding this comment.
No blocking issues found — see the full review report
|
Closing in favor of a promotion PR from a branch at the v0.2.6-test commit, so the PR head is exactly the validated commit. |
Promotes the change validated in the
v0.2.6-testrelease tomain.This contains only #81 (
6384cfa1), cherry-picked onto the currentmain.stagingalso has later changes (Unity Catalog metastore sync #70 and incremental sync #56) that weren't part of the validated release, so this PR doesn't mergestagingas a whole.mainhas received dependency bumps since the tag was cut, so the commit was cherry-picked rather than taken from the tag directly. It applied with no conflicts, andpkg/andcmd/are identical tov0.2.6-test.Change (from #81)
Group and workspace member grants are now paged locally, 2000 per page, using a key cursor, so a single
Grantsresponse stays under the 6MB Lambda payload limit. Previously, large groups failed with HTTP 413 insync-grants-for-resource.Checks
go build ./...andgo test ./...pass on the cherry-picked branch.golangci-lint run ./...reports 0 issues.🤖 Generated with Claude Code