Skip to content

Fix git clone error handling and consolidate implementations#5938

Merged
vrubezhny merged 1 commit into
redhat-developer:mainfrom
vrubezhny:fix-git-clone-errors
Jul 4, 2026
Merged

Fix git clone error handling and consolidate implementations#5938
vrubezhny merged 1 commit into
redhat-developer:mainfrom
vrubezhny:fix-git-clone-errors

Conversation

@vrubezhny

Copy link
Copy Markdown
Contributor
  • Enhanced cloneRepository() in util/git.ts with comprehensive error handling for missing git executable
  • Added try-catch around Git API access to prevent crashes
  • Validate git executable path before spawning process
  • Consolidated duplicate clone() function in createDeploymentLoader
  • Removed duplicate CloneProcess interface, use CloneResult instead
  • Changed from cp.exec to using centralized cloneRepository()
  • Prevents "spawn git ENOENT" unhandled promise rejections in tests

Assisted-By: Claude Sonnet 4.5 noreply@anthropic.com

- Enhanced cloneRepository() in util/git.ts with comprehensive error
  handling for missing git executable
- Added try-catch around Git API access to prevent crashes
- Validate git executable path before spawning process
- Consolidated duplicate clone() function in createDeploymentLoader
- Removed duplicate CloneProcess interface, use CloneResult instead
- Changed from cp.exec to using centralized cloneRepository()
- Prevents "spawn git ENOENT" unhandled promise rejections in tests

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
Assisted-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.72%. Comparing base (da60441) to head (749218f).
⚠️ Report is 1858 commits behind head on main.

Files with missing lines Patch % Lines
...ebview/create-deployment/createDeploymentLoader.ts 40.00% 3 Missing ⚠️
src/util/git.ts 66.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5938       +/-   ##
===========================================
+ Coverage   32.37%   47.72%   +15.35%     
===========================================
  Files          85      106       +21     
  Lines        6505     9841     +3336     
  Branches     1349     2212      +863     
===========================================
+ Hits         2106     4697     +2591     
- Misses       4399     5141      +742     
- Partials        0        3        +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vrubezhny vrubezhny merged commit 67c6850 into redhat-developer:main Jul 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant