Skip to content

fix: harden backup run paths; bump to 0.6.0 - #247

Merged
asthetik merged 4 commits into
mainfrom
dev
Sep 5, 2026
Merged

fix: harden backup run paths; bump to 0.6.0#247
asthetik merged 4 commits into
mainfrom
dev

Conversation

@asthetik

@asthetik asthetik commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • return typed errors from backup planning instead of process::exit, which aborted all concurrent jobs mid-copy
  • propagate job failures out of run_jobs: bk run now exits non-zero when any job fails (cron/CI can detect failed backups)
  • accept backup targets that do not exist yet; a missing single-file target is treated as a directory to create
  • make run_job/run_jobs async so the tokio runtime flows from #[tokio::main] — fixes directory backups and multi-job runs panicking with "Cannot start a runtime from within a runtime"
  • review hardening: directory planning on the blocking pool, bounded copy concurrency (buffer_unordered(64)), deterministic mtime tests via filetime, multi-job all-success exit-code test
  • bump version to 0.6.0 (public API break: run_job/run_jobs are now async), trim dependency requirements to minor form, cargo update

- return typed errors from backup planning instead of process::exit,
  which aborted all concurrent jobs mid-copy
- propagate job failures out of run_jobs so `bk run` exits non-zero
  when any job fails (cron/CI can finally detect failed backups)
- allow backup targets that do not exist yet (canonicalize_target);
  a missing single-file target is treated as a directory to create
- make run_job/run_jobs async so the tokio runtime flows from main:
  directory backups and multi-job runs used to panic with
  "Cannot start a runtime from within a runtime"
- review hardening: directory planning on the blocking pool, bounded
  copy concurrency (buffer_unordered(64)), deterministic mtime tests
  via filetime, multi-job all-success exit-code test
- Windows config_dir() resolves via the known-folder API and ignores
  HOME/XDG_CONFIG_HOME, so parallel CLI integration tests raced on the
  real %APPDATA% config and failed. config_dir() now honors
  HBACKUP_CONFIG on every platform (also useful for portable setups)
  and the `bk run` tests use it for full isolation.
- zstd-safe 7.3.0 / zstd-sys 2.1.0 relicensed to BSD-3-Clause; allow it
  in cargo-deny.
- delete_yes.rs and cli_delete_integration.rs only set XDG_CONFIG_HOME,
  which macOS and Windows both ignore, so a local `cargo test` ran
  `bk delete --all -y` against the real user config. Both now use the
  HBACKUP_CONFIG override, keeping the suite off the real config on
  every platform.
@asthetik
asthetik merged commit 2ee3bad into main Sep 5, 2026
10 checks passed
@asthetik
asthetik deleted the dev branch September 5, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant