mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
Merge pull request #2839 from balena-io/compose-reduce-patched-properties
compose: Reduce the properties updated to only the necessary
This commit is contained in:
commit
b5dcf45c40
@ -1343,7 +1343,24 @@ async function pushServiceImages(
|
||||
if (skipLogUpload) {
|
||||
delete serviceImage.build_log;
|
||||
}
|
||||
await releaseMod.updateImage(pineClient, serviceImage.id, serviceImage);
|
||||
|
||||
await releaseMod.updateImage(
|
||||
pineClient,
|
||||
serviceImage.id,
|
||||
// These are the only update-able image fields in bC atm, and passing
|
||||
// the whole image object in v7+ would result the allowlist to reject the request.
|
||||
_.pick(serviceImage, [
|
||||
'end_timestamp',
|
||||
'project_type',
|
||||
'error_message',
|
||||
'build_log',
|
||||
'push_timestamp',
|
||||
'status',
|
||||
'content_hash',
|
||||
'dockerfile',
|
||||
'image_size',
|
||||
]),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -1429,7 +1446,10 @@ export async function deployProject(
|
||||
await runSpinner(tty, spinner, `${prefix}Saving release...`, async () => {
|
||||
release.end_timestamp = new Date();
|
||||
if (release.id != null) {
|
||||
await releaseMod.updateRelease(pineClient, release.id, release);
|
||||
await releaseMod.updateRelease(pineClient, release.id, {
|
||||
status: release.status,
|
||||
end_timestamp: release.end_timestamp,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user