Skip to content

Harden Linux packaging workflow against transient electron-builder network failures - #47

Merged
M-Nikox merged 2 commits into
masterfrom
copilot/fix-package-linux-artifacts
Aug 12, 2026
Merged

Harden Linux packaging workflow against transient electron-builder network failures#47
M-Nikox merged 2 commits into
masterfrom
copilot/fix-package-linux-artifacts

Conversation

Copilot AI commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Bug description

Package Linux artifacts could fail intermittently during npm run make even when build inputs were valid. Expected behavior was successful artifact packaging; actual behavior was job failure on transient network errors (e.g. socket hang up).

Root cause

electron-builder performs network-dependent download/rebuild steps during packaging. The Linux packaging jobs treated any first-attempt network interruption as terminal, so transient transport failures failed the workflow.

Fix

  • Workflow targets
    • Updated Linux packaging steps in:
      • package-pr-linux
      • package-linux
  • Retry strategy
    • Replaced single npm run make execution with a bounded retry loop (3 attempts, 15s backoff).
    • Preserves failure on persistent errors; only masks transient failures.
for attempt in 1 2 3; do
  if npm run make; then
    exit 0
  fi
  if [ "$attempt" -lt 3 ]; then
    echo "Packaging attempt $attempt failed; retrying after 15s..."
    sleep 15
  fi
done
echo "Packaging failed after 3 attempts."
exit 1

Steps to reproduce (before fix)

  1. Trigger the Linux packaging workflow run.
  2. Hit a transient upstream/network interruption during electron-builder packaging.
  3. Observe immediate job failure with socket hang up and no retry.

Screenshots

N/A

Checklist

  • Fix tested locally
  • Regression tested — existing behavior unaffected
  • No hardcoded values introduced

Co-authored-by: M-Nikox <101933576+M-Nikox@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix the failing GitHub Actions job Package Linux artifacts Harden Linux packaging workflow against transient electron-builder network failures Aug 12, 2026
Copilot AI requested a review from M-Nikox August 12, 2026 18:28
@M-Nikox
M-Nikox marked this pull request as ready for review August 12, 2026 18:29
Copilot AI lite review requested due to automatic review settings August 12, 2026 18:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the GitHub Actions Linux packaging jobs by adding a bounded retry loop around npm run make, reducing intermittent CI failures caused by transient electron-builder network/download issues.

Changes:

  • Wrap npm run make in a 3-attempt retry loop with a 15s backoff in package-pr-linux.
  • Apply the same retry loop to the release package-linux job.
Suppressed comments (1)

.github/workflows/ci.yml:164

  • Same retry block is duplicated in both Linux packaging jobs. If you keep it inline, it’s still worth parameterizing attempt count/backoff (and avoiding exit 0 inside the loop) so future tuning doesn’t require editing multiple places and later commands won’t be skipped inadvertently.
          for attempt in 1 2 3; do
            if npm run make; then
              exit 0
            fi
            if [ "$attempt" -lt 3 ]; then

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ci.yml
Comment on lines +69 to +79
for attempt in 1 2 3; do
if npm run make; then
exit 0
fi
if [ "$attempt" -lt 3 ]; then
echo "Packaging attempt $attempt failed; retrying after 15s..."
sleep 15
fi
done
echo "Packaging failed after 3 attempts."
exit 1
@M-Nikox
M-Nikox merged commit 9f57967 into master Aug 12, 2026
10 checks passed
@M-Nikox
M-Nikox deleted the copilot/fix-package-linux-artifacts branch August 12, 2026 18:36
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.

3 participants