harvard-lil / h2o

H2O is a web app for creating and reading open educational resources, primarily in the legal field
https://opencasebook.org
GNU Affero General Public License v3.0
35 stars 30 forks source link

Notify admins when a book's export has failed many times #2035

Closed rebeccacremona closed 8 months ago

rebeccacremona commented 8 months ago

When a casebook's export has failed more than settings.MAX_EXPORT_ATTEMPTS times, we stop trying to export it.

This is because we know some casebooks are too large to export, and to buy us some time when casebooks are known to be problematic for some other reason.

Since Pandoc export is sometimes flaky... some spurious errors are expected. Meaning we likely pay less attention to the error reports than we should.

This PR alerts admins when a given book has failed the maximum allowed times, so that we are encouraged to take a look.

It also increases the number of allowed failures from 3 to 5.

codecov-commenter commented 8 months ago

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (51c4b7c) 76.59% compared to head (64981a3) 76.48%. Report is 11 commits behind head on develop.

Files Patch % Lines
web/main/models.py 0.00% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #2035 +/- ## =========================================== - Coverage 76.59% 76.48% -0.12% =========================================== Files 64 64 Lines 7066 7071 +5 =========================================== - Hits 5412 5408 -4 - Misses 1654 1663 +9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.