Repository navigation
Conversation
The jobs, session-ops-alert and the silence checker all run from /opt/session-ops/.venv. When a Python upgrade breaks it, every job fails and every alert fails with it, so nothing reaches Discord. session-ops-alert@ now has its own OnFailure=: a shell and curl script that posts the failed alert, its last journal line and the install.sh fix to ALERT_DISCORD_WEBHOOK_URL, at most once per 6 hours.
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.
On angus, the Debian upgrade moved
/usr/bin/python3to 3.13, under a venv built for the old Python. From the Oct 30 reboot untilinstall.shwas re-run on Nov 1, every job failed withModuleNotFoundError: No module named 'session_ops'.session-ops-alertandsession-ops-silencerun from the same venv, so they failed too, and Discord heard nothing for two days.session-ops-alert@now has its ownOnFailure=:session-ops-alert-fallback@.servicerunsdeploy/session-ops-alert-fallback.sh, which uses only shell,journalctlandcurl. It posts the failed alert unit, its last journal line and the fix (re-runinstall.sh) toALERT_DISCORD_WEBHOOK_URL. A broken venv fails every run of every job, so it posts at most once per 6 hours. The time of the last post is kept in the unit'sStateDirectory.install.shalready installs everydeploy/*.service, and the script runs from the root-owned clone, so deploying is a pull andinstall.sh.Verified:
python -m unittest discover -s tests -t .passes (912 tests, 1 skipped), andruff checkpasses. The new tests run the script against stubcurl,journalctlandhostname: the payload is valid JSON with quotes and backslashes escaped, a second post inside the window is skipped, a failed post exits 1 and is retried, and an empty webhook exits 0. Not yet run on angus.