Get rid of $date syntax in JSON documents in account._sync_status
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 30
- Forks
- 13
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 8
Description
See also https://github.com/closeio/sync-engine/pull/771
This syntax is not human readable as an artifact of reliance pymongo's extended json capabilities. It's only used in this single column. The tables in all the clusters are very small (~80MB) so I don't see a problem with rewriting this data.
Steps:
- Adapt CRM side code that parses $date, to also accept normal ISO serialization of datetimes, like we do everywhere else. We currently ingest this data to CRM through sync-engine's API to calculate account status and delays.
- Ship a change to sync-engine that uses ISO datetimes instead of $date
- Run a script to convert all the data in sync-engine
- Remove inbox/sqlalchemy_ext/json_util.py and just use stdlib's json module
- Drop support for $date from CRM side
Contributor guide
No contributing guide indexed for this repository
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 with inbox/models/account.py at the referenced account._sync_status handling, then review the related CRM parsing and pull request 771. Verify the migration sequence: CRM accepts ISO datetimes, sync-engine writes them, existing rows are converted, json_util.py is removed, and CRM no longer accepts $date.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend, database
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100