CXP-860 Remove http-cache for requests with additional headers - #34
Conversation
…rt (CXP-860) uhttp's cache key doesn't include the on-behalf-of header, so every subuser's teammate list request collided with the parent account's cached response, silently suppressing every sub-account-only teammate. Bypass the cache for on-behalf-of requests with uhttp.WithNoCache(). GetTeammatesSubAccess also returns 403 by design for a teammate that only exists inside a subuser (subuser_access only applies to parent-account teammates), which aborted the whole Grants sync once those teammates started being emitted. Tolerate PermissionDenied there the same way listSubuserTeammates already does for List. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Connector PR Review: CXP-860 Remove http-cache for requests with additional headersBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThe new commit rewrites Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. |
|
Tested this branch against the live SendGrid account — built from It works. One thing worth considering before this gets approved: the sync went from 0 WARN to 18 WARN. That is 2 per sub-account teammate, and both are expected by design:
The connector swallows both immediately, but each line carries a full response-header dump (~1.4 KB), and together they are ~89% of the log: 73 lines / 28 KB at info level, versus 61 lines / 12 KB and zero warns on v0.1.3. That works out to roughly 2,000 lines / 2.8 MB per sync at 1,000 sub-account teammates. Not a defect, and the WARN is emitted by For reviewers: this is a connector-side workaround. The underlying SDK behaviour — |
|
One more note for reviewers, unrelated to the WARN observation above: this branch also bumps For the record, the bump does not change the behaviour this PR works around — |
Requires re-review. Concern addressed
…XP-860) uhttp's cache key ignores the on-behalf-of header, so a subuser-scoped write (no-cache read, unconditional write) could poison the shared cache entry for a later parent-scope read on the same path+query, causing isParentScopeTeammate to wrongly conclude a teammate exists at parent scope and suppress it from the sync. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
uhttp's cache key doesn't include the on-behalf-of header, so every subuser's teammate list request collided with the parent account's cached response, silently suppressing every sub-account-only teammate. Bypass the cache for on-behalf-of requests with uhttp.WithNoCache().
GetTeammatesSubAccess also returns 403 by design for a teammate that only exists inside a subuser (subuser_access only applies to parent-account teammates), which aborted the whole Grants sync once those teammates started being emitted. Tolerate PermissionDenied there the same way listSubuserTeammates already does for List.
Description
Useful links: