Commit Graph

4852 Commits

Author SHA1 Message Date
flowzone-app[bot]
cb465a1d81
v16.7.1 2024-09-26 14:28:10 +00:00
Christina Wang
c429daafc9
Merge pull request #2373 from balena-os/add-compose-init-support
Add support for init field from compose
2024-09-26 07:27:01 -07:00
Christina Ying Wang
ed1c18e369
Add support for init field from compose
Init supports boolean values, and is not included in the config when
not defined.

Change-type: patch
Signed-off-by: Christina Ying Wang <christina@balena.io>
2024-09-26 10:39:59 -03:00
flowzone-app[bot]
e01aaaaafb
v16.7.0 2024-09-02 15:33:44 +00:00
flowzone-app[bot]
23d74b7ca3
Merge pull request #2342 from balena-os/update-status
Report app release update status to the API
2024-09-02 15:32:39 +00:00
Felipe Lalanne
e9a52e6786 Store rejected apps in the database
This moves from throwing an error when an app is rejected due to unmet
requirements (because of contracts) to storing the target with a
`rejected` flag on the database.

The application manager filters rejected apps when calculating steps to
prevent them from affecting the current state. The state engine uses the
rejection info to generate the state report.

Change-type: minor
2024-08-30 10:52:11 -04:00
Felipe Lalanne
227fee9941 Set the app update status when reporting state
Change-type: minor
2024-08-30 10:52:11 -04:00
Felipe Lalanne
48e526ec43 Refactor contracts validation code
This updates the interfaces on lib/contracts and the validation in
the application-manager module.
2024-08-30 10:52:11 -04:00
Felipe Lalanne
e9f460fd75 Add update status to types
Change-type: minor
2024-08-30 10:52:11 -04:00
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