Hub 2.23.1: a church's Accounts version comes from its heartbeat

New install checked the install record's version, which only changed
with the Hub's own jobs for that product. Accounts updated alongside
Events 3.7.0 still showed 1.6.0 there, so New install -> Website refused
cross-demo2 while the installs list showed 1.7.0. It now uses the
heartbeat's version, and each heartbeat updates the record's version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-26 15:23:19 +02:00
co-authored by Claude Opus 5.5
parent ad08a07803
commit 4e362cbc03
8 changed files with 43 additions and 9 deletions
+3
View File
@@ -239,6 +239,9 @@ router.post('/installs/heartbeat', heartbeatLimiter, async (req, res) => {
try {
const tied = await prisma.deployment.updateMany({ where: { licenceId: install.licenceId, installId: null, status: { notIn: ['removed', 'failed'] } }, data: { installId: install.id } });
if (!tied.count) await require('../utils/jobs').lookForUnlinked(install, now);
// Hub 2.23.1: the install record's version follows the heartbeat (it only followed the Hub's
// own jobs, so a product updated alongside another kept its old version there).
if (version) await prisma.deployment.updateMany({ where: { installId: install.id, OR: [{ version: null }, { version: { not: version } }] }, data: { version } });
} catch (e) {
console.warn('[hub] tying the install record to its site failed:', e?.message || e);
}