Init: possible confusion if base+modified schemas already exist but local project dir doesn't
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 50/100
Research direction
Inspect the initialization flow where db-sync downloads the Mergin Maps project, and trace how the existing base and modified schemas are read from the database. Check the project ID before downloading; done means an incompatible ID produces an error instead of attempting the download.
Written by the indexing model from the issue text.
Description
Seen the following case:
- configuration file "base" and "modified" schemas already exist in the database
- the project directory does not exist yet
In this scenario, db-sync will download the MM project at a particular version, but it does not check project ID first. This is a potential problem, because db-sync may try to download a project that is incompatible with the data already stored in the database - this can result in trying to fetch project at e.g. version 1234, but project may not even exist in such version, so the project download will fail.
The fix should be to check project ID before project's download, and fail with error if they do not match.
- Dominant language
- Python
- Stars
- 53
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MerginMaps/db-sync
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MerginMaps/db-sync#184 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
MerginMaps/db-sync#185 · 1 comment ·
-
db-sync enters an infinite drop/recreate loop when geodiff init fails on invalid source geometries Open
Difficulty 4/5 3-5 days Newbie friendliness 42/100
MerginMaps/db-sync#182 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
MerginMaps/db-sync#181 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MerginMaps/db-sync#179 · 3 comments ·
All issues in MerginMaps/db-sync
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100