Add logging when all OPDS2+ODL license checkouts fail (PP-3907)#3188
Merged
jonathangreen merged 2 commits intomainfrom Mar 31, 2026
Merged
Add logging when all OPDS2+ODL license checkouts fail (PP-3907)#3188jonathangreen merged 2 commits intomainfrom
jonathangreen merged 2 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3188 +/- ##
=======================================
Coverage 93.28% 93.28%
=======================================
Files 496 496
Lines 46004 46005 +1
Branches 6300 6300
=======================================
+ Hits 42917 42918 +1
Misses 2001 2001
Partials 1086 1086 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Log a warning when every license in a pool fails checkout, capturing hold state and pool availability to help diagnose cases where the system believes copies are available but the distributor disagrees.
52e1aa3 to
c6230f0
Compare
tdilauro
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add a warning-level log when every license in a pool fails checkout in
OPDS2WithODLApi._checkout().This targets the scenario where the system believes copies are available but the distributor disagrees, the patron gets a "hold available" notification, but checkout fails because no licenses can actually be checked out.
Motivation and Context
Patrons are receiving "Your hold is available!" push notifications but when they open the app to borrow the book, it fails. PR #3182 fixes a known bug in
best_lendable_pool(), but I'm not confident it covers all cases. This logging will help diagnose the root cause if the issue persists (PP-3907).How Has This Been Tested?
Checklist