#3565 - Virus Scanning - Retry on error
- Ensured that a scanned file returning something different than true or false will be retried later.
- Investigate on what is returned during a virus scan failed and check if there is difference between null and undefined in the response and a way to capture the error thrown.
- Created interface
VirusScanCodeto ensure expected behavior from methodscanFile. - Added key
isServerAvailableto the response for queue methodperformVirusScan.
- Created interface
- Updated the virus-scan queue configuration as below (suggested 12 attempts every 30min).
{
"retry": 12,
"cleanUpPeriod": 604800000,
"retryInterval": 900000,
"dashboardReadonly": false
}
- Removed the NotFound exception as it is not related to HTTP.
- Made sure that error is thrown.
- Added E2E Test(s) to ensure that exception is thrown when the scanning process does not complete.
Step Not in AC (Discussion)
- If the student file is not successfully scanned after 12 attempts, set
virus_scan_statustoPending.
Ensured that a scanned file returning something different than true or false will be retried later.
Investigate on what is returned during a virus scan failed and check if there is difference between null and undefined in the response and a way to capture the error thrown.
- Created interface
VirusScanCodeto ensure expected behavior from methodscanFile.- Added key
isServerAvailableto the response for queue methodperformVirusScan.Updated the virus-scan queue configuration as below (suggested 12 attempts every 30min).
{ "retry": 12, "cleanUpPeriod": 604800000, "retryInterval": 900000, "dashboardReadonly": false }
Removed the NotFound exception as it is not related to HTTP.
- Made sure that error is thrown.
Added E2E Test(s) to ensure that exception is thrown when the scanning process does not complete.
Step Not in AC (Discussion)
- If the student file is not successfully scanned after 12 attempts, set
virus_scan_statustoPending.Screenshot of log messages for server unavailable during file scanning in queue-consumers
Screenshot of log messages in bull dashboard
For the step not in AC, I believe the expectation was to put the file in Failed Virus Scan status if retry attempts fail.
Quality Gate passed
Issues
0 New issues
2 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Backend Unit Tests Coverage Report
| Totals | |
|---|---|
| Statements: | 21.92% ( 3419 / 15601 ) |
| Methods: | 10.01% ( 195 / 1949 ) |
| Lines: | 25.6% ( 3011 / 11764 ) |
| Branches: | 11.28% ( 213 / 1888 ) |
E2E Workflow Workers Coverage Report
| Totals | |
|---|---|
| Statements: | 58.64% ( 509 / 868 ) |
| Methods: | 52.88% ( 55 / 104 ) |
| Lines: | 62.27% ( 411 / 660 ) |
| Branches: | 41.35% ( 43 / 104 ) |
E2E Queue Consumers Coverage Report
| Totals | |
|---|---|
| Statements: | 84.15% ( 993 / 1180 ) |
| Methods: | 83.47% ( 101 / 121 ) |
| Lines: | 85.34% ( 850 / 996 ) |
| Branches: | 66.67% ( 42 / 63 ) |
E2E SIMS API Coverage Report
| Totals | |
|---|---|
| Statements: | 64.03% ( 5230 / 8168 ) |
| Methods: | 60.73% ( 631 / 1039 ) |
| Lines: | 68.3% ( 4144 / 6067 ) |
| Branches: | 42.84% ( 455 / 1062 ) |


