browsertrix/backend/test
Tessa Walsh 21ae38362e
Add endpoints to read pages from older crawl WACZs into database (#1562)
Fixes #1597

New endpoints (replacing old migration) to re-add crawl pages to db from
WACZs.

After a few implementation attempts, we settled on using
[remotezip](https://github.com/gtsystem/python-remotezip) to handle
parsing of the zip files and streaming their contents line-by-line for
pages. I've also modified the sync log streaming to use remotezip as
well, which allows us to remove our own zip module and let remotezip
handle the complexity of parsing zip files.

Database inserts for pages from WACZs are batched 100 at a time to help
speed up the endpoint, and the task is kicked off using
asyncio.create_task so as not to block before giving a response.

StorageOps now contains a method for streaming the bytes of any file in
a remote WACZ, requiring only the presigned URL for the WACZ and the
name of the file to stream.
2024-03-19 14:14:21 -07:00
..
data
__init__.py
conftest.py Support multiple crawler versions (#1420) 2024-01-16 15:32:12 -08:00
echo_server.py
test_collections.py
test_crawl_config_search_values.py
test_crawl_config_tags.py
test_crawlconfigs.py Support multiple crawler versions (#1420) 2024-01-16 15:32:12 -08:00
test_filter_sort_results.py
test_invites.py
test_login.py
test_org.py
test_permissions.py
test_profiles.py Add API tests for browser profiles (#1392) 2023-11-28 10:40:58 -05:00
test_run_crawl.py Add endpoints to read pages from older crawl WACZs into database (#1562) 2024-03-19 14:14:21 -07:00
test_settings.py Configurable Max Scale for frontend (#1557) 2024-03-11 16:21:20 -07:00
test_stop_cancel_crawl.py Replace partial_complete -> stopped_by_user or stopped_quota_reached + operator edge cases (#1368) 2023-11-14 11:17:16 -08:00
test_uploads.py Add crawl pages and related API endpoints (#1516) 2024-02-28 12:11:35 -05:00
test_users.py
test_utils.py Format backend with Black 24 (#1507) 2024-02-07 11:35:34 -08:00
test_webhooks.py
test_workflow_auto_add_to_collection.py
utils.py