Add S3 cache download validation and retry logic

- Add empty file validation (0 bytes) and minimum size checks (512 bytes) for tar archives
- Implement download completeness validation (bytes downloaded = expected)
- Add retry logic with exponential backoff for validation failures (3 attempts: 1s/2s/4s delays)
- Create DownloadValidationError class for specific validation failures
- Add comprehensive test coverage for validation scenarios
- Maintain graceful degradation - validation failures log warnings but don't fail workflows
This commit is contained in:
Brenden Matthews 2025-06-20 16:35:40 -04:00
parent 7994cabd39
commit a28af779d2
No known key found for this signature in database
GPG key ID: 65458E93BD621972
12 changed files with 603 additions and 82 deletions

View file

@ -46,7 +46,7 @@
"eslint-plugin-simple-import-sort": "^7.0.0",
"jest": "^28.1.3",
"jest-circus": "^27.5.1",
"nock": "^13.2.9",
"nock": "^13.5.6",
"prettier": "^2.8.8",
"ts-jest": "^28.0.8",
"typescript": "^4.9.3"