MerginMaps / MerginMaps/db-sync
Improve logging in db-sync
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 53
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Sometimes it would help to have more information in logs when things go wrong and some debugging is needed:
- when a geodiff error happens when applying a diff, details are missing - e.g. only something like this is reported: "GEODIFF: Error: Conflicts encountered while applying changes! Total 4" -- geodiff also logs the actual changes (as warnings, see e.g. [here](https://github.com/MerginMaps/geodiff/blob/d7a404d5545ebe2901dd85493ff127f2acf4b26d/geodiff/src/drivers/postgresdriver.cpp#L862)), but they're not showing in the db-sync log (although GEODIFF_LOGGER_LEVEL=4 should be set) - to be verified why db-sync is not getting more detailed errors
- during pull in db-sync, when taking "Applying new version [no rebase]" branch - it does not say whether updating base or modified file (so when geodiff error happens, it is unclear when exactly it failed)
- db-sync should print config when starting (but remove any passwords - to MM or to DB) so that it's easier to understand the setup
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
Start at the db-sync pull path, especially the "Applying new version [no rebase]" branch, and trace how GEODIFF_LOGGER_LEVEL=4 output is received during diff application. Check startup configuration logging and the geodiff PostgreSQL driver reference linked in the issue; done means detailed errors and update targets are visible while MM and database passwords remain hidden.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- backend, databases, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100