Could not find local borg version #502
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#502
Loadingβ¦
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
π trying to upgrade the homebrew formula to use the latest release (1.5.23), but ran into some test regression issue.
Steps to reproduce (if a bug)
Checkout this PR, https://github.com/Homebrew/homebrew-core/pull/94886, and ran
brew install -s borgmatic
, and then manually execute the commands in thetest
block.Here is the test log in my local.
Actual behavior (if a bug)
Expected behavior (if a bug)
Other notes / implementation ideas
Environment
borgmatic version: [version here]
Use
sudo borgmatic --version
orsudo pip show borgmatic | grep ^Version
borgmatic installation method: [e.g., Debian package, Docker container, etc.]
Borg version: [version here]
1.5.23
Python version: [version here]
3.10.x
Database version (if applicable): [version here]
N/A
operating system and version: [OS here]
macOS 12-arm
This looks to be a problem with the Homebrew package and it's own "end-to-end" tests. (The Homebrew package is not maintained by the borgmatic project.) Specifically, it's creating a fake Borg binary and then actually running borgmatic, which among other things, invokes
borg --version
and expects a valid version string to come back. (This recent change in borgmatic is necessary to support compatibility differences between Borg 1.1 and the impending Borg 1.2)One fix would be to alter the fake Borg binary to support
--version
, although I cannot guarantee that it won't break similiarly in the future.Ultimately, I do not recommend maintaining end-to-end tests outside borgmatic, since they are prone to breakage when these sorts of changes occur. Instead, I recommend running the supported and maintained end-to-end tests via
scripts/run-full-dev-tests
within the borgmatic source. However, those tests have a Docker dependency, which may make that a hard sell in a Homebrew environment.I'll try to file an issue with Homebrew and link it here.
EDIT: It looks like the official Homebrew repo has an older version of borgmatic, so I can't very well file a ticket with them for an issue that doesn't yet exist there. If you happen to be the/a maintainer of the borgmatic Homebrew package, then maybe this issue constitutes passing on that information?
Closing this ticket for now, since there's not anything I can do in the borgmatic source to fix it. However, please feel free to post any follow-ups on this ticket. And if there's anything I can do to make borgmatic tests easier to run in a Homebrew environment, please let me know. Thank you for filing this!
I ran across this exact test failure while trying to update the outdated
borgmatic
Homebrew formula, after noticing the packaged version was older than what's on PyPI.I didn't discover this issue until just now, but essentially implemented what you suggested above. The "test" block isn't meant to be comprehensive, so it should be fine now.
For reference: https://github.com/Homebrew/homebrew-core/pull/102656, which will update the version from 1.5.22 -> 1.6.1.
Thanks!
I had to do some more extensive stubbing for 1.6.2 - very open to suggestions!
Hopefully this is a little more resilient to changes
https://github.com/Homebrew/homebrew-core/pull/102739