Commit Graph

4843 Commits

Author SHA1 Message Date
Felipe Lalanne
9b819e4837 Update typescript to 5.5.4 2024-08-30 10:52:11 -04:00
flowzone-app[bot]
649a20fbe0
v16.6.1 2024-08-29 16:36:13 +00:00
flowzone-app[bot]
70a4fa3274
Merge pull request #2369 from balena-os/remove-patch-device
Remove unused patchDevice function
2024-08-29 16:35:17 +00:00
Felipe Lalanne
788afee9a1
Remove unused patchDevice function
This function was a remainder of the dependent devices code that no
was removed on #2105

Change-type: patch
2024-08-29 10:34:43 -04:00
flowzone-app[bot]
5a1c81a408
v16.6.0 2024-08-28 22:47:12 +00:00
flowzone-app[bot]
da6f4bdbaf
Merge pull request #2284 from balena-os/enable-redsocks-dnsu2t
Enable redsocks dnsu2t
2024-08-28 22:46:17 +00:00
Christina Ying Wang
186a412ecf Add dnsu2t support to API docs for PATCH /v1/device/host-config
Signed-off-by: Christina Ying Wang <christina@balena.io>
2024-08-28 14:01:58 -07:00
Christina Ying Wang
eaa07e97a9 Add support for redsocks dnsu2t config
Users may specify dnsu2t config by including a `dns` field
in the `proxy` section of PATCH /v1/device/host-config's body:
```
{
  network: {
    proxy: {
      dns: '1.1.1.1:53',
    }
  }
}
```

If `dns` is a string, ADDRESS and PORT are required and should be
in the format `ADDRESS:PORT`. The endpoint with error with
code 400 if either ADDRESS or PORT are missing.

`dns` may also be a boolean. If true, defaults will be configured.
If false, the dns configuration will be removed.

If `proxy` is patched to empty, `dns` will be removed regardless
of its current or input configs, as `dns` depends on an active
redsocks proxy to function.

Change-type: minor
Signed-off-by: Christina Ying Wang <christina@balena.io>
2024-08-28 14:01:51 -07:00
Christina Ying Wang
8bf346a6fd Parse dnsu2t block to dns config
Signed-off-by: Christina Ying Wang <christina@balena.io>
2024-08-28 13:51:46 -07:00
Christina Ying Wang
b775f8f14d Stringify dns subsection of redsocks input config to dnsu2t
Signed-off-by: Christina Ying Wang <christina@balena.io>
2024-08-28 13:51:46 -07:00
Christina Ying Wang
e724f60beb Strip additional fields from HostConfiguration type
Signed-off-by: Christina Ying Wang <christina@balena.io>
2024-08-28 13:51:46 -07:00
flowzone-app[bot]
78f0561988
v16.5.8 2024-08-27 22:41:44 +00:00
balena-renovate[bot]
ead2c5b772
Merge pull request #2368 from balena-os/renovate/npm-webpack-vulnerability
Update webpack to v5.94.0 [SECURITY]
2024-08-27 22:40:50 +00:00
balena-renovate[bot]
a480266c56
Update webpack to v5.94.0 [SECURITY]
Update webpack from 5.76.0 to 5.94.0

Change-type: patch
2024-08-27 22:08:57 +00:00
flowzone-app[bot]
13c42ef014
v16.5.7 2024-08-27 21:18:32 +00:00
flowzone-app[bot]
6577ded0cd
Merge pull request #2366 from balena-os/using-infer-steps-lock-unit-test
Add unit test for usingInferStepsLock
2024-08-27 21:17:44 +00:00
Christina Ying Wang
51e59725f8 Add unit test for usingInferStepsLock
Change-type: patch
Signed-off-by: Christina Ying Wang <christina@balena.io>
2024-08-26 13:44:51 -07:00
flowzone-app[bot]
3049b03cba
v16.5.6 2024-08-23 00:24:33 +00:00
Christina Wang
6fbf95e93f
Merge pull request #2365 from balena-os/revert-2364
Revert PR #2364
2024-08-22 17:23:34 -07:00
Christina Ying Wang
3cebfa9f78 Revert PR #2364
Change-type: patch
Signed-off-by: Christina Ying Wang <christina@balena.io>
2024-08-22 14:31:35 -07:00
flowzone-app[bot]
2b03771bae
v16.5.5 2024-08-21 04:35:59 +00:00
Christina Wang
7f3a057797
Merge pull request #2364 from balena-os/avoid-unnecessary-config-calls-during-startup
Avoid unnecessary config calls during startup
2024-08-20 21:35:00 -07:00
Christina Ying Wang
539114f968 Fix FromAsCasing Dockerfile warning
See: https://docs.docker.com/reference/build-checks/from-as-casing/
Signed-off-by: Christina Ying Wang <christina@balena.io>
2024-08-20 19:12:14 -07:00
Christina Ying Wang
fc6927e53d Avoid unnecessary config calls during Supervisor init
Change-type: patch
Signed-off-by: Christina Ying Wang <christina@balena.io>
2024-08-20 19:11:14 -07:00
flowzone-app[bot]
401d3f8143
v16.5.4 2024-08-16 14:36:35 +00:00
flowzone-app[bot]
38a2037aad
Merge pull request #2363 from balena-os/kmod-module-compression
Add kmod to runtime-base
2024-08-16 14:35:25 +00:00
Joseph Kogut
aeb9c621a5 Add kmod to runtime-base
balenaOS v6 enables zstd module compression by default. Add kmod to
runtime-base to support loading of compressed modules.

