Currently we're tracking message updates and displaying groups that are being processed. When a `MessageUpdate` job fails or times out, we add an error log but that is not actionable or easy to look back on. Eventually we want to stop imports / exports from translatewiki.net based on these failures, so it's important to display them clearly to translation administrators.
This could be done by,
Display current failures to administrators on `Special:ManageMessageGroups` with the list of groups, and the message updates that failed in a dialog.
* Each message listed should link to the message on the wiki, it's history
* For the group it would be useful to have the remote repository URL
Track historical data via [[ https://www.mediawiki.org/wiki/Manual:Logging_to_Special:Log/en | Special:Log ]]. Eventually when administrators mark failures as fixed it can be tracked here as well.
## Updates to Group Synchronization Cache
The current errors until they are resolved by the administrator will be tracked via the Group synchronization cache.
We will track,
1. the groups that are in error
2. each message update that failed
The way I'm planning to track errors:
Store groups that have errors:
- Key: `gsc_%error%_$groupId` (prefixed with hash)
- Hash: `substr( hash( 'sha256', $groupId ), 0, 40 );`
- Value: JSON serialized- `GroupSynchronizationResponse` (without the `$remainingMessages`)
- Exp Time: None
- Tag: `gsc_%group_with_error%`
Each message that have error will be added:
- Key: `gsc_%error%_$groupId_$messageKey` (prefixed with hash)
- Hash: `substr( hash( 'sha256', $key ), 0, 40 )` where `$key = $groupId . '_' . $messageKey;`
- Value: `MessageUpdateParameter` object
- Exp Time: None
- Tag: `gsc_%error%_$groupId`
* Add new property for `MessageUpdateParameter`: `$result (string)` (This will have the error)
New methods to be added:
- `getGroupsWithErrors(): string` - Returns groupIds that have errors
- `getGroupErrors(): GroupSynchronizationResponse` (with remainingMessages set)