fix(CI): stop the NVD cache refresh from timing out on every cold sync - #46
Merged
Conversation
Same root cause identified in Arc-E-Tect/SoftwareEngineeringDoneRight-Code#222: - nvd.delay was unset (plugin default), and Save NVD Database Cache was skipped whenever the update timed out, so a cold sync's partial progress was discarded and every scheduled run restarted the full ~370k-record NVD download from zero - a permanent cache-miss loop independent of the timeout value. - Set nvd.delay = 800ms explicitly (NVD's keyed limit is 50 req/30s, i.e. ~600ms is enough; 800ms leaves margin), matching the value validated against a real cold sync in the Code repo. - Save the cache after any non-failed run (timed out or not), so runs make incremental progress instead of endlessly re-fetching the same first slice.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Same root cause diagnosed and fixed in SoftwareEngineeringDoneRight-Code#222, which shares this exact workflow pattern:
Save NVD Database Cacheonly ran when the update didn't time out. A cold sync of the full NVD dataset (~370k records) can't complete inside the 15-minute timeout, so every run's partial download was discarded and the next scheduled run started over from zero - a permanent cache-miss loop no matter how long the timeout is.nvd.delaywas left unset (plugin default). Set it explicitly to800ms- NVD's keyed API limit is 50 requests/30s (~600ms is enough), and 800ms is the exact value validated against a real cold sync in the Code repo.Save NVD Database Cachenow runs after any non-failed run (timed out or not), so runs accumulate progress instead of endlessly re-fetching the same first slice.