|
Ran
|
Jobs
10
|
Files
892
|
Run time
2min
|
Badge
README BADGES
|
push
github
feat(bulkProcessing): add audio duration estimate to bulk transcription modal DEV-2255 (#7177) ### đŖ Summary Adds an estimated total time for all selected submissions' audio attachments in the bulk transcription modal. ### đ Notes Implemented with parallel batched requests with exponential backoff if there is a 504. Pseudo-code: ``` for each batch of â¤50 UIDs: attempt = 0 while attempt < 3: POST /api/v2/assets/{asset_uid}/attachments/audio-duration/ if 200 â store results, break if 504 â attempt++, wait, retry if other error â surface error, break if attempt == 3 â abort, surface error aggregate total client-side ``` ### đ Preview steps **In order to test everything, you may want to have the following:** - create ways to generate multiple batches. This can be done with: - `mockobo` to generate many submissions with audio files (> 500) - or you can generate a few, and change the constant in `BulkTranscriptionModal` - return a 504 [here](https://github.com/kobotoolbox/kpi/blob/1e86db2d5/kpi/views/v2/attachment_audio_duration.py#L56-L57) in order to test the retries + exponential backoff 1. âšī¸ have the above ready 2. set the number or rows displayed to 500 3. select all the rows and open the bulk transcription modal 5. đĸ [on PR] notice that there is a `...` until the audio duration loads & the duration is accurate when it does 6. generate the `504` in the backend code 7. Open the bulk transcription modal the say way again 8. đĸ notice that in the network tab, there is maximum 3 tries then a toast after the last try --------- Co-authored-by: James Kiger <james.kiger@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Leszek <smutnyleszek@gmail.com>
9293 of 12613 branches covered (73.68%)
30273 of 37124 relevant lines covered (81.55%)
5.52 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 29012112022.1 | 888 |
49.64 |
||
| 2 | 29012112022.2 | 888 |
52.98 |
||
| 3 | 29012112022.3 | 888 |
44.46 |
||
| 4 | 29012112022.4 | 890 |
45.83 |
||
| 5 | 29012112022.5 | 890 |
50.97 |
||
| 6 | 29012112022.6 | 890 |
54.24 |
||
| 7 | 29012112022.7 | 890 |
66.75 |
||
| 8 | 29012112022.8 | 890 |
60.12 |
||
| 9 | 29012112022.9 | 892 |
69.07 |
||
| 10 | 29012112022.10 | 888 |
58.96 |
| Coverage | â | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|