You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
background_tasks: restore_tenant stores "" for the task owner, which leaks between signal tests #861
Found while moving `background_tasks` to the module layout (#859). Under the new collection order, a signals test ran its prerun handler without a postrun. That left `_task_owner` at `""`, and owner stamping then failed in four later tests. #859 makes that test call `release_tenant(task_id=...)`, the same call the real postrun handler makes.
The underlying fragility is in the source: `restore_tenant` sets the owner to `""` where `None` would fall through to `current_user_id`. A worker that runs a prerun without its matching postrun (crash, revoked task) could therefore stamp the wrong owner on the next task in that thread. Worth checking whether `None` is the intended reset value and adding a regression test.
Activity
test: fix flaky/order-dependent tests (#855 #860 #861) and drop LEGAC…