mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
feat(local): publish secret config application atomically
This commit is contained in:
@@ -367,8 +367,8 @@ function adoptedDockerHarness(state, options = {}) {
|
||||
],
|
||||
Labels: {
|
||||
'io.qinglong.local.sqlite-contract-min': '51',
|
||||
'io.qinglong.local.sqlite-contract-max': '51',
|
||||
'io.qinglong.local.sqlite-write-contract': '51',
|
||||
'io.qinglong.local.sqlite-contract-max': '52',
|
||||
'io.qinglong.local.sqlite-write-contract': '52',
|
||||
'io.qinglong.local.application-config': '2,3,4',
|
||||
'io.qinglong.local.compose-selection': '1',
|
||||
'io.qinglong.ai': 'excluded',
|
||||
@@ -839,7 +839,7 @@ test('preflights adopted Compose identity mounts and rejects mount drift', async
|
||||
);
|
||||
assert.equal(ready.status, 'ready');
|
||||
assert.equal(ready.profile, 'edge');
|
||||
assert.equal(ready.sqlite.contractVersion, 51);
|
||||
assert.equal(ready.sqlite.contractVersion, 52);
|
||||
await assert.rejects(
|
||||
preflightLocalDeploymentCompose(composePreflightCommand(state, 1), {
|
||||
runDocker: adoptedDockerHarness(state, { driftMount: true }).runDocker,
|
||||
|
||||
@@ -491,8 +491,8 @@ function composeDockerHarness(
|
||||
],
|
||||
Labels: {
|
||||
'io.qinglong.local.sqlite-contract-min': '51',
|
||||
'io.qinglong.local.sqlite-contract-max': '51',
|
||||
'io.qinglong.local.sqlite-write-contract': '51',
|
||||
'io.qinglong.local.sqlite-contract-max': '52',
|
||||
'io.qinglong.local.sqlite-write-contract': '52',
|
||||
'io.qinglong.local.application-config': '2',
|
||||
'io.qinglong.local.compose-selection': '1',
|
||||
'io.qinglong.ai': 'excluded',
|
||||
@@ -1200,8 +1200,8 @@ test('preflights exact local image, Compose merge and SQLite capability', async
|
||||
],
|
||||
Labels: {
|
||||
'io.qinglong.local.sqlite-contract-min': '51',
|
||||
'io.qinglong.local.sqlite-contract-max': '51',
|
||||
'io.qinglong.local.sqlite-write-contract': '51',
|
||||
'io.qinglong.local.sqlite-contract-max': '52',
|
||||
'io.qinglong.local.sqlite-write-contract': '52',
|
||||
'io.qinglong.local.application-config': '2',
|
||||
'io.qinglong.local.compose-selection': '1',
|
||||
'io.qinglong.ai': 'excluded',
|
||||
@@ -1259,7 +1259,7 @@ test('preflights exact local image, Compose merge and SQLite capability', async
|
||||
assert.equal(result.status, 'ready');
|
||||
assert.equal(result.generation, 1);
|
||||
assert.equal(result.profile, 'edge');
|
||||
assert.equal(result.sqlite.contractVersion, 51);
|
||||
assert.equal(result.sqlite.contractVersion, 52);
|
||||
assert.equal(result.image.architecture, 'arm64');
|
||||
assert.equal(calls.length, 2);
|
||||
assert.deepEqual(calls[0].slice(0, 2), ['image', 'inspect']);
|
||||
@@ -1359,8 +1359,8 @@ test('applies one Compose generation and exactly replays its health receipt', as
|
||||
assert.equal(mode(receiptPath), 0o600);
|
||||
const receipt = JSON.parse(fs.readFileSync(receiptPath, 'utf8'));
|
||||
assert.deepEqual(receipt.sqlite, {
|
||||
contractVersion: 51,
|
||||
writeContractVersion: 51,
|
||||
contractVersion: 52,
|
||||
writeContractVersion: 52,
|
||||
writeObservation: 'unchanged',
|
||||
backup: null,
|
||||
});
|
||||
@@ -1661,8 +1661,8 @@ test('rolls a failed Compose candidate forward to a healthy prior digest', async
|
||||
`${command.request.rolloutId}.sqlite`,
|
||||
);
|
||||
assert.equal(mode(backupPath), 0o600);
|
||||
assert.equal(receipt.sqlite.contractVersion, 51);
|
||||
assert.equal(receipt.sqlite.writeContractVersion, 51);
|
||||
assert.equal(receipt.sqlite.contractVersion, 52);
|
||||
assert.equal(receipt.sqlite.writeContractVersion, 52);
|
||||
assert.equal(receipt.sqlite.writeObservation, 'changed');
|
||||
assert.match(receipt.sqlite.backup.sha256, /^[0-9a-f]{64}$/);
|
||||
assert.equal(receipt.sqlite.backup.bytes > 0, true);
|
||||
|
||||
@@ -34,8 +34,8 @@ test('inspects the exact fresh Profile schema without exposing its path', async
|
||||
assert.equal(result.status, 'ready');
|
||||
assert.equal(result.profile, 'edge');
|
||||
assert.equal(result.storage.contractName, 'local-control-core');
|
||||
assert.equal(result.storage.contractVersion, 51);
|
||||
assert.equal(result.storage.migrationCount, 102);
|
||||
assert.equal(result.storage.contractVersion, 52);
|
||||
assert.equal(result.storage.migrationCount, 104);
|
||||
assert.equal(result.storage.journalMode, 'delete');
|
||||
assert.equal(JSON.stringify(result).includes(state.directory), false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user