Skip to content

Fix catastrophic, backup deleting bug#95

Merged
MaxG87 merged 8 commits intomainfrom
fix-devastating-bug
Mar 24, 2026
Merged

Fix catastrophic, backup deleting bug#95
MaxG87 merged 8 commits intomainfrom
fix-devastating-bug

Conversation

@MaxG87
Copy link
Copy Markdown
Owner

@MaxG87 MaxG87 commented Mar 23, 2026

Due to a bug in an imported component, storage_device_managers,
errors during the unmount would result in deletion of the entire
backup. This is a serious issue for a backup tool!

This branch first establishes a test that covers the wrong
behaviour. Then the erroneous component is updated, which fixes the bug.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a critical data-loss scenario by pinning/updating the storage-device-managers dependency to a fixed version and adding a regression test to ensure unmount failures do not delete backup contents.

Changes:

  • Add a regression test that simulates an unmount failure and verifies backups are not deleted and the device can still be closed.
  • Bump runtime/dev dependencies (notably storage-device-managers, shell-interface, typer) and update uv.lock accordingly.
  • Update Docker/CI tooling to use a newer uv version and add YAML document headers to workflows/config.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
uv.lock Updates locked dependency set to match bumped runtime/dev requirements (incl. storage-device-managers>=1.0.1, pytest-mock).
pyproject.toml Bumps runtime/dev dependency minimums and adds pytest-mock for the new regression test.
tests/test_cli.py Adds regression test covering the unmount-error/backup-deletion scenario.
tests/conftest.py Tightens fixture typing annotations (and imports typing as t).
dockerfiles/python3.10 Updates pinned uv version used in Docker test environment.
dockerfiles/python3.11 Updates pinned uv version used in Docker test environment.
dockerfiles/python3.12 Updates pinned uv version used in Docker test environment.
dockerfiles/python3.13 Updates pinned uv version used in Docker test environment.
dockerfiles/python3.14 Updates pinned uv version used in Docker test environment.
.github/workflows/python-ci.yml Pins CI install of uv to 0.10.12 and adds YAML document marker.
.github/workflows/python-publish.yml Adds YAML document marker (but still pins an older uv, see comment).
.github/workflows/release-please.yml Adds YAML document marker.
.github/dependabot.yml Adds YAML document marker.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MaxG87 MaxG87 merged commit eadf9b1 into main Mar 24, 2026
12 checks passed
@MaxG87 MaxG87 deleted the fix-devastating-bug branch March 25, 2026 10:57
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.

2 participants