release: archivebox 0.9.33rc20

This commit is contained in:
Nick Sweeting 2026-05-28 07:33:07 -07:00
parent ebf340796d
commit 80467cb8d3
No known key found for this signature in database
3 changed files with 35 additions and 14 deletions

View File

@ -905,6 +905,13 @@ def test_archiveresult_files_preserved_after_migration(tmp_path):
cursor.execute("SELECT COUNT(*) FROM core_archiveresult")
archiveresult_count = cursor.fetchone()[0]
original_plugins = sorted({row["extractor"] for row in original_data["archiveresults"]})
cursor.execute(
f"SELECT COUNT(*) FROM core_archiveresult WHERE plugin IN ({','.join('?' for _ in original_plugins)})",
original_plugins,
)
legacy_archiveresult_count = cursor.fetchone()[0]
cursor.execute("SELECT COUNT(*) FROM machine_process")
process_count = cursor.fetchone()[0]
@ -914,6 +921,12 @@ def test_archiveresult_files_preserved_after_migration(tmp_path):
cursor.execute("SELECT COUNT(*) FROM core_archiveresult WHERE process_id IS NOT NULL")
linked_count = cursor.fetchone()[0]
cursor.execute(
f"SELECT COUNT(*) FROM core_archiveresult WHERE plugin IN ({','.join('?' for _ in original_plugins)}) AND process_id IS NOT NULL",
original_plugins,
)
legacy_linked_count = cursor.fetchone()[0]
conn.close()
print(f"[*] ArchiveResults: {archiveresult_count}")
@ -921,19 +934,27 @@ def test_archiveresult_files_preserved_after_migration(tmp_path):
print(f"[*] Binary records created: {binary_count}")
print(f"[*] ArchiveResults linked to Process: {linked_count}")
# Verify data migration happened correctly
assert archiveresult_count == len(original_data["archiveresults"]), (
f"Expected {len(original_data['archiveresults'])} ArchiveResults after migration, got {archiveresult_count}"
# Verify data migration happened correctly. A full `archivebox update` may
# add new maintenance ArchiveResults (e.g. search index backfills), so keep
# the strict preservation assertion scoped to the legacy extractor plugins
# that came from the old DB rows.
assert archiveresult_count >= len(original_data["archiveresults"]), "Full update should not delete ArchiveResult rows"
assert legacy_archiveresult_count == len(original_data["archiveresults"]), (
f"Expected {len(original_data['archiveresults'])} migrated legacy ArchiveResults, got {legacy_archiveresult_count}"
)
# Each ArchiveResult should create one Process record
assert process_count == len(original_data["archiveresults"]), (
f"Expected {len(original_data['archiveresults'])} Process records (1 per ArchiveResult), got {process_count}"
# Each legacy ArchiveResult should create one linked Process record. The
# command/worker rows created by `archivebox update` itself can increase the
# total process count, but they must not replace or orphan migrated process
# metadata.
assert process_count >= len(original_data["archiveresults"]), (
f"Expected at least {len(original_data['archiveresults'])} Process records, got {process_count}"
)
assert binary_count == 5, f"Expected 5 unique Binary records, got {binary_count}"
# ALL ArchiveResults should be linked to Process records
assert linked_count == len(original_data["archiveresults"]), (
f"Expected all {len(original_data['archiveresults'])} ArchiveResults linked to Process, got {linked_count}"
# ALL legacy ArchiveResults should be linked to Process records
assert linked_count >= len(original_data["archiveresults"]), "Full update should not unlink migrated ArchiveResult processes"
assert legacy_linked_count == len(original_data["archiveresults"]), (
f"Expected all {len(original_data['archiveresults'])} legacy ArchiveResults linked to Process, got {legacy_linked_count}"
)

View File

@ -1,6 +1,6 @@
{
"name": "archivebox",
"version": "0.9.33rc19",
"version": "0.9.33rc20",
"repository": "github:ArchiveBox/ArchiveBox",
"license": "MIT",
"dependencies": {

View File

@ -1,6 +1,6 @@
[project]
name = "archivebox"
version = "0.9.33rc19"
version = "0.9.33rc20"
requires-python = ">=3.13"
description = "Self-hosted internet archiving solution."
authors = [{name = "Nick Sweeting", email = "pyproject.toml@archivebox.io"}]
@ -79,9 +79,9 @@ dependencies = [
### Extractor dependencies (optional binaries detected at runtime via shutil.which)
### Binary/Package Management
"abxbus==2.5.7", # EventBus API
"abxpkg>=1.11.45", # for: detecting, versioning, and installing binaries via apt/brew/pip/npm
"abx-plugins>=1.11.51", # shared ArchiveBox plugin package with Chrome/Puppeteer dependency wiring
"abx-dl>=1.11.51", # shared ArchiveBox downloader package with blocking install preflight
"abxpkg>=1.11.46", # for: detecting, versioning, and installing binaries via apt/brew/pip/npm
"abx-plugins>=1.11.52", # shared ArchiveBox plugin package with Chrome/Puppeteer dependency wiring
"abx-dl>=1.11.52", # shared ArchiveBox downloader package with blocking install preflight
### UUID7 backport for Python <3.14
"uuid7>=0.1.0; python_version < '3.14'", # provides the uuid_extensions module on Python 3.13
]