MerginMaps / MerginMaps/db-sync
Init: possible confusion if base+modified schemas already exist but local project dir doesn't
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 53
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
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.
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.
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.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100