appsembler / figures

Reporting and data retrieval app for Open edX
MIT License
44 stars 37 forks source link

Release 0.4 - Tasks Error Handling and Logging Improvements #317

Closed johnbaldwin closed 3 years ago

johnbaldwin commented 3 years ago

0.4 Tasks Error Handling and Logging Improvements

  1. Restructured figures.tasks daily metrics functions

The purpose of restucturing is to ensure pipeline failures do not escalate up the call chain:

See the module docstring in tests/tasks/test_daily_metrics.py for more details

Logging has improvements. Namely, the logs have prefixes to help grep through them for details. The information provided in the logs has improved to identify the site, date for, and course id for the processing and failures.

Logging to figures.models.PipelineError has been removed as it is not providing benefit in its current form. Follow on work is providing post pipeline reporting. This should provide better visibility into pipeline data health

Restructured figures.tasks tests. Was 'tests/test_tasks.py'. Now there are process specific modules in 'tests/tasks':

Minor fix - pipeline course daily metrics now cases 'course_id' to string when working with figures.models.CourseDailyMetrics. This is to prevent errors if a CourseKey is used instead of the string representation of the course id. (redacted rant on CourseKey)

Add comments to backfill.backfill_enrollment_data_for_site

Added comments as notes to improve updating enrollment data