From 0bc501fc912987f5962c3c1f00750c9da26437a1 Mon Sep 17 00:00:00 2001 From: Iwan Eising Date: Tue, 28 Jul 2026 08:20:36 +0400 Subject: [PATCH] fix(CI): stop the NVD cache refresh from timing out on every cold sync 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. --- .github/workflows/nvd-cache-refresh.yml | 2 +- nvd-cache-primer/build.gradle | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nvd-cache-refresh.yml b/.github/workflows/nvd-cache-refresh.yml index d4383a7..dfa1ae7 100644 --- a/.github/workflows/nvd-cache-refresh.yml +++ b/.github/workflows/nvd-cache-refresh.yml @@ -67,7 +67,7 @@ jobs: NVD_APIKEY_SEDR: ${{ secrets.NVD_APIKEY_SEDR }} - name: Save NVD Database Cache - if: steps.nvd-update.outputs.nvd_update_timed_out != 'true' && steps.nvd-update.outputs.nvd_update_failed != 'true' + if: steps.nvd-update.outputs.nvd_update_failed != 'true' uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 with: path: ~/.gradle/dependency-check-data diff --git a/nvd-cache-primer/build.gradle b/nvd-cache-primer/build.gradle index 81e64f4..6ad0aa4 100644 --- a/nvd-cache-primer/build.gradle +++ b/nvd-cache-primer/build.gradle @@ -9,6 +9,7 @@ repositories { dependencyCheck { nvd { apiKey = System.getenv('NVD_APIKEY_SEDR') ?: System.getenv('NVD_APIKEY') + delay = 800 } failBuildOnCVSS = 9 format = 'HTML'