Skip to content

Commit e901cd6

Browse files
author
Shaw
committed
fix(ci): ignore stale provisioning health logs
1 parent 3030307 commit e901cd6

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

.github/workflows/deploy-eliza-provisioning-worker.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,12 @@ jobs:
159159
# Info-level logs are filtered unless VERBOSE_LOGGING=true, so we
160160
# rely on systemd's own signals: process is active AND no fatal
161161
# error / restart-loop in the journal since deploy.
162-
FALLBACK_SINCE_TS="$(date -u '+%Y-%m-%d %H:%M:%S')"
162+
HEALTH_SINCE_TS="$(date -u '+%Y-%m-%d %H:%M:%S')"
163163
STABLE_THRESHOLD_SEC=20
164164
FATAL_LOG_PATTERN="\[(provisioning-worker|agent-router)\] (fatal|unhandled rejection)|node:internal/.*Error:|Error \[ERR_|^[A-Za-z]+Error:"
165165
for attempt in $(seq 1 18); do
166166
if sudo systemctl is-active --quiet "$SYSTEMD_UNIT"; then
167-
ACTIVE_SINCE=$(systemctl show "$SYSTEMD_UNIT" --property=ActiveEnterTimestamp --value)
168-
if [ -z "$ACTIVE_SINCE" ] || [ "$ACTIVE_SINCE" = "n/a" ]; then
169-
ACTIVE_SINCE="$FALLBACK_SINCE_TS"
170-
fi
171-
JOURNAL=$(sudo journalctl -u "$SYSTEMD_UNIT" --since "$ACTIVE_SINCE" --no-pager 2>/dev/null || true)
167+
JOURNAL=$(sudo journalctl -u "$SYSTEMD_UNIT" --since "$HEALTH_SINCE_TS" --no-pager 2>/dev/null || true)
172168
if echo "$JOURNAL" | grep -qE "$FATAL_LOG_PATTERN"; then
173169
echo "::error::Worker logged a fatal error since deploy."
174170
echo "$JOURNAL" | tail -n 50
@@ -186,11 +182,7 @@ jobs:
186182
sleep 5
187183
continue
188184
fi
189-
ROUTER_ACTIVE_SINCE=$(systemctl show eliza-agent-router.service --property=ActiveEnterTimestamp --value)
190-
if [ -z "$ROUTER_ACTIVE_SINCE" ] || [ "$ROUTER_ACTIVE_SINCE" = "n/a" ]; then
191-
ROUTER_ACTIVE_SINCE="$FALLBACK_SINCE_TS"
192-
fi
193-
ROUTER_JOURNAL=$(sudo journalctl -u eliza-agent-router.service --since "$ROUTER_ACTIVE_SINCE" --no-pager 2>/dev/null || true)
185+
ROUTER_JOURNAL=$(sudo journalctl -u eliza-agent-router.service --since "$HEALTH_SINCE_TS" --no-pager 2>/dev/null || true)
194186
if echo "$ROUTER_JOURNAL" | grep -qE "$FATAL_LOG_PATTERN"; then
195187
echo "::error::Agent router logged a fatal error since activation."
196188
echo "$ROUTER_JOURNAL" | tail -n 50

0 commit comments

Comments
 (0)