forked from borgbackup/borg
-
Notifications
You must be signed in to change notification settings - Fork 0
Fix Pydantic models for Borg 1.4 JSON output #1
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
Closed
a-gn
wants to merge
1,999
commits into
8338-pydantic-models
from
claude/verify-borg-json-models-011CURmujYDbsxH8b7JAg7sw
Closed
Fix Pydantic models for Borg 1.4 JSON output #1
a-gn
wants to merge
1,999
commits into
8338-pydantic-models
from
claude/verify-borg-json-models-011CURmujYDbsxH8b7JAg7sw
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
forward port to get code in sync with 1.4-maint. use "pip install -e ." before invoking pyinstaller, so we have the _version.py built by setuptools_scm and also it compiled the extension modules, so pyinstaller can pick them up. msys2 hack: https://stackoverflow.com/questions/76079590/error-plat-name-must-be-one-of-win32-win-amd64-win-arm32-win-arm6
todo: clean clean2 build_usage build_man
…empty-paths-master PATH: do not accept empty strings, fixes borgbackup#4221
…ster use and require cython3
…uires-master use pip and build
there, it will be packaged and installed, so that when one runs the testsuite after installing the pypi package, it will find the conftest.py.
…ller-master use pyinstaller 6.3.0
…py-master move conftest.py to src/borg/testsuite, see borgbackup#6386
docs: add example for borg with-lock
…n-key-gen-master crypto: use a one-step kdf for session keys, fixes borgbackup#7953
there are multiple issues with that box: - debian 9 is out of support by debian, out of even lts support since 2022 - it has a OpenSSL 1.x natively (and our source based install also used 1.x) - that is also out of support and noone will care for it. Also, borg2 will still take a while, so it would be even more outdated at release time as it already is now.
same as in 1.4-maint branch
the netbsd vagrant machine tends to segfault, guess due to some kernel or virtualbox issue. thus, rather only do 1 tox run, so there is less output to review.
…-master add script for fetching borg binaries from VMs, fixes borgbackup#7989
…s-master Vagrant updates (master)
I usually just uploaded that into the GH release assets, but let's also have it in git.
…es-master Vagrant machines updates (port to master)
Beta testing notes / binary readme
…des-by-default make BORG_EXIT_CODES="modern" the default, fixes borgbackup#8110
In this case, the export functions output to stdout. Also: add a note why this code is needed.
export_paperkey also must not get an already existing directory.
…ename-master key export fixes (master)
it needs to be like this to support a ~/.pypirc like this,
containing a separate upload token for the borgbackup project:
[distutils]
index-servers =
borgbackup
...
[borgbackup]
repository = https://upload.pypi.org/legacy/
username = __token__
password = pypi-...(token)...
Release 2.0.0b9
test the healing more thoroughly: - preservation of correct chunks list in .chunks_healthy - check that .chunks_healthy is removed after healing - check that doing another borg check --repair run does not find something to heal, again. also did a datatype consistency fix for item.chunks_healthy list members: they are now post processed in the same way as item.chunks, so they have type ChunkListEntry rather than simple tuple.
…g-test-master improve borg check --repair healing tests, see borgbackup#8302
also: reorder
Add Open Collective to FUNDING.yml
- Closes borgbackup#8310
Add TIMESPAN to doc
remove outdated comment, fixes borgbackup#4240
docs: align /etc/backups path references in automated backups deployment guide
Adds Pydantic models that accurately parse Borg 1.4-maint JSON output based on analysis of the actual source code. Models include: - Log line models: ArchiveProgressLogLine, ProgressMessage, ProgressPercent, FileStatus, LogMessage - Result models: BorgCreateResult, BorgListResult - Archive models: _BorgArchive, _BorgDetailedArchive, _BorgArchiveStatistics, _BorgLimitUsage Key implementation details verified against Borg 1.4-maint source: - All log lines have 'type' discriminator field - ArchiveProgressLogLine fields are optional (only present when finished=False) - Path fields use str (from remove_surrogates()) not Path - chunker_params can be str or List[Union[str, int]] - Some _BorgDetailedArchive fields only in borg info, not create Python 3.10 compatible, mypy type-checked. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
8b2379a to
314ded7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merging Claude's fixes, based on reading borg 1.4's actual code creating these outputs, into my own PR to borg upstream.