openedx / openedx/openedx-platform

Ensure that crum request-fetching middleware is async-safe

Open
#38,707 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.2k
Forks
4.4k
Avg merge
6d 18h
Merged PRs (30d)
42

Description

We still rely on crum in openedx-platform, which is not natively async-safe. We may need to wrap those calls in Django's sync_to_async wrappers.

An alternative is to replace our usage of crum with something else. We mostly use it to get the user for the current request from deep within the stack. It looks like crum has not been updated in a long time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Search openedx-platform for crum usage, then inspect the request-fetching middleware and Django async boundaries; decide whether sync_to_async wrapping or replacing crum is appropriate, with current-request user lookup remaining safe in async code as the completion criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.