New issue
Advanced search Search tips

Issue 902372 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

sync auth funcs make async calls

Project Member Reported by no...@chromium.org, Nov 6

Issue description

NDB has a rule that 
  given an async func F1 calling sync func F2
F2 may not make RPCs.

auth lib violates this rule, especially in tests: auth.is_group_member may fetch authdb while being called synchronously from an async func, i.e. there is no protection. It happens to work because in prod we prefetch db before calling application code. This caused a deadlock in buildbucket tests and 2-3h of head-scratching and bisection-by-commenting-parts-of-code. The workaround was to call auth_testing.clear_local_state() and auth.warmup() in setUp().

 
workaround: mock auth API calls
Status: Available (was: Untriaged)

Sign in to add a comment