4957 Commits

Author SHA1 Message Date
flowzone-app[bot]
49b18b4a37
v17.0.1 v17.0.1 2025-03-25 20:41:22 +00:00
Christina Wang
623a1638c1
Merge pull request #2413 from balena-os/clarify-firewall-docs-on-host-network-containers
Clarify firewall docs on behavior with host network containers
2025-03-25 13:40:28 -07:00
Christina Ying Wang
caed4dcca0
Clarify firewall docs on behavior with host network containers
Change-type: patch
Signed-off-by: Christina Ying Wang <christina@balena.io>
2025-03-25 13:10:52 -07:00
flowzone-app[bot]
7efdeea0f7
v17.0.0 v17.0.0 2025-03-24 22:18:11 +00:00
flowzone-app[bot]
2d1871e16d
Merge pull request #2400 from balena-os/network-custom-ipam-label
Add Docker network label if custom ipam config
2025-03-24 22:17:12 +00:00
Christina Ying Wang
b596c77ce2
Add Docker network label if custom ipam config
In a target release where the only change is the addition or removal
of a custom ipam config, the Supervisor does not recreate the network
due to ignoring ipam config differences when comparing current and target
network (in network.isEqualConfig). This commit implements the addition of
a network label if the target compose object includes a network with custom
ipam. With the label, the Supervisor will detect a difference between a
network with a custom ipam and a network without, without needing to compare
the ipam configs themselves.

This is a major change, as devices running networks with custom ipam configs
will have their networks recreated to add the network label.

Closes: #2251
Change-type: major
See: https://balena.fibery.io/Work/Project/Fix-Supervisor-not-recreating-network-when-passed-custom-ipam-config-1127
Signed-off-by: Christina Ying Wang <christina@balena.io>
2025-03-24 14:55:19 -07:00
flowzone-app[bot]
8c6e3df7d9
v16.12.9 v16.12.9 2025-03-20 18:43:08 +00:00
flowzone-app[bot]
94cdd3fcd7
Merge pull request #2411 from balena-os/service-dependencies
Start a dependent if all dependencies are started
2025-03-20 18:42:13 +00:00
Felipe Lalanne
7764f98c9d
Start a dependent if all dependencies are started
The previous behavior required that dependencies were running beefore
starting the dependent service. This made it that services dependent on
a one-shot service would not get started and goes against the default
docker behavior.

