Commit Graph

5809 Commits

Author SHA1 Message Date
Claude
6a8062090b
Slim DB helpers and address PR review feedback
Helper reduction:
- Move the Django DATABASES/SQLITE_CONNECTION_OPTIONS assembly into
  core/settings.py, dropping get_database_settings() and
  get_sqlite_connection_options() from misc/db.py.
- Inline the single-use migration_table_columns() into its one migration.

Review fixes:
- search: match only scalar JSON *values* on postgres (jsonb_path_query
  over '$.**' scalar leaves), mirroring SQLite json_tree.atom so config
  keys no longer match.
- CharField clamp now also runs in SnapshotQuerySet.bulk_create (bulk paths
  bypass the pre_save signal); truncate_overlong_charfields is dual-use.
- Restore reverse-migration parity on postgres: crawls/machine/api initial
  migrations drop their rebuilt tables on reverse via drop_models_on_postgres.
- docs: give DATABASE_NAME its own section so the anchor resolves correctly.
- CI: only install postgres binaries on the shard that runs the postgres test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019YHSjZM6TstSAMN2PhgfUg
2026-07-24 07:57:09 +00:00
Claude
35145d282c
Regenerate lockfile with pinned uv and slim DB adapter helpers
Re-lock uv.lock with the CI-pinned uv version so the diff is limited to the
psycopg addition (a newer local uv had rewritten platform markers and
exclude-newer, breaking `uv sync --locked` in CI).

Consolidate the misc/db.py adapter surface: fold database_backend() into
is_postgres(), drop the redundant vendor-name constants, remove the unused
migration_table_exists() helper, and inline the single-use missing-table check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019YHSjZM6TstSAMN2PhgfUg
2026-07-24 07:23:44 +00:00
Claude
c2191f9e74
Fix lint: settings import placement and benchmark script exec bit
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019YHSjZM6TstSAMN2PhgfUg
2026-07-23 17:18:54 +00:00
Claude
7167c5dd8a
Add native PostgreSQL support alongside SQLite
Add DATABASE_ENGINE=postgres (plus DATABASE_HOST/PORT/USER/PASSWORD/NAME)
config and centralize all sqlite-vs-postgres branching in
archivebox.misc.db:

- get_database_settings() builds DATABASES for either backend; the sqlite
  path is unchanged (custom lock-retry backend, same PRAGMAs).
- database_exists()/ensure_database_ready() replace index.sqlite3 file
  checks; init auto-creates the postgres database when missing.
- approximate_row_counts() serves admin index counts from sqlite_stat1 or
  pg_class.reltuples; missing-table detection covers both vendors.
- rebuild_models_from_migration_state() lets historical sqlite-only raw
  SQL migrations resync postgres schema from Django migration state at
  every divergence point (postgres can never hold legacy data, so
  affected tables are empty when these run). All raw-DDL and PRAGMA
  migrations are now vendor-gated with sqlite behavior byte-for-byte
  unchanged.
- A pre_save clamp truncates CharField values to max_length: sqlite
  never enforced varchar(n) but postgres does (e.g. long crawl labels).
- Collation-sensitive URL range scans branch to escaped LIKE on postgres
  (with a text_pattern_ops index) since linguistic collations break
  bytewise range tricks; the crawl-config JSON search wave gets a
  jsonb-text implementation.

