timescale.info
Sign inSign up

How OpenChronology was built

Every merged pull request of openchronology/timeline-app, its first week of commits and its releases; and before them the 2020 PureScript editor, from snapshots of its deleted repositories in the Wayback Machine. Written to this server through the HTTP API.

327 moments · 2020-03-09T00:15:08Z CE – 2026-11-02T20:11:21Z CE · by @athan · @athan

#375 · openchronology-migrate restarts the enabled syslog and journald importers after an upgrade

  • timeline-app
  • pull request
  • logs

Fixes #374. Extends #373 (#371) from the mail worker to the log importers. An upgrade stops `openchronology-syslog` and `openchronology-journald` (Debian `prerm`, the RPM's `%pre`, FreeBSD's `pre-install.sh`), and nothing started them again. ## Changes per package - **Debian / RPM** (`openchronology-migrate`, `postinst`, `openchronology-setup`): #373's single mail check is now a loop over `mail`, `syslog` and `journald`. Each unit that is enabled gets restarted, and disabled ones are left alone. `openchronology-migrate` prints `OpenChronology mail worker|syslog receiver|journald follower restarted.` for each one it restarts. `--no-restart` still starts nothing. - **FreeBSD** (`openchronology-migrate`): the loop covers `openchronology_mail` and `openchronology_syslog`, each restarted if it is enabled. FreeBSD has no journald follower. - **Homebrew** (`openchronology-migrate`): the loop covers the `mail` and `syslog` launchd agents, each restarted if it was started. - **Windows** (`openchronology-migrate.cmd`): the loop covers `OpenChronologyMail` and `OpenChronologySyslog`, each restarted if it starts with Windows. The installer already did this. ## Tests - `test/server-mail-upgrade.mjs` is renamed to `test/server-upgrade-services.mjs` (`checkServicesUpgrade`), and the deb and rpm tests use it. The stand-in systemctl now runs all three services as their units would, with placeholder settings: a Resend key, an API key, and a timeline in `syslog-routes.json` and `journald.env`. It restores the original configuration afterwards. It checks that: - all three run before the upgrade and are stopped by it; - `openchronology-migrate` restarts each one through `systemctl restart`, and they are still running 3 s later; - the receiver logs `syslog: listening` and the follower logs `journald: following`; - `--no-restart` starts nothing; - with mail and journald disabled and syslog enabled, only syslog starts. - The containers have no systemd-journald. The follower still runs as a real process, but its journalctl finds no entries. - FreeBSD and Homebrew: the importer is not enabled at migration time, so the tests assert it is not restarted. Windows: `OpenChronologySyslog` was set to Automatic earlier in the test and is stopped, so the test asserts `openchronology-migrate` restarts it and it is Running, while the mail service stays Stopped. ## Docs `README.Debian`, `README.RPM`, `README.FreeBSD`, `README.Homebrew`, `README.Windows.txt`, the deploy READMEs, `docs/administration.md` "Upgrading", `docs/syslog.md`, `docs/journald.md` and `test/README.md`. Run locally: `node test/server-deb.mjs` (debian13) and `node test/server-rpm.mjs` (fedora44) both pass. `npm test` passes, 361/361.

Sources

Open #375 · openchronology-migrate restarts the enabled syslog and journald importers after an upgrade in the timeline