For the moment new checklist items on update are acknowledged

This commit is contained in:
Johannes Zellner
2024-09-07 09:37:34 +02:00
parent 40c4a01bc0
commit 13d8db3daa

View File

@@ -243,9 +243,10 @@ async function downloadImage(manifest) {
await docker.downloadImage(manifest);
}
async function updateChecklist(app, newChecks) {
async function updateChecklist(app, newChecks, acknowledged = false) {
assert.strictEqual(typeof app, 'object');
assert.strictEqual(typeof newChecks, 'object');
assert.strictEqual(typeof acknowledged, 'boolean');
// add new checklist items depending on sso state
const checklist = app.checklist || {};
@@ -253,7 +254,7 @@ async function updateChecklist(app, newChecks) {
if (app.checklist[k]) continue;
const item = {
acknowledged: false,
acknowledged: acknowledged,
sso: newChecks[k].sso,
appVersion: app.version,
message: newChecks[k].message,
@@ -616,7 +617,7 @@ async function update(app, args, progressCallback) {
}
await progressCallback({ percent: 20, message: 'Updating checklist' });
await updateChecklist(app, app.manifest.checklist || {});
await updateChecklist(app, app.manifest.checklist || {}, true /* new state acked */);
// download new image before app is stopped. this is so we can reduce downtime
// and also not remove the 'common' layers when the old image is deleted