ci: add retry logic for npm install and skip scripts in license scan#295
ci: add retry logic for npm install and skip scripts in license scan#295carlos-alm merged 3 commits intomainfrom
Conversation
Transient GitHub CDN outages (503/500 for onnxruntime, wasi-sdk, tree-sitter-cli) cause CI failures unrelated to code changes. - ci.yml + codegraph-impact.yml: retry npm install up to 3 times with 15s delay between attempts - shield-license-compliance.yml: add --ignore-scripts since license-checker only reads package.json metadata and never needs compiled/downloaded binaries
|
Claude finished @carlos-alm's task —— View job Reviewing PR: ci: add retry logic for npm install and skip scripts in license scanTodo List:
Root Cause AnalysisProblem Being Solved: Transient GitHub CDN outages (503/500 errors) causing CI failures unrelated to code changes, as seen in PR #293. This is a legitimate infrastructure reliability issue affecting the development workflow. Why This Approach:
Risk Assessment: LOW RISK - These are defensive reliability improvements, not masking underlying code issues. Configuration Change Analysis✅ LOW SCRUTINY - No rule relaxation detected:
Test Integrity Assessment✅ NO RED FLAGS:
Code Quality Review✅ Strengths:
🔍 Minor Observations:
🎯 Technical Validation:
Final AssessmentRecommendation: APPROVE ✅ This PR effectively addresses a real infrastructure reliability issue with well-implemented solutions. The retry logic is industry-standard, properly handles errors, and the |
Windows runners default to PowerShell which cannot parse bash for-loop syntax. Explicitly set shell: bash on all retry steps.
|
Claude finished @carlos-alm's task —— View job Reviewing PR: ci: add retry logic for npm install and skip scripts in license scanTodo List:
Root Cause AnalysisProblem Being Solved: Transient GitHub CDN outages (503/500 errors) causing CI failures unrelated to code changes, as seen in PR #293. This is a legitimate infrastructure reliability issue affecting the development workflow. Why This Approach:
Risk Assessment: LOW RISK - These are defensive reliability improvements, not masking underlying code issues. Configuration Change Analysis✅ LOW SCRUTINY - No rule relaxation detected:
Test Integrity Assessment✅ NO RED FLAGS:
Code Quality Review✅ Strengths:
🔍 Minor Observations:
🎯 Technical Validation:
Final AssessmentRecommendation: APPROVE ✅ This PR effectively addresses a real infrastructure reliability issue with well-implemented solutions. The retry logic is industry-standard, properly handles errors, and the |
Greptile SummaryAdds resilient retry logic (3 attempts with 15-second delays) to all npm install/ci steps across CI workflows to handle transient GitHub CDN outages (503/500 errors). The implementation is consistent across all three workflows, uses proper GitHub Actions annotations (
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 38bed48 |
|
|
||
| - name: Install dependencies | ||
| run: npm ci --prefer-offline --no-audit --no-fund | ||
| run: npm ci --prefer-offline --no-audit --no-fund --ignore-scripts |
There was a problem hiding this comment.
consider adding the same retry logic here - CDN outages affect npm ci downloads just as much as npm install
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Good call — added the same retry loop around npm ci in 38bed48. The --ignore-scripts stays too since it avoids the most common failure (post-install binary downloads like onnxruntime CUDA), while the retry handles registry-level 503s.
Belt-and-suspenders: --ignore-scripts avoids most CDN failures but the registry itself can also 503. Add the same retry loop used in the other workflows.
|
Claude finished @carlos-alm's task —— View job Reviewing PR: ci: add retry logic for npm install and skip scripts in license scanTodo List:
Root Cause AnalysisProblem Being Solved: Transient GitHub CDN outages (503/500 errors) causing CI failures unrelated to code changes, as seen in PR #293. This is a legitimate infrastructure reliability issue affecting the development workflow. Why This Approach:
Risk Assessment: LOW RISK - These are defensive reliability improvements, not masking underlying code issues. Configuration Change Analysis✅ LOW SCRUTINY - No rule relaxation detected:
Test Integrity Assessment✅ NO RED FLAGS:
Code Quality Review✅ Strengths:
🔍 Minor Observations:
|
Summary
npm installup to 3 times with 15s delay between attempts, surfacing warnings/errors via::warning::and::error::annotationsnpm install--ignore-scriptstonpm ci— license-checker only readspackage.jsonmetadata fromnode_modules/, it never needs compiled or downloaded binaries (onnxruntime CUDA, wasi-sdk, tree-sitter-cli, etc.)Motivated by transient GitHub CDN outages (503/500) causing CI failures on PR #293 that are completely unrelated to code changes.
Test plan
--ignore-scriptsare exercised by the PR's own CI run)--ignore-scripts