Change-type: patch
Signed-off-by: Joseph Kogut <joseph@balena.io>
2024-08-15 13:30:32 -07:00
flowzone-app[bot]
901176952d
v16.5.3 2024-08-08 16:40:43 +00:00
flowzone-app[bot]
6eafde9f59
Merge pull request #2361 from balena-os/host-config-noproxy
Do not write `noProxy` to redsocks.conf
2024-08-08 16:39:55 +00:00
Felipe Lalanne
b088b78a3e
Do not write noProxy to redsocks.conf
This fixes a regression introduced by the refactor in #2329 where
`noProxy` was being included in the data added to redsocks.conf.

Change-type: patch
2024-08-08 11:59:20 -04:00
flowzone-app[bot]
338fdfdfb5
v16.5.2 2024-08-07 21:59:17 +00:00
flowzone-app[bot]
0fc969d247
Merge pull request #2362 from balena-os/blinking-errors
Verify that LED_FILE exists on blinking setup
2024-08-07 21:58:09 +00:00
Felipe Lalanne
a255001c2e
Verify that LED_FILE exists on blinking setup
Before v1, the blinking module would not throw when the passed led file
does not exist. This change checks for file existence and defaults to
`/dev/null` otherwise

Change-type: patch
2024-08-07 15:33:07 -04:00
flowzone-app[bot]
8f5131c680
v16.5.1 2024-08-05 19:17:37 +00:00
flowzone-app[bot]
b31cbf0db8
Merge pull request #2360 from balena-os/memory-improvements
Memory usage improvements
2024-08-05 19:16:24 +00:00
Felipe Lalanne
0d2e2e5e52
Update blinking to v1
This module would use promise recursion for the blinking pattern, which
it would slowly increase memory usage of the supervisor.
2024-08-02 12:19:40 -04:00
Felipe Lalanne
d789e5bb77
Avoid leaking memory on deep promise recursions
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.

Change-type: patch
2024-07-31 18:39:29 -04:00
flowzone-app[bot]
0124952962
v16.5.0 2024-07-30 18:48:26 +00:00
flowzone-app[bot]
dac9a24c10
Merge pull request #2351 from balena-os/knex-error
Logs processing improvements
2024-07-30 18:47:39 +00:00
Felipe Lalanne
8bc08750e9
Use promises for setup/writing for logging backend
The balena logging backend now uses async functions to setup the
connection and write messages to the request stream. This adds some
backpressure on `log` calls by by the log monitor module, to prevent a
very agressive container causing the supervisor to waste CPU cycles just
dropping messages.

Change-type: patch
2024-07-30 10:51:19 -04:00
Felipe Lalanne
f3fcb0db7a
Improve the LogBackend interface
This make the LogBackend `log` method into an async method in
preparation for upcoming changes that will use backpressure from the
connection to delay logging coming from containers.

This also removes unnecessary imageId from the LogMessage type

Change-type: patch
2024-07-30 10:51:19 -04:00
Felipe Lalanne
5af948483a
Use stream pipeline instead of pipe
This also removes the use of JSONStream from the monitor module

Change-type: patch
2024-07-30 10:51:19 -04:00
Felipe Lalanne
dbacca977a
Do not use DB to store container logs info
This removes the dependence of the supervisor on the containerLogs
database for remembering the last sent timestamp. This commit instead
uses the supervisor startup time as the initial time for log retrieval.
This might result in some logs missing for services that may start
before the supervisor after a boot, or if the supervisor restarts.
However this seems like an acceptable trade-off as the current
implementation seems to make things worst in resource contrained
environments.

We'll move storing the last sent timestamp to a better storage medium in
a future commit.

Change-type: minor
2024-07-30 10:51:18 -04:00
flowzone-app[bot]
4a8bf14196
v16.4.6 2024-07-30 14:43:25 +00:00
balena-renovate[bot]
df5558edf6
Merge pull request #2359 from balena-os/renovate/patch-semver
Update semver to v7.6.3
2024-07-30 14:42:31 +00:00
Self-hosted Renovate Bot
340e69d0c2 Update semver to v7.6.3
Update semver from 7.6.2 to 7.6.3

Change-type: patch
2024-07-25 15:09:28 +00:00
flowzone-app[bot]
c399792cba
v16.4.5 2024-07-25 14:31:20 +00:00
balena-renovate[bot]
0f1abcbd0f
Merge pull request #2358 from balena-os/renovate/balena-io-deploy-to-balena-action-2.0.x
Update balena-io/deploy-to-balena-action action to v2.0.74
2024-07-25 14:30:19 +00:00
Self-hosted Renovate Bot
92be067b0d Update balena-io/deploy-to-balena-action action to v2.0.74
Update balena-io/deploy-to-balena-action from 2.0.72 to 2.0.74

Change-type: patch
2024-07-25 14:08:55 +00:00
flowzone-app[bot]
f2f229915d
v16.4.4 2024-07-17 14:48:54 +00:00