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:
@@ -530,6 +530,20 @@ describe('Cross Events 3.0 brings its Accounts (2.5.0)', () => {
|
||||
expect(job).toMatchObject({ type: 'add-product', args: { product: 'events', version: 'events@3.0.0' } });
|
||||
});
|
||||
|
||||
test("the church's Accounts version is what its heartbeat says, not the install record's (Hub 2.23.1)", async () => {
|
||||
const { server } = await joinServer();
|
||||
await servers.setServerConfig(server.id, { TRUST_PROXY: 'loopback' });
|
||||
const a = await jobs.newInstall({ product: 'accounts', customerId: 'cust-1', serverId: server.id, shortName: 'hope', domain: 'accounts.hope.co.za', version: '1.0.0' }, admin, NOW);
|
||||
await db.job.updateMany({ where: { deploymentId: a.deployment.id }, data: { status: 'succeeded' } });
|
||||
// Updated on the server to 1.1.0 by a job for another product: the record still says 1.0.0.
|
||||
const install = await db.install.create({ data: { id: 'inst-acc', product: 'accounts', version: '1.1.0' } });
|
||||
await db.deployment.update({ where: { id: a.deployment.id }, data: { status: 'live', version: '1.0.0', installId: install.id } });
|
||||
const out = await jobs.newInstall({ customerId: 'cust-1', serverId: server.id, shortName: 'hope', domain: 'events.hope.co.za' }, admin, NOW);
|
||||
expect(out.alsoInstalling).toBeUndefined();
|
||||
const [job] = (await poll(server)).jobs;
|
||||
expect(job).toMatchObject({ type: 'add-product', args: { product: 'events', version: 'events@3.0.0' } });
|
||||
});
|
||||
|
||||
test('Events 2.x installs as before, without Accounts', async () => {
|
||||
const { server } = await joinServer();
|
||||
await servers.setServerConfig(server.id, { TRUST_PROXY: 'loopback' });
|
||||
|
||||
Reference in New Issue
Block a user