38 Commits

Author SHA1 Message Date
704481a505 Release version 6.0.0 2026-08-18 04:32:09 +02:00
8dbd5e89ea Release version 5.0.0 2026-08-18 01:55:45 +02:00
efcfe88e7f style!: adopt the core lint bar and migrate to it
The package carried no ruff configuration at all, so it ran on the defaults (E4+E7+E9+F) while infinito-nexus-core, its only consumer, holds itself to a far wider selection. Measured against that selection this tree had 224 findings. It now has none.

The selector list is core's verbatim so both repositories answer to one bar. target-version stays py39 rather than core's py311, because requires-python still declares >=3.9 and pyupgrade would otherwise propose syntax the declared minimum cannot run. Every ignore carries its reason: S603/S607 in particular, since running docker and dump binaries from PATH in list form is this tool's whole job and is already injection-safe.

Two conversions are judgement rather than mechanics. os.path.join(dir, '') was the rsync idiom for a trailing separator, which Path drops, so it becomes an explicit os.sep. os.path.abspath stays where Path.resolve() would follow symlinks and let a symlinked volume test as inside the snapshot subject.

BREAKING CHANGE: VersionMismatch is renamed VersionMismatchError.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:51:18 +02:00
37a07fe100 Release version 4.0.0 2026-08-17 16:32:48 +02:00
c03329e4ca Release version 3.6.1 2026-08-17 08:16:40 +02:00
23cfc3b7e2 Release version 3.6.0 2026-08-17 05:28:17 +02:00
f437787e64 Release version 3.5.0 2026-08-17 04:42:07 +02:00
2129c5e362 build(lint): gate make test on a clean ruff run
ruff was never wired into this repository: no target, no CI step, no pin.
It reported 45 findings across sources and tests, so nothing enforced
what the codebase already mostly followed.

Adds `make ruff` (check + format --check), `make ruff-fix`, and `make
lint` as its alias, and makes `make test` run lint as a fourth parallel
spur. The CI workflow calls `make test`, so it is covered there too. The
linter is pinned in a `lint` extra: a ruff minor bump changes which rules
fire, and with the suite gating on a clean run an unpinned linter would
fail it on an unrelated day.

The 45 findings are fixed rather than configured away. Three needed a
decision instead of the mechanical fix:

- The generation timestamp keeps its local wall clock (DTZ005 waived).
  Generations sort by that name, and UTC would order new ones before the
  existing ones wherever the offset is positive - "newest generation" is
  what every restore path selects on.
- The per-volume `copy` closure now binds volume_name and vol_dir as
  default arguments (B023). It only worked because it is called inside
  the same iteration.
- The two CLI top-level handlers keep their blind except (BLE001
  waived): turning any failure into exit 1 is what a CLI boundary is
  for. The two in run.py did not need it and were narrowed to what they
  actually catch.

