Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustic check reports ERROR but returns 0 exit code #1236

Open
kapitainsky opened this issue Sep 12, 2024 · 1 comment
Open

rustic check reports ERROR but returns 0 exit code #1236

kapitainsky opened this issue Sep 12, 2024 · 1 comment
Labels
A-errors Area: error handling needs improvement C-bug Category: Something isn't working as expected

Comments

@kapitainsky
Copy link
Contributor

kapitainsky commented Sep 12, 2024

$ rustic --version
rustic 0.8.1

$ rustic check
[INFO] using config ./rustic.toml
[INFO] repository rclone:OD01-ENC:rustic_kptsky_backup: password is correct.
[INFO] using cache at /Users/kptsky/Library/Caches/rustic/75d391929ae92a6d1f797a8725950e8ac8a59424dbbdb4df5db1f06a8d87f348
[00:00:00] checking Snapshot in cache...  ████████████████████████████████████████   3.10 KiB/3.10 KiB   1.30 MiB/s   (ETA -)
[00:00:00] checking Index in cache...     ████████████████████████████████████████  14.22 MiB/14.22 MiB  1.24 GiB/s   (ETA -)
[00:00:01] reading index...               ████████████████████████████████████████         10/10                                                                               [00:00:00] listing packs...               ⠁                                                                                                                                    
[ERROR] pack 8213a0ba: size computed by index: 36, actual size: 17074311. To repair: 'rustic repair index'.
[00:05:31] listing packs...
[00:00:00] cleaning up packs from cache...
[00:03:47] checking packs in cache...     ████████████████████████████████████████   1.30 GiB/1.30 GiB   5.85 MiB/s   (ETA -)
[00:00:02] reading snapshots...           ████████████████████████████████████████          5/5
[00:00:21] checking trees...              ████████████████████████████████████████          5/5

$ echo $?
0

so either it is not an ERROR but WARNING(?) or returned code is wrong. It makes very difficult to script rustic operations if returned error codes do not reflect reality and manual logs reading is required.

@kapitainsky kapitainsky changed the title rustic check reports ERROR but return 0 exit code rustic check reports ERROR but returns 0 exit code Sep 12, 2024
@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Sep 12, 2024
@aawsome
Copy link
Member

aawsome commented Sep 15, 2024

Thanks @kapitainsky for opening this issue.

This is actually already known and there is rustic-rs/rustic_core#224 on the run.. It just misses some general discussion of us maintainers how to handle all error situations in rustic_core/rustic

@aawsome aawsome added C-bug Category: Something isn't working as expected and removed S-triage Status: Waiting for a maintainer to triage this issue/PR labels Sep 15, 2024
@simonsan simonsan added the A-errors Area: error handling needs improvement label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-errors Area: error handling needs improvement C-bug Category: Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants