Propagate errors instead of swallowing them in portal and installer scripts - #6
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…cripts Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every entrypoint in this repo had at least one path where a failure produced no signal: the portal swallowed clipboard errors with
catch{}, the PXE installer downgraded failed boot-file downloads to aWARNand exited 0, and the Proxmox installer hid--reapplyfailures behind>/dev/null 2>&1 || true. This makes those failures visible and fatal where the result would otherwise be silently broken.brand.jscatch{}on the copy button → logs and showsKopieren fehlgeschlagen; also detects the common real cause (navigator.clipboardunavailable over plain HTTP).AbortSignal.timeout,Array.isArray(data.brands)validation, and the concrete reason (HTTP status / JSON error / timeout) is rendered into the error card instead of onlyconsole.error.#brand-gridused to abortloadManifestand surface as "manifest not available"); missing elements are reported once at load, and render failures fall back to the error card.scripts/build-assets.pyBuildErrorplus amain()wrapper, so a broken brand fails withERROR: asset build failed: [bnd.zone/corporate] Canonical SVG source missing: ...and exit 1, instead of a raw traceback fromcairosvgor aKeyError: 'tagline'.brand.json(valid JSON, requiredbrand/tagline), SVG source existence, accent hex format, and DejaVu font availability.proxmox/install-webowie-proxmox-branding.shmktemp -dstage and only installed into$INSTALLonce all six succeed; previously a mid-loopcurlfailure left$INSTALLhalf-overwritten, breaking the next--reapply.[[ -e ... ]] && install ...as the last statement of the--reapplybranch made the script exit 1 wheneverdd_logo.pngwas absent → converted toif/fi.</head>used to meansedsilently did nothing and the install still reported success./var/log/webowie-pve-branding.log(it still can't fail dpkg) instead of discarding all output, and--reapply/--installcheck that staged assets exist and are non-empty.$0when piped fromcurl(it would install the shell, not the script), and reports a failedsystemctl restart pveproxy.service.scripts/create-netbootxyz-alpine-lxc.shCTID="${CTID:-$(pvesh get /cluster/nextid 2>/dev/null || echo 180)}"silently used CTID 180 whenpveshfailed; now it fails with instructions.ESSENTIAL_FILES(UEFI + legacy BIOS entrypoints) and optional ones: missing essentials abort, missing optionals are summarized. Failed downloads no longer leave truncated files in the webroot.pct startis followed by a wait forstatus: runningand forpct execreadiness, rather thansleep 5and a cryptic downstream failure.HTTP: http:///into/etc/motd;update-ca-certificates || truenow warns.ERRtrap that names the failing line and command.Verified:
python scripts/build-assets.pyregenerates all assets byte-identically tomainand error paths returnBuildError;bash -n+shellcheckclean on both shell scripts (including the container heredoc checked assh);node --check brand.js.Link to Devin session: https://app.devin.ai/sessions/2249710876544504a25ff092b69ab79b
Requested by: @puchadave