You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3752497
Browse filesBrowse the repository at this point in the historyBrowse files
Folds the final-head review and /simplify-code pass on #141070:
- update_serve_obligations: defer_manual_serve and defer_unit_serve share
_defer_identified (pid/create-time guard, dead-pid discharge, reminder
write) instead of two copies; a unit row's failed-write warning says
"unit restart reminder", not "manual".
- update_cmd_fleet: a positive _is_serve_or_dashboard_unit name gate,
composed into _is_hermes_gateway_unit; _is_serve_unit uses it rather
than "gateway gate minus SIGUSR1 support". _SERVE_SKIP_REASON names
hermes-dashboard* units too.
- update_cmd_fleet_verify: SERVE_ONLY_REASON_PREFIX and the gateway
sentence are module constants, so the producer and the Desktop
predicate share one spelling; the test now feeds the producer's own
reasons to both scripts.
- Desktop hand-offs (posix.sh, windows.ps1): drop the gateway hint only
when EVERY gateway_restart line is serve/dashboard-only, so a serve-only
line next to a raw restart-phase error keeps it; case-sensitive in
PowerShell (-cmatch) like grep.
- main_dashboard._format_restart_commands replaces three copies of the
backticked " or " join.
- Docstrings: already_restarted_units covers declined and failed units.
pending_manual=retain_receipt_manual_serves(read_latest_receipt() or {})
138
130
forrowinpending_manual:
139
-
print(f" ⚠ {row['kind']} [{row.get('profile', 'unknown')}] pid {row.get('pid', 'unknown')}: manual restart reminder could not be saved; restart remains pending in the update receipt.", file=stream)
131
+
unit_row=is_unit_serve_row(row)
132
+
print(f" ⚠ {row['kind']} [{row.get('profile', 'unknown')}] pid {row.get('pid', 'unknown')}: {'unit'ifunit_rowelse'manual'} restart reminder could not be saved; restart remains pending in the update receipt.", file=stream)
print(f" ⚠ {row['kind']} [{row['profile']}] pid {row['pid']}: unit restart still pending; this process may still serve pre-update code.", file=stream)
161
-
print(f" Restart its unit: {' or '.join(f'`{c}`'forcinrestart)}", file=stream)
152
+
print(f" Restart its unit: {_format_restart_commands(restart)}", file=stream)
162
153
continue
163
154
print(f" ⚠ {row['kind']} [{row['profile']}] pid {row['pid']}: manual restart still pending; this process may still serve pre-update code.", file=stream)
164
155
print(" Ask its owner to relaunch `hermes serve` / `hermes dashboard` (reconnect Desktop for an SSH backend).", file=stream)
Copy file name to clipboardExpand all lines: scripts/desktop-update/posix.sh
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1279,11 +1279,13 @@ if [ "$CODE" -eq 0 ]; then FINAL_CODE=0 FINAL_MSG="Update complete." UPDATE_COMM
1279
1279
OWED_STEPS="$(owed_followup_steps)"
1280
1280
if [ -n"$OWED_STEPS" ];then
1281
1281
# A gateway_restart owed only for serve/dashboard units (the reason then starts with
1282
-
# "serve/dashboard") names their own command in the log; every other gateway_restart reason,
1283
-
# including a raw restart-phase error, keeps the gateway hint (#141071).
1282
+
# "serve/dashboard ", hermes_cli/update_cmd_fleet_verify.SERVE_ONLY_REASON_PREFIX) names their own
1283
+
# command in the log. The hint drops only when EVERY gateway_restart line is serve-only; any other
1284
+
# reason, including a raw restart-phase error, keeps it (#141071).
1284
1285
case"$OWED_STEPS"in*" gateway_restart "*) OWED_HINT=" Run hermes gateway restart to move the messaging gateway onto the new code now." ;; *) OWED_HINT="" ;; esac
1285
-
ifprintf'%s\n'"$OUT"| grep -Eq "Update follow-up 'gateway_restart' did not finish: serve/dashboard " \
1286
-
&&!printf'%s\n'"$OUT"| grep -Eq "Update follow-up 'gateway_restart' did not finish: .*hermes gateway restart";then
1286
+
GW_REASONS="$(printf '%s\n'"$OUT"| grep "Update follow-up 'gateway_restart' did not finish: ")"
1287
+
if [ -n"$GW_REASONS" ] &&!printf'%s\n'"$GW_REASONS"| grep -vq "did not finish: serve/dashboard " \
# A gateway_restart owed only for serve/dashboard units (the reason then starts with
1689
-
# "serve/dashboard") names their own command in the log; every other gateway_restart reason,
1690
-
# including a raw restart-phase error, keeps the gateway hint (#141071).
1691
-
$owedText=$res.Output-join"`n"
1692
-
$serveOnly= ($owedText-match"Update follow-up 'gateway_restart' did not finish: serve/dashboard ") -and-not ($owedText-match"Update follow-up 'gateway_restart' did not finish: .*hermes gateway restart")
1689
+
# "serve/dashboard ", hermes_cli/update_cmd_fleet_verify.SERVE_ONLY_REASON_PREFIX) names their own
1690
+
# command in the log. The hint drops only when EVERY gateway_restart line is serve-only; any other
1691
+
# reason, including a raw restart-phase error, keeps it (#141071).
1692
+
$gwReasons=@((($res.Output-join"`n") -split"`r?`n") |Where-Object { $_-cmatch"Update follow-up 'gateway_restart' did not finish: " })
$owedHint=if (($owedSteps-contains'gateway_restart') -and-not$serveOnly) { " Run 'hermes gateway restart' to move the messaging gateway onto the new code now." } else { '' }
1694
1695
Add-Followup ("followup: owed by the committed update: "+ ($owedSteps-join', ')) ("some follow-up steps did not finish ("+ ($owedSteps-join', ') +"). The next launch or 'hermes update' retries them; the update log has the details."+$owedHint) -Manual
0 commit comments