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

feat: add borgbackup/borg #23845

Merged
merged 6 commits into from
Jun 11, 2024
Merged

Conversation

reitzig
Copy link
Contributor

@reitzig reitzig commented Jun 11, 2024

Check List

Add borgbackup/borg to the registry.

While it's also a Python package, single executables are provided by the maintainer and a supported installation method.
ref: https://borgbackup.readthedocs.io/en/1.4-maint/installation.html#pyinstaller-binary

@reitzig reitzig changed the title Feat/borgbackup/borg eat: add borgbackup/borg Jun 11, 2024
@reitzig reitzig changed the title eat: add borgbackup/borg feat: add borgbackup/borg Jun 11, 2024
@reitzig
Copy link
Contributor Author

reitzig commented Jun 11, 2024

FWIW: Scaffolding added a whole bunch of old versions and accompanying overrides. Instead of digging through years-old releases to fix all the overrides, I went ahead and deleted the old versions. Hope that doesn't break assumptions. 😅

@reitzig
Copy link
Contributor Author

reitzig commented Jun 11, 2024

🛎️ @ThomasWaldmann FYI

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Jun 11, 2024
@suzuki-shunsuke
Copy link
Member

Thank you for your contribution!

version: 0.30.0
- name: borgbackup/borg
version: 0.28.2
- name: borgbackup/borg
Copy link
Member

Choose a reason for hiding this comment

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

aqua-registry should support not only the latest version but also old versions as much as possible.
If some versions are so old that they don't work on recent machine, we can exclude them, but otherwise we should support them as much as possible.

Copy link
Member

Choose a reason for hiding this comment

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

FWIW: Scaffolding added a whole bunch of old versions and accompanying overrides. Instead of digging through years-old releases to fix all the overrides, I went ahead and deleted the old versions. Hope that doesn't break assumptions. 😅

Sorry. I missed your comment. I'm checking.

Copy link
Member

Choose a reason for hiding this comment

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

I reverted 3730a39 and I simplified version_overrides while supporting old versions. 429bf47

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the cleanup, and sorry for the mess. 🙏

TBH, I couldn't make sense of the list of versions the scaffolding chose to include. 😅

but also old versions as much as possible

I suspect there's diminishing returns the farther back you go -- and potential security issues, too. But then, responsibility of using old versions is, ultimately, on the user.

Copy link
Member

Choose a reason for hiding this comment

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

I suspect there's diminishing returns the farther back you go -- and potential security issues, too. But then, responsibility of using old versions is, ultimately, on the user.

Exactly. We leave the responsibility to users.
aqua-registry supports all versions as much as possible.
If we feel it's too hard to support old versions, we may give up supporting them.

@suzuki-shunsuke
Copy link
Member

borg worked, but was very slow even if I executed borg directly without aqua.

$ aqua which borg
/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/borgbackup/borg/1.1.12/borg-macosx64/borg-macosx64

$ time /Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/borgbackup/borg/1.1.12/borg-macosx64/borg-macosx64 --help
# ...
 --help  0.28s user 0.06s system 7% cpu 4.824 total

@@ -0,0 +1,22 @@
packages:
- name: borgbackup/borg@1.1.12
Copy link
Member

Choose a reason for hiding this comment

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

🤔 1.1.12 isn't latest. I'm not sure why cmdx s can't get the latest version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IIRC, the release API does not return releases in any particular order and you need to page. If you're already pulling all releases, I don't know.

There is a dedicated endpoint to get the latest release, so it should always be possible to get that one at least.

Copy link
Member

Choose a reason for hiding this comment

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

By default cmdx s gets all versions and sort them by semver.
So it's weird. I'll look into this when I have time, but the priority is low.

@suzuki-shunsuke
Copy link
Member

⚠️ This package doesn't support recent release candidates.
https://github.com/borgbackup/borg/releases

@suzuki-shunsuke suzuki-shunsuke merged commit dfa16a8 into aquaproj:main Jun 11, 2024
17 checks passed
@suzuki-shunsuke suzuki-shunsuke added this to the v4.192.1 milestone Jun 11, 2024
@reitzig
Copy link
Contributor Author

reitzig commented Jun 12, 2024

borg worked, but was very slow even if I executed borg directly without aqua.

$ aqua which borg
/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/borgbackup/borg/1.1.12/borg-macosx64/borg-macosx64

$ time /Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/borgbackup/borg/1.1.12/borg-macosx64/borg-macosx64 --help
# ...
 --help  0.28s user 0.06s system 7% cpu 4.824 total

Can confirm. I suspect that has to do with how the Python application is packaged and run:

Note that the binary uses /tmp to unpack Borg with all dependencies.

For this application, I'm willing to take that startup overhead over having to handle globally installed pip packages. YMMV, obviously.
(I noticed a similar slowdown for pre-commit.pyz -- in that case, less tolerable.)

@suzuki-shunsuke
Copy link
Member

v4.193.0 is out 🎉
https://github.com/aquaproj/aqua-registry/releases/tag/v4.193.0

@reitzig reitzig deleted the feat/borgbackup/borg branch June 13, 2024 10:12
ryoppippi pushed a commit to ryoppippi/aqua-registry that referenced this pull request Jul 5, 2024
* feat(borgbackup/borg): scaffold borgbackup/borg

* fix(borgbackup/borg): Fix scaffold

* Revert "fix(borgbackup/borg): Fix scaffold"

This reverts commit 3730a39.

* refactor(borgbackup/borg): refactor version_overrides

* fix(borgbackup/borg): support latest

---------

Co-authored-by: Shunsuke Suzuki <suzuki.shunsuke.1989@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants