"borgmatic check --force" does nothing if config is set to skip checks #802

Closed
opened 2023-12-28 16:09:47 +00:00 by nfp0 Β· 5 comments

What I'm trying to do and why

I'm trying to force check my repository, but the command ends instantly and no check is performed, even with the --only option specified.

For example, the command
borgmatic check --force --verbosity 1 --only archives
ends instantaneously with the output:

summary:
/home/myhome/.config/borgmatic/config.yaml: Successfully ran configuration file

After I removed

skip_actions:
    - check

from my config file, the check worked.

Is this intentional or a bug?
The documentation states I can use the --force option to ignore the config and execute any arbitrary check I want.

### What I'm trying to do and why I'm trying to force check my repository, but the command ends instantly and no check is performed, even with the `--only` option specified. For example, the command `borgmatic check --force --verbosity 1 --only archives` ends instantaneously with the output: ``` summary: /home/myhome/.config/borgmatic/config.yaml: Successfully ran configuration file ``` After I removed ``` skip_actions: - check ``` from my config file, the check worked. Is this intentional or a bug? The documentation states I can use the `--force` option to ignore the config and execute any arbitrary check I want.
Owner

Thanks for filing this! The behavior you're seeing is not intentional, but whether it's a bug is subject to interpretation. πŸ˜„ That's because the skip_actions feature was added well after the check --force feature was implemented and documented, and the two features are therefore entirely independent. I will say though that your user expectation (that check --force overrides skip_actions) seems reasonable to me. I'll have a look at how difficult that would be to implement.

Thanks for filing this! The behavior you're seeing is not intentional, but whether it's a bug is subject to interpretation. πŸ˜„ That's because the `skip_actions` feature was added well after the `check --force` feature was implemented and documented, and the two features are therefore entirely independent. I will say though that your user expectation (that `check --force` overrides `skip_actions`) seems reasonable to me. I'll have a look at how difficult that would be to implement.
Author

Thank you for the feedback! πŸ™‚

Yes, indeed my expectation is that there is a way to have checks disabled on the config file (because they take too long, for example), but still have a way to force check them at an arbitrary moment of my choice.
The current way requires the user to temporarily modify it's config file, which IMO is not a good thing.

Thank you for this excellent software, and I hope you find a way to work around this!

Thank you for the feedback! πŸ™‚ Yes, indeed my expectation is that there is a way to have checks disabled on the config file (because they take too long, for example), but still have a way to force check them at an arbitrary moment of my choice. The current way requires the user to temporarily modify it's config file, which IMO is not a good thing. Thank you for this excellent software, and I hope you find a way to work around this!
Owner

This is implemented in main and will be part of the next release. Thanks again for bringing this to my attention!

This is implemented in main and will be part of the next release. Thanks again for bringing this to my attention!
Author

Fantastic! Couldn't hope for a faster response. Many thanks! πŸ™‚

Fantastic! Couldn't hope for a faster response. Many thanks! πŸ™‚
Owner

Released in borgmatic 1.8.6!

Released in borgmatic 1.8.6!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#802
No description provided.