chaoss / chaoss/grimoirelab-sortinghat
Problems storing truncated strings for Identity properties
- Dominant language
- Python
- Stars
- 58
- Forks
- 89
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 2
Description
The current schema allows to insert values for the current `Identity` properties: `source`, `email`, `name` and `username` that due to their length are truncated to fit in the fields of the `identities` table. This is possible in DBMS like MySQL when `STRICT_TRANS_TABLES` or similar kind of parameters are not set.
There are two reasons to forbid this behaviour:
1. The values in the tables are different to those the user wanted to store
2. The UUID of the identity is invalid. Currently, the id of an identity is generated using the original values given by the user and not using the truncated values. This means the generated ID is wrong for a identity which its properties were truncated and we cannot recover the ID of one of these identities using the tuple (source, email, name, username).
Issue related #67
Contributor guide
Research direction
Start by tracing the Identity properties source, email, name, and username into the identities table and the identity UUID generation path. Reproduce insertion with values longer than the schema permits under a non-strict MySQL configuration; done means truncation is rejected and the stored identity values and generated UUID remain consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, python
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100