release: archivebox 0.9.33rc17

This commit is contained in:
Nick Sweeting 2026-05-28 07:02:30 -07:00
parent 8d7052b90b
commit 08de08c64c
No known key found for this signature in database
6 changed files with 71 additions and 51 deletions

View File

@ -7,8 +7,10 @@ Verify server can start (basic smoke tests only, no full server testing).
import os
import asyncio
import json
import signal
import subprocess
import sys
from datetime import datetime
from types import SimpleNamespace
@ -156,3 +158,58 @@ def test_sonic_daemon_event_handler_accepts_real_running_worker(archivebox_daemo
await bus.destroy()
asyncio.run(run_test())
def test_supervisord_takeover_stops_all_live_process_rows(tmp_path, process, db):
import psutil
from django.utils import timezone
from archivebox.machine.models import Machine, Process
from archivebox.tests.test_orm_helpers import use_archivebox_db
assert process.returncode == 0, process.stderr
env = os.environ.copy()
env.update({"DATA_DIR": str(tmp_path), "USE_COLOR": "False", "SHOW_PROGRESS": "False"})
procs = []
try:
for _index in range(2):
proc = subprocess.Popen(
[sys.executable, "-m", "archivebox", "run", "--daemon"],
cwd=tmp_path,
env=env,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
start_new_session=True,
)
procs.append(proc)
started_at = datetime.fromtimestamp(psutil.Process(proc.pid).create_time(), tz=timezone.get_current_timezone())
with use_archivebox_db(tmp_path):
Process.objects.create(
machine=Machine.current(),
process_type=Process.TypeChoices.SUPERVISORD,
worker_type="supervisord",
pwd=str(tmp_path),
cmd=[sys.executable],
pid=proc.pid,
started_at=started_at,
status=Process.StatusChoices.RUNNING,
timeout=0,
)
with use_archivebox_db(tmp_path):
from archivebox.workers.supervisord_util import stop_existing_supervisord_process
stop_existing_supervisord_process()
for proc in procs:
proc.wait(timeout=10)
with use_archivebox_db(tmp_path):
assert not Process.objects.filter(
process_type=Process.TypeChoices.SUPERVISORD,
status=Process.StatusChoices.RUNNING,
pwd=str(tmp_path),
).exists()
finally:
for proc in procs:
if proc.poll() is None:
os.killpg(proc.pid, signal.SIGKILL)

View File

@ -166,35 +166,20 @@ archivebox config --set PUBLIC_ADD_VIEW=False # allow submitting new URLs wit
Django's secret key for cryptographic signing (sessions, CSRF tokens, etc.). Automatically generated on first run.
---
#### `BIND_ADDR`
#### `LISTEN_HOST`
**Possible Values:** [`127.0.0.1:8000`]/`0.0.0.0:8000`/...
Address and port for the ArchiveBox web server to listen on.
Address and port for the ArchiveBox web server to listen on. This is only the local bind socket, not the public URL.
---
#### `LISTEN_HOST`
**Possible Values:** [`archivebox.localhost:8000`]/`archive.example.com:443`/...
The public hostname and port that ArchiveBox is accessible at.
#### `BASE_URL`
**Possible Values:** [`""`]/`https://archive.example.com`/`http://archivebox.localhost:8000`/...
Canonical public URL used to build links. In subdomain security mode, ArchiveBox automatically derives `admin.`, `web.`, `api.`, `public.`, and `snap-*.` hosts from this base while preserving the scheme and port.
---
#### `ALLOWED_HOSTS`
**Possible Values:** [`*`]/`archive.example.com,localhost`/...
Comma-separated list of allowed HTTP Host header values. Set this to your domain name(s) in production.
---
#### `CSRF_TRUSTED_ORIGINS`
**Possible Values:** [`http://admin.archivebox.localhost:8000`]/`https://archive.example.com`/...
Comma-separated list of trusted origins for CSRF validation. Must include the scheme (http/https).
---
#### `ADMIN_BASE_URL`
**Possible Values:** [`""`]/`/admin/`/...
Base URL path for the Django admin interface.
---
#### `ARCHIVE_BASE_URL`
**Possible Values:** [`""`]/`/archive/`/...
Base URL path for serving archived content.
---
#### `SNAPSHOTS_PER_PAGE`
**Possible Values:** [`40`]/`100`/...

View File

@ -27,7 +27,7 @@
### API
````{py:function} server(runserver_args: typing.Iterable[str] = (SERVER_CONFIG.BIND_ADDR, ), reload: bool = False, init: bool = False, debug: bool = False, daemonize: bool = False, nothreading: bool = False) -> None
````{py:function} server(runserver_args: typing.Iterable[str] = (SERVER_CONFIG.LISTEN_HOST, ), reload: bool = False, init: bool = False, debug: bool = False, daemonize: bool = False, nothreading: bool = False) -> None
:canonical: archivebox.cli.archivebox_server.server
```{autodoc2-docstring} archivebox.cli.archivebox_server.server

View File

@ -377,17 +377,6 @@ Bases: {py:obj}`archivebox.config.configset.BaseConfigSet`
````
````{py:attribute} BIND_ADDR
:canonical: archivebox.config.common.ServerConfig.BIND_ADDR
:type: str
:value: >
'Field(...)'
```{autodoc2-docstring} archivebox.config.common.ServerConfig.BIND_ADDR
```
````
````{py:attribute} LISTEN_HOST
:canonical: archivebox.config.common.ServerConfig.LISTEN_HOST
:type: str
@ -399,24 +388,13 @@ Bases: {py:obj}`archivebox.config.configset.BaseConfigSet`
````
````{py:attribute} ADMIN_BASE_URL
:canonical: archivebox.config.common.ServerConfig.ADMIN_BASE_URL
````{py:attribute} BASE_URL
:canonical: archivebox.config.common.ServerConfig.BASE_URL
:type: str
:value: >
'Field(...)'
```{autodoc2-docstring} archivebox.config.common.ServerConfig.ADMIN_BASE_URL
```
````
````{py:attribute} ARCHIVE_BASE_URL
:canonical: archivebox.config.common.ServerConfig.ARCHIVE_BASE_URL
:type: str
:value: >
'Field(...)'
```{autodoc2-docstring} archivebox.config.common.ServerConfig.ARCHIVE_BASE_URL
```{autodoc2-docstring} archivebox.config.common.ServerConfig.BASE_URL
```
````

View File

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

View File

@ -1,6 +1,6 @@
[project]
name = "archivebox"
version = "0.9.33rc16"
version = "0.9.33rc17"
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.40", # for: detecting, versioning, and installing binaries via apt/brew/pip/npm
"abx-plugins>=1.11.46", # shared ArchiveBox plugin package with Chrome/Puppeteer dependency wiring
"abx-dl>=1.11.46", # shared ArchiveBox downloader package with blocking install preflight
"abxpkg>=1.11.42", # for: detecting, versioning, and installing binaries via apt/brew/pip/npm
"abx-plugins>=1.11.48", # shared ArchiveBox plugin package with Chrome/Puppeteer dependency wiring
"abx-dl>=1.11.48", # 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
]