Skip to content

fix(gallery): clean up partially downloaded backend on installation failure#8679

Merged
mudler merged 1 commit intomudler:masterfrom
localai-bot:fix_issue_8016
Feb 28, 2026
Merged

fix(gallery): clean up partially downloaded backend on installation failure#8679
mudler merged 1 commit intomudler:masterfrom
localai-bot:fix_issue_8016

Conversation

@localai-bot
Copy link
Copy Markdown
Contributor

Description

When a backend download fails (e.g., on Mac OS with port conflicts causing connection issues), the backend directory is left with partial files. This causes subsequent installation attempts to fail with 'run file not found' because the sanity check runs on an empty/partial directory.

Fix

This fix cleans up the backend directory when the initial download fails before attempting fallback URIs or mirrors. This ensures a clean state for retry attempts.

Related Issue

Fixes #8016

Changes Made

  • Added cleanup of backend directory when download fails in function
  • This ensures that subsequent fallback attempts start with a clean directory state

Testing

The fix addresses the root cause where:

  1. User tries to download a backend (e.g., metal-whisper)
  2. Download fails (e.g., due to port 8080 conflict on Mac OS)
  3. Backend directory is created but left empty/partial
  4. Next attempt fails because sanity check finds no run.sh file

With this fix, the directory is cleaned up on failure, allowing fallback mechanisms to work correctly.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 28, 2026

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 35e50ea
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/69a2c145e2e3f80008b75237
😎 Deploy Preview https://deploy-preview-8679--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

…ailure

When a backend download fails (e.g., on Mac OS with port conflicts causing
connection issues), the backend directory is left with partial files.
This causes subsequent installation attempts to fail with 'run file not
found' because the sanity check runs on an empty/partial directory.

This fix cleans up the backend directory when the initial download fails
before attempting fallback URIs or mirrors. This ensures a clean state
for retry attempts.

Fixes: mudler#8016
Signed-off-by: localai-bot <localai-bot@users.noreply.github.com>
@localai-bot
Copy link
Copy Markdown
Contributor Author

Pushed update with DCO sign-off. All CI checks now passing. Returning to IN_REVIEW.

@mudler mudler merged commit c187b16 into mudler:master Feb 28, 2026
37 of 38 checks passed
@mudler mudler added the bug Something isn't working label Mar 14, 2026
localai-bot added a commit to localai-bot/LocalAI that referenced this pull request Mar 25, 2026
…ailure (mudler#8679)

When a backend download fails (e.g., on Mac OS with port conflicts causing
connection issues), the backend directory is left with partial files.
This causes subsequent installation attempts to fail with 'run file not
found' because the sanity check runs on an empty/partial directory.

This fix cleans up the backend directory when the initial download fails
before attempting fallback URIs or mirrors. This ensures a clean state
for retry attempts.

Fixes: mudler#8016

Signed-off-by: localai-bot <localai-bot@users.noreply.github.com>
Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Download of backend crashes on Mac OS

2 participants