BulkRoleCache.prefetch caches the legacy loop variable for openedx-authz roles
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- authorization, backend
Línea de trabajo
Start in common/djangoapps/student/roles.py at BulkRoleCache.prefetch and trace both the legacy and openedx-authz loops. Reproduce the authz-only and mixed-batch cases with the described in-memory fixtures, then add regression coverage showing each user/course cache contains its own assignment and both cases pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Checked 2026-09-30: master source at ca039029e4918f02903b1c7d62adf8b3ad74f75b and release/verawood source at 18ce9a9c2b20c745b0ee94f615c13855acd9624b. Both carry this code path. This is a source diagnostic; no upstream full integration suite or production mutation ran.
The openedx-authz loop iterates over its own role but inserts compat_role, which belongs to the preceding legacy loop.
Reproduction:
- Give an author an openedx-authz course assignment with no legacy CourseAccessRole rows in the prefetch batch.
- Call BulkRoleCache.prefetch for that batch. The first authz assignment raises UnboundLocalError.
- Repeat with a legacy role present, on another course. The authz course cache receives the last legacy role instead of that author's authz role.
An isolated execution of the current native function body with in-memory model/role fixtures reproduces both outcomes on master and Verawood. Changing only the insertion to the current authz loop role makes both controls cache the expected authz role. This is not a full Django/authorization integration claim.
Expected: authz-only and mixed batches cache their own per-user/course assignments, independent of which legacy role was last enumerated. Suggested regression controls are both cases above, including distinct courses and users.
Duplicate checks: current issue/PR searches for BulkRoleCache and compat_role. #38984 concerns platform-wide scope conversion, not this loop variable; #38943 concerns grade-report query cost. I found no report for this insertion case in those results.
- Lenguaje dominante
- Python
- Estrellas
- 8.2k
- Forks
- 4.4k
- Merge medio
- 2 d 10 h
- PR fusionados (30 d)
- 40
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de openedx/openedx-platform
-
Discussion API: missing thread returns 500 (ForumV2RequestError not mapped to ThreadNotFoundError)Quizá libre de nuevo @mbhavu2007-lang la tomó hace 17 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
openedx/openedx-platform#39225 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
v3 notification preferences: PUT with email_cadence but no notification_channel raises KeyError (500)Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
openedx/openedx-platform#39221 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
openedx/openedx-platform#39169 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
openedx/openedx-platform#39084 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 82/100
openedx/openedx-platform#38792 ·
Los mantenedores suelen responder en 1 día
Todos los issues de openedx/openedx-platform
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
readthedocs/readthedocs-builder#73 ·
Los mantenedores suelen responder en 1 día
-
area: ci bug good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
hffgzktbcc-blip/ounce-core#484 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
vllm-project/vllm-torchtpu#3395 ·
Los mantenedores suelen responder en 1 día
-
Hermes plugin: MITM-domain discovery misses the model: block (provider/base_url nested under model:) — traffic blind-tunnels silently, zero compressionPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
ranxianglei/billion-context#7063 ·
Los mantenedores suelen responder en 1 día