-
-
Notifications
You must be signed in to change notification settings - Fork 744
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
optional more specific return codes #7928
Commits on Dec 2, 2023
-
BORG_EXIT_CODES=modern can be set to get more specific process exit c…
…odes If not set, it will default to "legacy" (always return 2 for errors). This commit only changes the Error exception class and its subclasses. The more specific exit codes need to be defined via .exit_mcode in the subclasses.
Configuration menu - View commit details
-
Copy full SHA for adbb1d5 - Browse repository at this point
Copy the full SHA adbb1d5View commit details -
scripts/errorlist.py: improve error list docs generation
- also output modern rc and traceback yes/no - recursive list of Error subclasses
Configuration menu - View commit details
-
Copy full SHA for c147818 - Browse repository at this point
Copy the full SHA c147818View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a6d86d - Browse repository at this point
Copy the full SHA 2a6d86dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fb61d0 - Browse repository at this point
Copy the full SHA 6fb61d0View commit details -
- _export_tar: remove unneeded call to set_ec print_warning() already sets the exit code to EXIT_WARNING. - msgpack version check: raise Error instead of calling set_ec
Configuration menu - View commit details
-
Copy full SHA for 9b62016 - Browse repository at this point
Copy the full SHA 9b62016View commit details -
fix dealing with remote repo Locking Exceptions
previously, this was handled in RPCError handler and always resulted in rc 2. now re-raise Lock Exceptions locally, so it gives rc 2 (legacy) or 7x (modern).
Configuration menu - View commit details
-
Copy full SHA for 32d0fbe - Browse repository at this point
Copy the full SHA 32d0fbeView commit details -
shorten TAMRequiredError error msg
Users using recently created repos (after borg 1.0.9) or who followed the upgrade procedure of 1.0.9 or >1.2.4 will never see this error msg. So, have it as short as and similar to the ArchiveTAMRequiredError.
Configuration menu - View commit details
-
Copy full SHA for c6bde98 - Browse repository at this point
Copy the full SHA c6bde98View commit details -
Configuration menu - View commit details
-
Copy full SHA for b31b630 - Browse repository at this point
Copy the full SHA b31b630View commit details
Commits on Dec 15, 2023
-
new warnings infrastructure to support modern exit codes
- implement updating exit code based on severity, including modern codes - extend print_warning with kwargs wc (warning code) and wt (warning type) - update a global warnings_list with warning_info elements - create a class hierarchy below BorgWarning class similar to Error class - diff: change harmless warnings about speed to rc == 0 - delete --force --force: change harmless warnings to rc == 0 Also: - have BackupRaceConditionError as a more precise subclass of BackupError
Configuration menu - View commit details
-
Copy full SHA for bd2136f - Browse repository at this point
Copy the full SHA bd2136fView commit details -
Configuration menu - View commit details
-
Copy full SHA for b179dd1 - Browse repository at this point
Copy the full SHA b179dd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f77b6a7 - Browse repository at this point
Copy the full SHA f77b6a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for f88fac4 - Browse repository at this point
Copy the full SHA f88fac4View commit details -
Configuration menu - View commit details
-
Copy full SHA for df168f4 - Browse repository at this point
Copy the full SHA df168f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for af30559 - Browse repository at this point
Copy the full SHA af30559View commit details -
Configuration menu - View commit details
-
Copy full SHA for d13d98c - Browse repository at this point
Copy the full SHA d13d98cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7316d10 - Browse repository at this point
Copy the full SHA 7316d10View commit details -
BackupErrors get caught and give warning RCs
also: use more union operators rather than .union()
Configuration menu - View commit details
-
Copy full SHA for d3a11fb - Browse repository at this point
Copy the full SHA d3a11fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d7eb08 - Browse repository at this point
Copy the full SHA 5d7eb08View commit details -
do not return the rc from Archiver methods
this is not needed and getting rid of it makes the code / behaviour simpler to understand: if a fatal error is detected, we throw an exception. if we encounter something warning worthy, we emit and collect the warning. in a few cases, we directly call set_ec to set the exit code as needed, e.g. if passing it through from a subprocess. also: - get rid of Archiver.exit_code - assert that return value of archiver methods is None - fix a print_warning call to use the correct formatting method
Configuration menu - View commit details
-
Copy full SHA for 330b350 - Browse repository at this point
Copy the full SHA 330b350View commit details -
refactor (re-)init of exit_code and warnings_list globals
stop directly accessing the variables from other modules. prefix with underscore to indicate that these shall only be used within this module and every other user shall call the respective functions.
Configuration menu - View commit details
-
Copy full SHA for 38cb364 - Browse repository at this point
Copy the full SHA 38cb364View commit details -
use get_reset_ec to internally re-init ec/warnings
if we do multiple calls to Archiver.do_something(), we need to reset the ec / warnings after each call, otherwise they will keep growing (in severity, in length).
Configuration menu - View commit details
-
Copy full SHA for 3a18393 - Browse repository at this point
Copy the full SHA 3a18393View commit details