Also drops the comments that restate the code: the section banners in
restore/__main__.py, the filename repeated as line 1 of nine test files,
step narration above the statement it narrates, and a block in app.py
documenting parameters that had moved to another module. What names a
trip-wire stays - the snapshot destination rule, the mysql-binary
absence in MariaDB 11 images, the session-scoped FOREIGN_KEY_CHECKS, the
spooled temp file for multi-GB dumps, and the negative control that
loses its discriminating power if it ever passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-17 04:35:50 +02:00
90d289d92f Release version 3.4.3 2026-08-16 13:57:49 +02:00
30fd68bdcf Release version 3.4.2 2026-08-15 15:28:44 +02:00
756e236d10 Release version 3.4.1 2026-08-05 13:18:57 +02:00
8a93a61ca9 Release version 3.4.0 2026-08-02 12:07:34 +02:00
934e693810 Release version 3.3.0 2026-08-02 09:11:54 +02:00
c2f1cb8e8c Release version 3.2.2 2026-07-31 19:20:49 +02:00
4e2b3641f9 Release version 3.2.1 2026-07-31 16:25:22 +02:00
7e815bfcf7 Release version 3.2.0 2026-07-31 13:12:38 +02:00
ec3d1a5046 Release version 3.1.4 2026-07-31 11:40:03 +02:00
9dc57c3235 Release version 3.1.3 2026-07-20 20:01:26 +02:00
8409843ff9 fix(restore): wrap the postgres dump replay in a single transaction
The dump replay ran statement-by-statement with autocommit. When restore --empty runs against a LIVE database, the pre-clean drops a table, the replay recreates it and autocommits, and a concurrent writer (discourse's mini_scheduler upserting scheduler_stats(id=1)) inserts the same primary key into the empty table before the dump's COPY loads it. The COPY then aborts with a duplicate-key violation under ON_ERROR_STOP and the whole restore fails. Running the replay with --single-transaction keeps the recreated table invisible to other sessions until commit, so the writer can never insert the racing row.

The --empty pre-clean stays multi-statement (\gexec, one DROP per statement): running every DROP in one transaction exhausts max_locks_per_transaction on large schemas (e.g. gitlab).

Extract the pre-clean SQL from the inline string into restore/db/empty_preclean.sql (loaded via dirname(__file__)) and declare it as package-data so it ships in the wheel. Add a unit test guarding the single-transaction/multi-statement split and an e2e that reproduces the live-writer race.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 20:00:31 +02:00
d2ba2eb5ae Release version 3.1.2 2026-07-18 00:39:10 +02:00
53460242d8 Release version 3.1.1 2026-07-17 17:28:54 +02:00
779f297c85 Release version 3.1.0 2026-07-15 03:36:59 +02:00
bf5f6db7c3 Release version 3.0.0 2026-07-12 18:29:49 +02:00
d6d4773fd9 Release version 2.0.0 2026-07-12 14:56:02 +02:00
45d3b0ad7c Release version 1.8.1 2026-07-12 02:59:17 +02:00
e1f1b602d3 Release version 1.8.0 2026-07-11 09:43:25 +02:00
57ea4592c1 Release version 1.7.1 2026-05-26 00:52:37 +02:00
21b4d237d3 Release version 1.7.0 2026-02-07 14:00:11 +01:00
ed78f69b3b Release version 1.6.0 2026-02-06 10:39:02 +01:00
e3f28098bd Release version 1.5.0 2026-01-31 22:06:05 +01:00
2f5882f5c1 Release version 1.4.0 2026-01-31 18:28:29 +01:00
54737cefa7 Release version 1.3.0 2026-01-10 18:41:55 +01:00
e4bc075474 Release version 1.2.0 2025-12-29 11:46:39 +01:00
e3cdfd6fc4 Release version 1.1.1 2025-12-28 22:52:31 +01:00
0222f7f109 Release version 1.1.0 2025-12-28 22:16:41 +01:00
3b39a6ef02 Release version 1.0.0 2025-12-27 09:30:38 +01:00
f8420c8bea renamed configure to seed 2025-12-26 19:58:39 +01:00
c30b4865d4 refactor: migrate to src/ package + add DinD-based E2E runner with debug artifacts
- Replace legacy standalone scripts with a proper src-layout Python package
  (baudolo backup/restore/configure entrypoints via pyproject.toml)
- Remove old scripts/files (backup-docker-to-local.py, recover-docker-from-local.sh,
  databases.csv.tpl, Todo.md)
- Add Dockerfile to build the project image for local/E2E usage
- Update Makefile: build image and run E2E via external runner script
- Add scripts/test-e2e.sh:
  - start DinD + dedicated network
  - recreate DinD data volume (and shared /tmp volume)
  - pre-pull helper images (alpine-rsync, alpine)
  - load local baudolo:local image into DinD
  - run unittest E2E suite inside DinD and abort on first failure
  - on failure: dump host+DinD diagnostics and archive shared /tmp into artifacts/
- Add artifacts/ debug outputs produced by failing E2E runs (logs, events, tmp archive)

https://chatgpt.com/share/694ec23f-0794-800f-9a59-8365bc80f435
2025-12-26 18:13:26 +01:00