WikiEduDashboard icon indicating copy to clipboard operation
WikiEduDashboard copied to clipboard

Error logging during course data updates should be extended

Open ragesoss opened this issue 4 years ago • 11 comments

Current Behavior:

We have error logging that keeps track of the number of errors as well as Sentry IDs for problems that happen during part of the course data update process (which gets handled by passing the update_service object down to the API calls where data gets fetched, and then using the ApiErrorHandling module to log any errors.

This strategy hasn't been implemented for all of the steps of UpdateCourseStats, just the first few.

Desired Behavior:

The error logging strategy should cover all the APIs called during the course stats update process.

Related Files & Code:

  • app/services/update_course_stats.rb

ragesoss avatar Feb 06 '21 00:02 ragesoss

@ragesoss I am a new comer here, and after exploring the project a bit. I would like to work on it. Please can you add me to your slack channel where other technical conversations take place. Thank you !

panktishah62 avatar Feb 08 '21 09:02 panktishah62

@panktishah62 are you still working on this? If u need some help, I would be happy to help you!

rohitgeddam avatar Mar 03 '21 20:03 rohitgeddam

@ragesoss I am a new comer here, and after exploring the project a bit. I would like to work on it. Please can you add me to your slack channel where other technical conversations take place. Thank you !

@panktishah62 sorry, I missed this initially. I can send you an invite if you send me your email address. Either post it here or send to sage at wikiedu.org

ragesoss avatar Mar 03 '21 20:03 ragesoss

hey @ragesoss I think I can work on this simultaneously with the previous one I mentioned so can I or should I wait for pull request then process.

aaditya9899 avatar Feb 19 '22 18:02 aaditya9899

@aaditya9899 starting on this now is fine. Thanks.

ragesoss avatar Feb 21 '22 15:02 ragesoss

Hi Sage, decided to start on this one, as i wait for your response on the other issue.

sharon-kathambi avatar Oct 17 '22 11:10 sharon-kathambi

For the APIs, i can see the mediawiki,oreo and replica api, all have the loggers,Using Sentry and Rails.logger. Could you shed somelight on which steps on updateCourseStats that dont have the error handling

sharon-kathambi avatar Oct 17 '22 15:10 sharon-kathambi

Each step in UpdateCourseStats where the class being called doesn't take an update_service parameter. For example, Category.refresh_categories_for.

ragesoss avatar Oct 17 '22 15:10 ragesoss

(Adding it to just one step at a time is probably the best approach.)

ragesoss avatar Oct 17 '22 15:10 ragesoss

Hi Sage, kindly review my PR to see if i am headed the right way https://github.com/WikiEducationFoundation/WikiEduDashboard/pull/5174

sharon-kathambi avatar Oct 18 '22 05:10 sharon-kathambi

Hello @ragesoss , I'm Wulan, an Outreachy applicant currently working on extending error logging for the UpdateCourseStats process. I've been reviewing the changes made by a previous contributor and have adjusted the update_article_status_for_course method to ensure it now accepts the update_service parameter as required, along with updating the initialize method accordingly. I’ve also run the tests locally, and they appear to be passing. I’ll be posting a pull request soon. Please let me know if there’s anything further that needs attention or if you'd like any additional adjustments. Thank you for your time and feedback!

wulanseruniati avatar Oct 24 '24 15:10 wulanseruniati