Verified on real PostgreSQL 16: fresh init applies the entire migration
graph, schema matches models exactly (column-level parity check +
makemigrations --check), and add/run/list/search/status/remove all work
end-to-end. New test_postgres_backend.py suite boots a real throwaway
postgres cluster (initdb + pg_ctl); CI workflows install postgres server
binaries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019YHSjZM6TstSAMN2PhgfUg
2026-07-23 17:08:47 +00:00
Nick Sweeting
a3c5e13ff8 Release ArchiveBox through complete CI coverage
Some checks failed
CI / Linters (push) Waiting to run
CI / Complete test suite (push) Waiting to run
CI / Sharded and plugin tests (push) Waiting to run
CI / Documentation and root tests (push) Waiting to run
CI / CodeQL (push) Waiting to run
CI / Tested Python artifacts (push) Waiting to run
CI / Tested Docker images (push) Waiting to run
CI / All required CI lanes (push) Blocked by required conditions
Deploy Publicsite to GitHub Pages / deploy (push) Has been cancelled
2026-07-23 07:00:05 -07:00
Nick Sweeting
bcab0bfa6e
Run the complete core and MCP documentation suites 2026-07-21 19:26:42 -07:00
Nick Sweeting
c36d3c1575
Make release publication atomic and CI-only 2026-07-21 19:26:42 -07:00
Nick Sweeting
6592af0d19
Exercise ArchiveBox through unified runtime lifecycles 2026-07-21 19:26:42 -07:00
github-actions[bot]
e89388b264 release: v0.9.35rc137
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
Build Docker image / build ${{ matrix.platform }} (digest-linux-amd64, docker-amd64, linux/amd64, ubuntu-24.04) (push) Has been cancelled
Build Docker image / build ${{ matrix.platform }} (digest-linux-arm64, docker-arm64, linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Run linters / lint (push) Has been cancelled
Build Pip package / build (push) Has been cancelled
Release State / release-state (push) Has been cancelled
Parallel Tests / Discover test files (push) Has been cancelled
Run tests / python_tests (ubuntu-24.04, 3.13) (push) Has been cancelled
Run tests / docker_tests (push) Has been cancelled
Build Docker image / publish multiarch tags (push) Has been cancelled
Parallel Tests / ${{ matrix.test.name }} (push) Has been cancelled
Parallel Tests / ${{ matrix.plugin.name }} (push) Has been cancelled
2026-07-20 23:42:31 +00:00
Nick Sweeting
ee91a9e366
Filter version binaries before resolution 2026-07-20 16:42:04 -07:00
github-actions[bot]
d9b648e6a9 release: v0.9.35rc136 2026-07-20 23:23:21 +00:00
Nick Sweeting
81ea053f97
Avoid empty binary resolution buses 2026-07-20 16:22:53 -07:00
github-actions[bot]
1a9796bcaa release: v0.9.35rc135 2026-07-20 22:56:39 +00:00
Nick Sweeting
5a30ab0451
Scope install status to requested binaries 2026-07-20 15:54:33 -07:00
github-actions[bot]
765aef56e9 release: v0.9.35rc134 2026-07-20 22:25:37 +00:00
Nick Sweeting
ee342a0313
Use supported uv group install in lint CI 2026-07-20 15:23:20 -07:00
github-actions[bot]
39e1a77de7 release: v0.9.35rc133 2026-07-20 22:22:55 +00:00
Nick Sweeting
70fb360bae
Preserve feature branch test coverage 2026-07-20 15:21:27 -07:00
github-actions[bot]
95f8f0fbd8 release: v0.9.35rc132 2026-07-20 22:21:07 +00:00
Nick Sweeting
582499be86
Deduplicate ArchiveBox release CI 2026-07-20 15:19:32 -07:00
github-actions[bot]
84624844aa release: v0.9.35rc131 2026-07-20 22:14:36 +00:00
Nick Sweeting
ba405c5f1f
Keep PyPI publishing in release state 2026-07-20 15:06:51 -07:00
github-actions[bot]
1481dedf31 release: v0.9.35rc130 2026-07-20 22:01:31 +00:00
Nick Sweeting
56b0abfb78
Use fixed binary projection releases 2026-07-20 15:00:10 -07:00
github-actions[bot]
6ddf9fcd84 release: v0.9.35rc129 2026-07-20 21:26:39 +00:00
Nick Sweeting
1ca93ee0f6
Use corrected unified runtime releases 2026-07-20 14:23:03 -07:00
github-actions[bot]
2d5760642a release: v0.9.35rc128 2026-07-20 20:09:34 +00:00
Nick Sweeting
ecf35c33d6
Pin unified runtime dependency releases 2026-07-20 13:08:38 -07:00
github-actions[bot]
713eb61829 release: v0.9.35rc127
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
Build Docker image / build ${{ matrix.platform }} (digest-linux-amd64, docker-amd64, linux/amd64, ubuntu-24.04) (push) Waiting to run
Build Docker image / build ${{ matrix.platform }} (digest-linux-arm64, docker-arm64, linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Build Docker image / publish multiarch tags (push) Blocked by required conditions
Run linters / lint (push) Waiting to run
Build Pip package / build (push) Waiting to run
Release State / release-state (push) Waiting to run
Parallel Tests / Discover test files (push) Waiting to run
Parallel Tests / ${{ matrix.test.name }} (push) Blocked by required conditions
Parallel Tests / ${{ matrix.plugin.name }} (push) Blocked by required conditions
Run tests / python_tests (ubuntu-24.04, 3.13) (push) Waiting to run
Run tests / docker_tests (push) Waiting to run
Update downstream packages / dispatch (push) Has been cancelled
2026-07-20 19:53:24 +00:00
Nick Sweeting
d92b2649bd
Use configured PyPI token for package publishing 2026-07-20 12:52:58 -07:00
github-actions[bot]
fcc9457825 release: v0.9.35rc126 2026-07-20 19:50:42 +00:00
Nick Sweeting
01f5666dbc
Route runtime binaries through abxpkg 2026-07-20 12:50:14 -07:00
github-actions[bot]
e17248b5f1 release: v0.9.35rc125 2026-07-20 15:32:29 +00:00
Nick Sweeting
d0c39fdf2c
Pin corrected hook lifecycle releases 2026-07-20 08:32:01 -07:00
github-actions[bot]
637d2ec210 release: v0.9.35rc124 2026-07-20 15:09:27 +00:00
Nick Sweeting
ed7e3f0ec8 Pin restored hook lifecycle releases 2026-07-20 08:08:47 -07:00
github-actions[bot]
f1a574192a release: v0.9.35rc124 2026-07-20 15:05:54 +00:00
Nick Sweeting
a5ae6e9022 Restore existing hook readiness boundary 2026-07-20 08:05:25 -07:00
github-actions[bot]
5cb50f5c61 release: v0.9.35rc123
Some checks are pending
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
Build Docker image / build ${{ matrix.platform }} (digest-linux-amd64, docker-amd64, linux/amd64, ubuntu-24.04) (push) Waiting to run
Build Docker image / build ${{ matrix.platform }} (digest-linux-arm64, docker-arm64, linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Build Docker image / publish multiarch tags (push) Blocked by required conditions
Run linters / lint (push) Waiting to run
Build Pip package / build (push) Waiting to run
Release State / release-state (push) Waiting to run
Parallel Tests / Discover test files (push) Waiting to run
Parallel Tests / ${{ matrix.test.name }} (push) Blocked by required conditions
Parallel Tests / ${{ matrix.plugin.name }} (push) Blocked by required conditions
Run tests / python_tests (ubuntu-24.04, 3.13) (push) Waiting to run
Run tests / docker_tests (push) Waiting to run
Update downstream packages / dispatch (push) Waiting to run
2026-07-20 08:44:16 +00:00
Nick Sweeting
829dd95fe2 Ship deterministic downloader releases 2026-07-20 01:43:26 -07:00
github-actions[bot]
05447232d0 release: v0.9.35rc122 2026-07-20 08:32:27 +00:00
Nick Sweeting
98b2202e0a Update downloader dependency releases 2026-07-20 01:31:53 -07:00
Nick Sweeting
48bef35706 Restore deterministic background lifecycle tests 2026-07-20 01:31:28 -07:00
github-actions[bot]
a6684c773d release: v0.9.35rc121 2026-07-20 07:04:50 +00:00
Nick Sweeting
be9b826503 Wait for imported root snapshot completion 2026-07-20 00:04:22 -07:00
github-actions[bot]
67a1bde963 release: v0.9.35rc120 2026-07-20 06:25:52 +00:00
Nick Sweeting
15f85be84b
Assert recovered snapshots record completion 2026-07-19 23:25:21 -07:00
github-actions[bot]
8ffb0ef986 release: v0.9.35rc119 2026-07-20 05:59:17 +00:00
Nick Sweeting
2cd0c88cd0
Finalize parser output before sealing snapshots 2026-07-19 22:58:05 -07:00
github-actions[bot]
5bc028eb76 release: v0.9.35rc118 2026-07-20 05:12:22 +00:00