From acb6649b1d8ebdd0ed2185cc3aa1b153a1c8b2fd Mon Sep 17 00:00:00 2001 From: myarmolinsky Date: Wed, 27 Nov 2024 11:29:45 -0500 Subject: [PATCH] `startOsUpdate`: Set `runDetached` to `true` by default Change-type: major --- DOCUMENTATION.md | 2 +- src/models/device.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 7970df609..9c6555abc 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -3983,7 +3983,7 @@ balena.models.device.setSupervisorRelease(123, '11.4.14').then(function() { | uuidOrUuids | String \| Array.<String> | full device uuid or array of full uuids | | targetOsVersion | String | semver-compatible version for the target device Unsupported (unpublished) version will result in rejection. The version **must** be the exact version number, a "prod" variant and greater than the one running on the device. To resolve the semver-compatible range use `balena.model.os.getMaxSatisfyingVersion`. | | [options] | Object | options | -| [options.runDetached] | Boolean | run the update in detached mode. Default behaviour is runDetached=false but is DEPRECATED and will be removed in a future release. Use runDetached=true for more reliable updates. | +| [options.runDetached] | Boolean | run the update in detached mode. True by default | **Example** ```js diff --git a/src/models/device.ts b/src/models/device.ts index 411fcf4ae..32fde739e 100644 --- a/src/models/device.ts +++ b/src/models/device.ts @@ -345,7 +345,7 @@ const getDeviceModel = function ( async function startOsUpdate( uuidOrUuids: string | string[], targetOsVersion: string, - options: { runDetached?: boolean } = { runDetached: false }, + options: { runDetached?: boolean } = { runDetached: true }, ): Promise> { if (!targetOsVersion) { throw new errors.BalenaInvalidParameterError( @@ -2271,9 +2271,7 @@ const getDeviceModel = function ( * The version **must** be the exact version number, a "prod" variant and greater than the one running on the device. * To resolve the semver-compatible range use `balena.model.os.getMaxSatisfyingVersion`. * @param {Object} [options] - options - * @param {Boolean} [options.runDetached] - run the update in detached mode. - * Default behaviour is runDetached=false but is DEPRECATED and will be removed in a future release. Use runDetached=true - * for more reliable updates. + * @param {Boolean} [options.runDetached] - run the update in detached mode. True by default * @fulfil {Object} - action response * @returns {Promise} *