Skip to content

Fix integrity error handling#496

Merged
MarcelGeo merged 3 commits intodev-r84-concurrent-pushfrom
fix-error-integrity-handling
Sep 1, 2025
Merged

Fix integrity error handling#496
MarcelGeo merged 3 commits intodev-r84-concurrent-pushfrom
fix-error-integrity-handling

Conversation

@varmar05
Copy link
Collaborator

No description provided.

@varmar05 varmar05 requested a review from MarcelGeo August 15, 2025 11:48
@coveralls
Copy link

coveralls commented Aug 15, 2025

Pull Request Test Coverage Report for Build 17034977458

Details

  • 18 of 19 (94.74%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 91.99%

Changes Missing Coverage Covered Lines Changed/Added Lines %
server/mergin/sync/public_api_v2_controller.py 4 5 80.0%
Totals Coverage Status
Change from base Build 16991018319: 0.1%
Covered Lines: 7488
Relevant Lines: 8140

💛 - Coveralls

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.

If I tried this with existing Upload entry in the table. v2 project push was not not

INSERT INTO upload () VALUES ("projectid", version)

And tried then sync_project in py-client:

  • pull
  • push

Upload entry disappeared and I was able to do push. Not sure If this is good behavior.

@varmar05
Copy link
Collaborator Author

If I tried this with existing Upload entry in the table. v2 project push was not not

INSERT INTO upload () VALUES ("projectid", version)

And tried then sync_project in py-client:

* pull

* push

Upload entry disappeared and I was able to do push. Not sure If this is good behavior.

Not sure I understand it correctly but if you run raw SQL query (not from application) then you will insert upload record to table but lockfile will not be created, therefore such upload is considered as inactive (invalid) and will be removed by subsequent push attempt.

To have blocking upload you need both, a record in database and recently updated associated lockfile.

@MarcelGeo
Copy link
Collaborator

It works with lockfile ... nice 🌮

@MarcelGeo MarcelGeo merged commit 8765c8f into dev-r84-concurrent-push Sep 1, 2025
4 checks passed
@MarcelGeo MarcelGeo deleted the fix-error-integrity-handling branch September 24, 2025 13:50
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.

3 participants