Skip to content

Commit dfe9110

Browse files
committed
make update process more rigorous
1 parent 6c3e52d commit dfe9110

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# AmpliPi Software Releases
22

3-
## 0.4.5
3+
## Upcoming release
44
* Web App
55
* Ensure that abnormally-shaped album art is still horizontally centered
66
* Add error handling on browser page for instances where the selected stream isn't browsable
7+
* System
8+
* Make update process properly report errors
79

810
## 0.4.4
911
* Web App

amplipi/updater/asgi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ def request_support():
329329
'/opt/support_tunnel/venv/bin/python3 -m invoke request'.split(),
330330
capture_output=True,
331331
cwd='/opt/support_tunnel',
332-
timeout=120
332+
timeout=120,
333+
check=True
333334
)
334335
return Response(content=f"{out.stdout.decode('utf')}", media_type="text/html")
335336
except Exception as e:

scripts/backup_config.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ tar --one-file-system -czf "${backup_filename}" "${HOME}/.config/amplipi/"
1212
# remove all backups older than 90 days
1313
echo "removing old backups..."
1414
find "${backup_dir}" -type f -ctime +90 -delete
15+
echo "completed ${0}"

scripts/configure.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,6 +1176,8 @@ def failed():
11761176
pre_backup = _create_backup(env, "_pre-fw-upgrade")
11771177
progress(pre_backup)
11781178
tasks += pre_backup
1179+
if failed():
1180+
return False
11791181
if os_deps:
11801182
tasks += _install_os_deps(env, progress, _os_deps)
11811183
if failed():
@@ -1221,6 +1223,8 @@ def failed():
12211223
post_backup = _create_backup(env, "_post-fw-upgrade")
12221224
progress(post_backup)
12231225
tasks += post_backup
1226+
if failed():
1227+
return False
12241228
if restart_updater:
12251229
# Reboot OS to finish potential kernel upgrade, also restarting the updater
12261230
progress([Task('Reboot os', success=True)])

0 commit comments

Comments
 (0)