Skip to content

Commit

Permalink
startOsUpdate: Set runDetached to true by default
Browse files Browse the repository at this point in the history
Change-type: major
  • Loading branch information
myarmolinsky committed Nov 27, 2024
1 parent eb1fc66 commit acb6649
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3983,7 +3983,7 @@ balena.models.device.setSupervisorRelease(123, '11.4.14').then(function() {
| uuidOrUuids | <code>String</code> \| <code>Array.&lt;String&gt;</code> | full device uuid or array of full uuids |
| targetOsVersion | <code>String</code> | 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] | <code>Object</code> | options |
| [options.runDetached] | <code>Boolean</code> | 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] | <code>Boolean</code> | run the update in detached mode. True by default |

**Example**
```js
Expand Down
6 changes: 2 additions & 4 deletions src/models/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<OsUpdateActionResult | Dictionary<OsUpdateActionResult>> {
if (!targetOsVersion) {
throw new errors.BalenaInvalidParameterError(
Expand Down Expand Up @@ -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}
*
Expand Down

0 comments on commit acb6649

Please sign in to comment.