From 8f5131c6808a474c8683c0eeeedc14ef89306b6f Mon Sep 17 00:00:00 2001 From: "flowzone-app[bot]" <124931076+flowzone-app[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 19:17:37 +0000 Subject: [PATCH] v16.5.1 --- .versionbot/CHANGELOG.yml | 38 ++++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 5 +++++ VERSION | 2 +- balena.yml | 2 +- package-lock.json | 4 ++-- package.json | 4 ++-- 6 files changed, 49 insertions(+), 6 deletions(-) diff --git a/.versionbot/CHANGELOG.yml b/.versionbot/CHANGELOG.yml index 74b481c8..667253e4 100644 --- a/.versionbot/CHANGELOG.yml +++ b/.versionbot/CHANGELOG.yml @@ -1,3 +1,41 @@ +- commits: + - subject: Avoid leaking memory on deep promise recursions + hash: d789e5bb77e0337773c69ed9d4e24696c019c6ac + body: > + The following pattern + + ```ts + + async function longRunning() { + // do something + await setTimeout(delay); + await longRunning(); + } + + ``` + + + Is regularly used for long running operations on the supervisor (e.g. + + polling target state). We have + + recently discovered that this pattern can slowly leak memory as it + + essentially creates an infinite promise chain. Using `void + longRunning()` breaks + + the chain and avoids the issue. + + + This commit fixes all those instances where the pattern was used. + footer: + Change-type: patch + change-type: patch + author: Felipe Lalanne + nested: [] + version: 16.5.1 + title: "" + date: 2024-08-05T19:17:30.564Z - commits: - subject: Use promises for setup/writing for logging backend hash: 8bc08750e946a3eea5c7eba14182a9506823b559 diff --git a/CHANGELOG.md b/CHANGELOG.md index ba8cbc37..4b628cb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY! This project adheres to [Semantic Versioning](http://semver.org/). +# v16.5.1 +## (2024-08-05) + +* Avoid leaking memory on deep promise recursions [Felipe Lalanne] + # v16.5.0 ## (2024-07-30) diff --git a/VERSION b/VERSION index d9617ea1..075be6e2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -16.5.0 \ No newline at end of file +16.5.1 \ No newline at end of file diff --git a/balena.yml b/balena.yml index 3f4dd7ea..256db0cb 100644 --- a/balena.yml +++ b/balena.yml @@ -2,6 +2,6 @@ name: balena-supervisor description: 'Balena Supervisor: balena''s agent on devices.' joinable: false type: sw.application -version: 16.5.0 +version: 16.5.1 provides: - slug: sw.compose.long-volume-syntax diff --git a/package-lock.json b/package-lock.json index 1edea574..c46a6e0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "balena-supervisor", - "version": "16.5.0", + "version": "16.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "balena-supervisor", - "version": "16.5.0", + "version": "16.5.1", "license": "Apache-2.0", "dependencies": { "@balena/systemd": "^0.5.0", diff --git a/package.json b/package.json index f1e61334..c3cc1a3d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "balena-supervisor", "description": "This is balena's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as the balena API informs it to.", - "version": "16.5.0", + "version": "16.5.1", "license": "Apache-2.0", "repository": { "type": "git", @@ -135,6 +135,6 @@ "yargs": "^17.7.2" }, "versionist": { - "publishedAt": "2024-07-30T18:48:22.975Z" + "publishedAt": "2024-08-05T19:17:31.068Z" } }