Skip to content

Tags: internetarchive/openlibrary

Tags

production

Toggle production's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Pass the s3 cookie into get_loan_history_data (#14001)

* Pass the s3 cookie into get_loan_history_data

/account/loan-history.json 500'd under FastAPI because
get_loan_history_data read web.cookies(), which needs a web.py request.
Callers now pass the cookie in, as fastapi/borrow.py already does, and a
missing account raises AccountNotFoundError (404 at each route) instead
of web.py's render.notfound.

Closes #13959

* Trim loan history docstring and redundant tests

The route test in test_account_loans.py already covers the cookie being
passed through without web.cookies(), so drop the heavily mocked
duplicate in test_lending.py and a repeated assertion.

---------

Co-authored-by: Raymond Berger <[email protected]>

deploy-2026-10-29-at-23-00

Toggle deploy-2026-10-29-at-23-00's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Pass the s3 cookie into get_loan_history_data (#14001)

* Pass the s3 cookie into get_loan_history_data

/account/loan-history.json 500'd under FastAPI because
get_loan_history_data read web.cookies(), which needs a web.py request.
Callers now pass the cookie in, as fastapi/borrow.py already does, and a
missing account raises AccountNotFoundError (404 at each route) instead
of web.py's render.notfound.

Closes #13959

* Trim loan history docstring and redundant tests

The route test in test_account_loans.py already covers the cookie being
passed through without web.cookies(), so drop the heavily mocked
duplicate in test_lending.py and a repeated assertion.

---------

Co-authored-by: Raymond Berger <[email protected]>

deploy-2026-10-29-at-20-59

Toggle deploy-2026-10-29-at-20-59's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Pass the s3 cookie into get_loan_history_data (#14001)

* Pass the s3 cookie into get_loan_history_data

/account/loan-history.json 500'd under FastAPI because
get_loan_history_data read web.cookies(), which needs a web.py request.
Callers now pass the cookie in, as fastapi/borrow.py already does, and a
missing account raises AccountNotFoundError (404 at each route) instead
of web.py's render.notfound.

Closes #13959

* Trim loan history docstring and redundant tests

The route test in test_account_loans.py already covers the cookie being
passed through without web.cookies(), so drop the heavily mocked
duplicate in test_lending.py and a repeated assertion.

---------

Co-authored-by: Raymond Berger <[email protected]>

deploy-2026-10-27-at-20-59

Toggle deploy-2026-10-27-at-20-59's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Migrate Bestbook FastAPI queries to async DB (#14112)

* Migrate Bestbook FastAPI queries to async DB

* Return 422 for malformed work_id on /awards/count.json

work_id values like "abc", "OLxyzW" or "" raised ValueError/IndexError
while parsing and returned 500 (master too). Validate the parameter as a
numeric work ID or work OLID so bad input gets a 422.

* Drop bestbook unit tests the integration test already covers

The removed tests asserted exact SQL strings or substrings, or exercised
get_awards_sync through a fake async_bridge; the Postgres integration test
runs the same queries for real (and now also checks get_count with an
OLID). Keep the concurrent-conflict recheck test, which the integration
test can't reach, and test_remove_requires_a_filter.

* Remove Bestbook.get_awards_sync and the unused Work award helpers

Work.get_awards, Work.check_if_user_awarded and Work.get_award_by_username
have no callers anywhere (Python, templates, macros, JS), and they were
the only users of the new get_awards_sync bridge. Drop all four.

* Rename test_bestbook_async.py to test_bestbook.py

One test file per module: the Bestbook model's unit and Postgres
integration tests live in tests/core/test_bestbook.py, not a separate
_async file.

---------

Co-authored-by: Raymond Berger <[email protected]>

deploy-2026-10-20-at-22-11

Toggle deploy-2026-10-20-at-22-11's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Start the olbase build from the deploy wizard with gh (#13947)

If the olbase image is out of date and the gh CLI is installed, the wizard
now triggers olbase.yaml itself before the announcement and waits for it
with `gh run watch` before the openlibrary deploy. Without gh it falls back
to the existing "click Run workflow" prompt.

deploy-2026-10-15-at-22-14

Toggle deploy-2026-10-15-at-22-14's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge pull request #13831 from lokesh/librarian-card

Home page: librarian call-out and a compact stats card replace the five-chart stats block

deploy-2026-10-13-at-20-42

Toggle deploy-2026-10-13-at-20-42's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
remove non-existent file from codespell exceptions (#13897)

* remove non-existent file from codespell exceptions

* remove more non-existent patterns

deploy-2026-10-06-at-17-39

Toggle deploy-2026-10-06-at-17-39's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Pre-fill fields when switching to advanced search (#13601)

Co-Authored-By: Utkarsh Arya <[email protected]>
Co-authored-by: Claude Sonnet 5 <[email protected]>
Co-authored-by: Drini Cami <[email protected]>

deploy-2026-09-29-at-18-55

Toggle deploy-2026-09-29-at-18-55's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge pull request #13505 from CipherZ3r0/perf/dedupe-get-loan-ia-call

Don't make archive.org loan request for deprecated "ol:*" user id

deploy-2026-09-23-at-19-23

Toggle deploy-2026-09-23-at-19-23's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge pull request #13702 from internetarchive/fix/nginx-gate-orphane…

…d-mount

fix(deploy): the `nginx -t` gate was blind; test in a fresh container