Skip to content

Error in push finish#321

Merged
varmar05 merged 8 commits intodevelopfrom
error_in_push_finish
Nov 21, 2024
Merged

Error in push finish#321
varmar05 merged 8 commits intodevelopfrom
error_in_push_finish

Conversation

@harminius
Copy link
Contributor

@harminius harminius commented Nov 7, 2024

Task: https://github.com/MerginMaps/server-private/issues/2558

Situation:
When migrating project files project without a file were given Null value to the file history id. We expect this field not be Null. The caching method which should update the field fails to do it because it cannot find a file associated with the project id.

Solution
When no files are found when caching the latest files, put an empty array in the column and don't keep it Null.

Bonus:
Fix flask cmd to create a project.

@harminius harminius requested a review from MarcelGeo November 7, 2024 15:13
@coveralls
Copy link

coveralls commented Nov 7, 2024

Pull Request Test Coverage Report for Build 11949337990

Details

  • 17 of 28 (60.71%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.1%) to 93.853%

Changes Missing Coverage Covered Lines Changed/Added Lines %
server/mergin/sync/commands.py 3 14 21.43%
Files with Coverage Reduction New Missed Lines %
server/mergin/sync/commands.py 1 31.4%
Totals Coverage Status
Change from base Build 11914247004: -0.1%
Covered Lines: 6428
Relevant Lines: 6849

💛 - Coveralls

@MarcelGeo MarcelGeo requested a review from varmar05 November 8, 2024 10:45
@varmar05
Copy link
Collaborator

"Make file_history_ids not nullable?" It was meant to be nullable and updated only on demand (first pull / get info) as whole migration would have been very heavy. So probably we maybe want to cache files ids if it is null as a fix.

@harminius
Copy link
Contributor Author

"Make file_history_ids not nullable?" It was meant to be nullable and updated only on demand (first pull / get info) as whole migration would have been very heavy. So probably we maybe want to cache files ids if it is null as a fix.

Actually, I found out the latest project files are cached in this scenario.

That's why the problem is only in empty projects. The caching method finds no files to cache and keeps the column null.

@harminius harminius force-pushed the error_in_push_finish branch 2 times, most recently from cf71fe3 to 73b5fb9 Compare November 20, 2024 15:00
@harminius harminius force-pushed the error_in_push_finish branch from 73b5fb9 to 32f61a0 Compare November 20, 2024 15:02
@varmar05
Copy link
Collaborator

Actually, I found out the latest project files are cached in this scenario.

That's why the problem is only in empty projects. The caching method finds no files to cache and keeps the column null.

If caching method finds no files then I guess it should set it to empty array rather that NULL which should be only used if that row has never been cached.

@varmar05 varmar05 merged commit 3dc84cb into develop Nov 21, 2024
@MarcelGeo MarcelGeo deleted the error_in_push_finish branch January 9, 2025 15:21
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