For gpkg file restore always use diff checkpoints#594
Open
For gpkg file restore always use diff checkpoints#594
Conversation
Drop legacy support to use individual 0 rank diffs. Instead always use diff checkpoints and create them recursively if needed. This change uses the same logic as we do in v2 endpoints.
Pull Request Test Coverage Report for Build 23056716878Details
💛 - Coveralls |
MarcelGeo
reviewed
Mar 13, 2026
| if not os.path.exists(abs_path): | ||
| logging.error(f"Missing file {namespace}/{project_name}/{file_path}") | ||
| abort(404) | ||
| if version and not diff: |
Collaborator
There was a problem hiding this comment.
Probably add some reolving map on the start of controller, where we can make actions based on this version and diff attributes.
If not version and diff: abort
If version and diff: download_diff
If not diff and version: dowload_geopackage
Where is handled a non gpkg file?
MarcelGeo
requested changes
Mar 13, 2026
| ) | ||
| .filter( | ||
| FileDiff.version >= item.start, FileDiff.version <= item.end | ||
| db.session.add(diff) |
Collaborator
There was a problem hiding this comment.
Do we want to follow commit in the end?
| diff = FileDiff.query.filter_by( | ||
| file_path_id=file_path_id, version=20, rank=1 | ||
| ).first() | ||
| os.remove(diff.abs_path) |
Collaborator
There was a problem hiding this comment.
Why removed assert which was before here on this line?
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
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.
Drop legacy support to use individual 0 rank diffs. Instead always use diff checkpoints and create them recursively if needed. This change uses the same logic as we do in v2 endpoints.
Please note that reconstruction can still throw 502/504 if backend does not make it within allowed time. As each try can now take less time to finish (intermediate checkpoints created), clients can implement retry logic.