Skip to content

GenerateReportView returns no task_id, so report failures are unobservable #39209

Description

@bmtcril

POST /api/instructor/v2/courses/<key>/reports/<type>/generate (GenerateReportView) answers 200 {"status": "<localized sentence>"} with no task_id, while the other task-queuing v2 views (certificate regenerate, the grading writes via _build_async_response) return {task_id, status_url, ...}.

GET /api/instructor/v2/courses/<key>/instructor_tasks without problem_location_str falls through to get_running_instructor_tasks, so it lists only tasks still running. A finished task, a task that never ran, and a task that failed (see #39119) all leave it empty. GET …/tasks/<task_id> exists, but nothing hands out the id for a report.

Impact: a client cannot correlate a report request to its task, or read a failure reason. The Data Downloads UI and any automation can only infer completion by waiting for a new file to appear in the downloads listing; a failed report simply never shows up.

Expected: have the _generate_*_report handlers return the submitted InstructorTask and answer {task_id, status_url} from generate, as _build_async_response already does for the grading writes. Optionally, let instructor_tasks include recently finished tasks (or accept a task_type filter backed by get_instructor_task_history) so a failure stays visible after the task ends.

Environment: confirmed in lms/djangoapps/instructor/views/api_v2.py on master @ 6056c143d2 (2026-10-05); first observed on Tutor main with frontend-app-instructor-dashboard v2.0.0-alpha, 2026-09-15.

Found by the Open edX end-to-end test suite (INSTR-002).

Activity

  1. added
    bugReport of or fix for something that isn't working as intended
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugReport of or fix for something that isn't working as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions