COURSE_ENROLLMENT_CREATED signal fired twice for a single enrollment

未关闭
#39,002 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
python
领域
backend

调研方向

通过 UI 或注册 API 复现注册流程,同时记录 COURSE_ENROLLMENT_CREATED 的 event_metadata.id。跟踪 edx-platform 中信号的发出路径,并在一次注册操作恰好产生一个事件且只有一个唯一 id 时确认完成。

由索引模型根据 Issue 内容生成。

描述

Description

On a local tutor setup, enrolling one user into one course results in COURSE_ENROLLMENT_CREATED being emitted twice, each with a distinct event_metadata.id. This was observed via a downstream receiver (webhook forwarder) that logged two separate deliveries for what should be a single enrollment action:

event_type event_id timestamp
org.openedx.learning.course.enrollment.created.v1 b9fed4e4-9bb3-11f1-b47b-8665a19c74ef Aug. 19, 2026, 9:52 a.m.
org.openedx.learning.course.enrollment.created.v1 b9de5ffc-9bb3-11f1-91fa-8665a19c74ef Aug. 19, 2026, 9:52 a.m.

Since the two events have different event_metadata.id values, this isn't a case of a receiver being connected twice (that would redeliver the same event id) — the event is being emitted twice by edx-platform itself for the same enrollment action.

Steps to reproduce

  1. On a dev setup, enroll a single user in a single course (via UI or enrollment API).
  2. Have a receiver connected to COURSE_ENROLLMENT_CREATED (e.g. logging the metadata.id of each call).
  3. Observe two invocations with different event_metadata.id for the same enrollment.

Expected behavior

One enrollment action should emit exactly one COURSE_ENROLLMENT_CREATED event.

Actual behavior

Two events are emitted with distinct ids, seconds apart, for the same user/course enrollment.

Environment

  • tutor 22.0.0 openedx verawood.1
  • Open edX Events: openedx_events.learning.signals.COURSE_ENROLLMENT_CREATED
主要语言
Python
星标
8.2k
派生
4.4k
平均合并
2 天 10 小时
30 天内合并 PR
40

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

openedx/openedx-platform 的其他 Issue

查看 openedx/openedx-platform 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。