Depending on a service to be running will require the implementation of
[long syntax depends_on](https://docs.docker.com/reference/compose-file/services/#long-syntax-1) and the condition
`service_healthy`.

Change-type: patch
Closes: #2409
2025-03-20 14:51:32 -03:00
flowzone-app[bot]
b8032edc04
v16.12.8 v16.12.8 2025-03-12 14:50:35 +00:00
flowzone-app[bot]
175872b358
Merge pull request #2408 from balena-os/fix-socket-timeout
Ensure poll socket timeout is defined early
2025-03-12 14:49:34 +00:00
Felipe Lalanne
ae337a1dd7
Remove GOT retries on state poll
The state poll already has retry implementation, making the GOT default
unnecessary.

Change-type: patch
2025-03-12 10:59:16 -03:00
Felipe Lalanne
bdbc6a4ba4
Ensure poll socket timeout is defined early
We have observed that even when setting the socket timeout on the
state poll https request, the timeout is only applied once the socket is
connected. This causes issues with Node's auto family selection (happy
eyeballs), as the default https timeout is 5s which means that larger
[auto select attempt timeout](https://nodejs.org/docs/latest-v22.x/api/net.html#netgetdefaultautoselectfamilyattempttimeout) may result in the socket timing out before all connection attempts have been tried.

This commit sets a different https Agent for state polling, with a
timeout matching the `apiRequestTimeout` used for other request events.

Change-type: patch
2025-03-12 10:59:11 -03:00
flowzone-app[bot]
978652b292
v16.12.7 v16.12.7 2025-03-06 19:11:20 +00:00
flowzone-app[bot]
7771c0e96b
Merge pull request #2406 from balena-os/release-locks-on-app-remove
Release locks when removing apps
2025-03-06 19:10:38 +00:00
Felipe Lalanne
026dc0aed2
Release locks when removing apps
This prevents leftover locks that can prevent other operations from
taking place.

Change-type: patch
2025-03-06 11:50:31 -03:00
flowzone-app[bot]
5ef6b054fd
v16.12.6 v16.12.6 2025-03-04 14:25:09 +00:00
flowzone-app[bot]
3cca2b7ecd
Merge pull request #2404 from balena-os/polling-improvements
Polling improvements
2025-03-04 14:24:18 +00:00
Felipe Lalanne
3d8bd28f5a
Update GOT to v14.4.6 2025-03-04 10:46:47 -03:00
Felipe Lalanne
6d00be2093
Log non-API errors during state poll
The supervisor was failing silently if an error happened while establishing the
connection (e.g. requesting the socket).

Change-type: patch
2025-03-04 10:46:45 -03:00
Felipe Lalanne
f8bdb14335
Fix target poll healthcheck
The Target.lastFetch time compared when performing the healthcheck
resets any time a poll is attempted no matter the outcome. This changes
the behavior so the time is reset only on a successful poll

Change-type: patch
2025-03-04 10:45:31 -03:00
flowzone-app[bot]
c88cf6a259
v16.12.5 v16.12.5 2025-03-04 13:35:28 +00:00
Page-
906ce6dc0d
Merge pull request #2405 from balena-os/fix-api-request-timeout
Decrease balenaCloud api request timeout from 15m to 59s
2025-03-04 13:34:35 +00:00
Pagan Gazzard
49163e92a0 Decrease balenaCloud api request timeout from 15m to 59s
This was mistakenly increased due to confusion between the timeout for
requests to the supervisor's api vs the timeout for requests from the
supervisor to the balenaCloud api. This separates the two configs and
documents the difference between the timeouts whilst also decreasing
the timeout for balenaCloud api requests to the correct/expected value

Change-type: patch
2025-03-04 12:29:18 +00:00
flowzone-app[bot]
f67e45f432
v16.12.4 v16.12.4 2025-03-03 13:42:20 +00:00
flowzone-app[bot]
91335051ac
Merge pull request #2403 from balena-os/dont-revert-to-regular-pull-if-401
Don't revert to regular pull if delta server 401
2025-03-03 13:41:29 +00:00
Christina Ying Wang
2dc9d275b1 Don't revert to regular pull if delta server 401
If the Supervisor receives a 401 Unauthorized from the delta server
when requesting a delta image location, we should surface the error
instead of falling back to a regular pull immediately, as there could
be an issue with the delta auth token, which refreshes after
DELTA_TOKEN_TIMEOUT (10min), or some other edge case.

Change-type: patch
Signed-off-by: Christina Ying Wang <christina@balena.io>
2025-02-24 16:17:15 -08:00
flowzone-app[bot]
b6f0ecba18
v16.12.3 v16.12.3 2025-02-19 20:51:55 +00:00
flowzone-app[bot]
dd0253ff1f
Merge pull request #2396 from balena-os/switch-to-image-pull-if-delta-failure
Switch to image pull if delta failure
2025-02-19 20:50:58 +00:00
Christina Ying Wang
5936af37e7 Bump docker-progress to 5.2.4
Signed-off-by: Christina Ying Wang <christina@balena.io>
2025-02-12 13:49:09 -08:00
Christina Ying Wang
341111f1f9 Retry DELTA_APPLY_RETRY_COUNT (3) times during delta apply fail before reverting to regular pull
This prevents an image download error loop where the delta image on the delta server is present,
but some aspect of the delta image or the base image on the device does not match up, causing
the delta to fail to be applied to the base image.

Delta apply errors don't raise status codes as they are thrown from the Engine (although they should),
so if an error with a status code is raised during this time, throw an error to the handler
indicating that the delta should be retried until success. Errors with status codes raised during
this time are largely network related, so falling back to a regular pull won't improve anything.

Upon delta apply errors exceeding DELTA_APPLY_RETRY_COUNT, revert to a regular pull.

Change-type: patch
Signed-off-by: Christina Ying Wang <christina@balena.io>
2025-02-11 12:19:53 -08:00
Christina Ying Wang
1fc242200f Revert to regular pull immediately on delta server failure (code 400s)
If the delta server responds immediately with HTTP 4xx upon requesting a delta image,
this means the server is not able to supply the resource, so fall back to a regular pull
immediately.

Change-type: patch
Signed-off-by: Christina Ying Wang <christina@balena.io>
2025-02-11 10:58:51 -08:00
flowzone-app[bot]
5c94c61b0a
v16.12.2 v16.12.2 2025-02-11 01:04:24 +00:00
balena-renovate[bot]
43426a4a26
Merge pull request #2401 from balena-os/renovate/balena-io-deploy-to-balena-action-2.0.x
Update balena-io/deploy-to-balena-action action to v2.0.92
2025-02-11 01:03:38 +00:00
balena-renovate[bot]
c57622e226
Update balena-io/deploy-to-balena-action action to v2.0.92
Update balena-io/deploy-to-balena-action from 2.0.74 to 2.0.92

Change-type: patch
2025-02-11 00:32:00 +00:00
flowzone-app[bot]
5fca7c25bc
v16.12.1 v16.12.1 2025-02-10 22:51:54 +00:00
flowzone-app[bot]
e901c38df0
Merge pull request #2399 from balena-os/dependency-updates
Dependency updates
2025-02-10 22:50:54 +00:00
Felipe Lalanne
f99e19f8a9
Update mocha-pod to v2.0.10 2025-02-10 15:54:25 -03:00
Felipe Lalanne
f4b1acba89
Pin deep-object-diff to v1.1.0
Newer patches of the package seem to change the interface causing the
code to no longer compile. More investigation is needed
2025-02-05 18:27:25 -03:00
Felipe Lalanne
88e821ed8e
Pin io-ts version to v2.2.20
gcanti/io-ts#705 fixes an issue with io-ts and non-enumerable
properties, but that results in objects with invalid properties to get
removed during `decode`, which breaks our validation tests.

Need to figure out what is the right behavior for us

Change-type: patch
2025-02-05 18:27:10 -03:00
Felipe Lalanne
58824066e0
Update more dependencies 2025-01-27 12:52:02 +00:00
Felipe Lalanne
f71f98777c
Update network-manager to v1
Change-type: patch
2025-01-23 23:40:52 -03:00
Felipe Lalanne
25e46574ab
Update development dependencies 2025-01-23 11:00:59 -03:00
Felipe Lalanne
52081ba15e
Update balena-request and balena-register-device
Change-type: patch
2025-01-23 10:16:39 -03:00
Felipe Lalanne
342a2d4dac
Update pinejs-client-request to v8
Change-type: patch
2025-01-23 10:07:32 -03:00
Felipe Lalanne
e474a9d95d
Update @balena/compose to v6 2025-01-22 17:16:14 -03:00
Felipe Lalanne
3a3889546d
Update chai utility modules
Updating chai will be done in a future PR as it requires overhauling all
tests since chai is now ESM

Change-type: patch
2025-01-22 10:43:45 -03:00
flowzone-app[bot]
3fbd98e218
v16.12.0 v16.12.0 2025-01-20 22:14:38 +00:00
flowzone-app[bot]
84b9d869e1
Merge pull request #2398 from balena-os/node-22
Update supervisor to Node 22
2025-01-20 22:13:51 +00:00
Felipe Lalanne
85fc5784bc
Update contrato to v0.12.0
Change-type: patch
2025-01-15 18:56:24 -03:00