Skip to content

Conversation

@varmar05
Copy link
Collaborator

@varmar05 varmar05 commented Nov 14, 2025

Rewrite fallback logic for create checkpoints functions (both merged diffs and project deltas) to create intermediate (lower ranks) checkpoints if missing recursively instead of using individual diffs directly.

Advantage of this approach is that in case of too heavy request which would not complete from individual diffs now it would at least cache some partial results.

- for file diffs we only create higher ranks if it makes sense (contains changes)
- if delta cannot be created / fetched return on error
@varmar05 varmar05 requested a review from MarcelGeo November 14, 2025 15:46
@coveralls
Copy link

coveralls commented Nov 14, 2025

Pull Request Test Coverage Report for Build 19674760225

Details

  • 120 of 138 (86.96%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 94.454%

Changes Missing Coverage Covered Lines Changed/Added Lines %
server/mergin/sync/commands.py 25 27 92.59%
server/mergin/sync/models.py 38 45 84.44%
server/mergin/tests/test_middleware.py 25 34 73.53%
Totals Coverage Status
Change from base Build 19130720014: -0.002%
Covered Lines: 8566
Relevant Lines: 9069

💛 - Coveralls

@varmar05 varmar05 marked this pull request as ready for review November 25, 2025 07:39
Copy link
Collaborator

@MarcelGeo MarcelGeo left a comment

Choose a reason for hiding this comment

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

Just wondering, If we do not want flask command where projectId will be as argument. This command will create checkpoints tree for some project. We do not need to manage it trough api call.

Copy link
Collaborator

@MarcelGeo MarcelGeo left a comment

Choose a reason for hiding this comment

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

Nice

Do not update global config variable for gevent mode. Make sure we do not use gevent env for tests apart of dedicated tests.
In those tests mock configuration rather than modifing global variable.
@varmar05 varmar05 merged commit 3a51545 into dev-r85-v2-pull Nov 26, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants