diff --git a/src/apptask.js b/src/apptask.js index 1e53e6032..e958125f7 100644 --- a/src/apptask.js +++ b/src/apptask.js @@ -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