Commit Graph

4478 Commits

Author SHA1 Message Date
Felipe Lalanne
9bd216327f Expose ports from port mappings on services
PR #2217 removed the expose configuration but also caused a regresion
where ports set via the `ports` configuration would no longer get
exposed to the host, despite portmappings being set. This fixes that
issue by exposing only those ports comming from port mappings.

Change-type: patch
2023-10-24 15:04:39 -03:00
flowzone-app[bot]
6d2470a686
v15.0.0 2023-10-23 17:31:14 +00:00
flowzone-app[bot]
67dac79476
Merge pull request #2217 from balena-os/v15-ignore-dc-expose
Ignore `expose` service compose configuration
2023-10-23 17:30:10 +00:00
Felipe Lalanne
416170bc05 Ignore expose service compose configuration
The docker EXPOSE directive and corresponding docker-compose `expose`
service configuration serves as documentation/metadata that a container
listens on a certain port that may be used for service discovery but it doesn't
have any real impact on the ability for
other containers on the same network to access the exposed service via
the port. In newer engine implementations, this property may conflict
with other network configurations, and prevent the container from being
started by the docker engine (see #2211).

This PR removes code that would manage the expose property and takes the
property out of the whitelist. A composition with the `expose` property
will result in the log message `Ignoring unsupported or unknown compose fields: expose`.

While this change should not have operational impact, it still removes
a previously supported configuration and as such there is a chance of it
being a breaking change for some applications. For this reason it is
being published as a new major version.

Change-type: major
Closes: #2211
2023-10-23 11:41:32 -03:00
flowzone-app[bot]
2089b3863d
v14.13.14 2023-10-23 13:34:46 +00:00
flowzone-app[bot]
cdec9ca34d
Merge pull request #2156 from balena-os/jitter-docs
Add note regading API jitter on target state poll
2023-10-23 13:33:50 +00:00
Felipe Lalanne
b107868765 Add note regading API jitter on target state poll
Change-type: patch
2023-10-23 14:11:20 +01:00
flowzone-app[bot]
f7396cf335
v14.13.13 2023-10-16 21:43:24 +00:00
flowzone-app[bot]
9145544fda
Merge pull request #2213 from balena-os/reduce-lodash
Reduce lodash usage
2023-10-16 21:42:25 +00:00
Pagan Gazzard
e15205301c Switch some _.includes usage to native versions
Change-type: patch
2023-10-16 14:30:25 -03:00
Pagan Gazzard
a4a9a17c1a Switch _.assign usage to native versions
Change-type: patch
2023-10-16 14:30:25 -03:00
Pagan Gazzard
d0cb54537f Switch _.isNaN usage to native versions
Change-type: patch
2023-10-16 14:30:25 -03:00
Pagan Gazzard
c9f032e13a Switch _.isFunction usage to native versions
Change-type: patch
2023-10-16 14:30:25 -03:00
Pagan Gazzard
3bfdc4454e Switch _.isUndefined usage to native versions
Change-type: patch
2023-10-16 14:30:25 -03:00
Pagan Gazzard
8e23091aa9 Switch _.isNull usage to native versions
Change-type: patch
2023-10-16 14:30:25 -03:00
Pagan Gazzard
ca3faebfc9 Switch _.isNumber usage to native versions
Change-type: patch
2023-10-16 14:30:25 -03:00
Pagan Gazzard
20df54668c Switch _.isArray usage to native versions
Change-type: patch
2023-10-16 14:30:25 -03:00
Pagan Gazzard
3fe8a22fb0 Switch _.isString usage to native versions
Change-type: patch
2023-10-16 14:30:25 -03:00
flowzone-app[bot]
a3d70e3240
v14.13.12 2023-10-16 16:59:18 +00:00
flowzone-app[bot]
8981ee58cf
Merge pull request #2215 from balena-os/fix-service-network
Revert "Do not expose ports from image if service network mode"
2023-10-16 16:58:27 +00:00
Felipe Lalanne
3e828dcc52 Revert "Do not expose ports from image if service network mode"
This reverts commit 0c7bad7792, as that
change causes a service restart loop. The supervisor cannot distinguish
between ports exposed via the `EXPOSE` directive and the docker-compose
`expose` property. Because of this, in the case of `network-mode:
service:<...>` the current state and target state never match, leading
to a service restart loop.

Change-type: patch
2023-10-16 13:06:50 -03:00
flowzone-app[bot]
39d912d3e6
v14.13.11 2023-10-16 15:43:29 +00:00
Page-
ab5aa54448
Merge pull request #2214 from balena-os/fix-husky
Fix husky config for automatic linting on commit
2023-10-16 16:42:31 +01:00
Pagan Gazzard
23d5311a51 Fix husky config for automatic linting on commit
Change-type: patch
2023-10-16 16:20:02 +01:00
flowzone-app[bot]
47ebe39bed
v14.13.10 2023-10-16 13:50:24 +00:00
flowzone-app[bot]
3c84c1e3aa
Merge pull request #2210 from balena-os/native-promises
Convert multiple bluebird uses to native promises
2023-10-16 13:49:11 +00:00
Pagan Gazzard
766cce89c7 Convert multiple bluebird uses to native promises
Change-type: patch
2023-10-16 11:40:45 +01:00
flowzone-app[bot]
f6a4465114
v14.13.9 2023-10-16 02:14:34 +00:00
flowzone-app[bot]
906fee7c89
Merge pull request #2212 from balena-os/expose-network-service
Do not expose ports from image if service network mode
2023-10-16 02:13:38 +00:00
Felipe Lalanne
0c7bad7792 Do not expose ports from image if service network mode
The supervisor exposes ports configured using the `EXPOSE` directive in
the dockerfile when configuring the container for runtime. This can
cause issues if using `network_mode: service:<service name>` as the
expose configuration is not compatible with that network mode. This
fix now skips image exposed ports for that particular network mode.

Change-type: patch
Relates-to: #2211
2023-10-12 18:03:42 -03:00
flowzone-app[bot]
60c457f966
v14.13.8 2023-10-12 19:28:43 +00:00
flowzone-app[bot]
84321d5481
Merge pull request #2190 from balena-os/update-dependencies
Update dependencies
2023-10-12 19:27:37 +00:00
Felipe Lalanne
eb485cfde4 Move mdns-resolver to devDependencies
Change-type: patch
2023-10-12 10:28:17 -03:00
Felipe Lalanne
c3832cf061 Move got to devDependencies
Change-type: patch
2023-10-12 10:28:17 -03:00
Felipe Lalanne
dcef2ec78b Move semver to dev-dependencies
Change-type: patch
2023-10-12 10:28:17 -03:00
Felipe Lalanne
50d2d59cd1 Move happy-eyeballs to dev-dependencies
This allows it to be tree-shaken

Change-type: patch
2023-10-12 10:28:17 -03:00
Felipe Lalanne
a67a5a0f8f Move systeminformation to devDependencies
devDependencies are tree-shaked, while dependencies are stored in the
image. We reserve dependencies just for those that contain binary
bindings

Change-type: patch
2023-10-12 10:28:17 -03:00
flowzone-app[bot]
ddf99429eb
v14.13.7 2023-10-12 01:34:05 +00:00
flowzone-app[bot]
9f79b4b157
Merge pull request #2209 from balena-os/logs-optimization
Logs optimizations
2023-10-12 01:33:08 +00:00
Pagan Gazzard
3d73bf3e91 Use mutation for adding service/image ids to logs to reduce allocations
Change-type: patch
2023-10-11 15:39:19 -03:00
Pagan Gazzard
d685ccacb2 Keep the container lock for the entire duration of attaching logs
Change-type: patch
2023-10-11 15:39:19 -03:00
Pagan Gazzard
74d374b5ad Remove unnecessary async on handling journald stderr entries
Change-type: patch
2023-10-11 15:39:19 -03:00
Pagan Gazzard
e3806ec018 Avoid unnecessary work in systemd log row handling for invalid logs
Change-type: patch
2023-10-11 15:39:19 -03:00
flowzone-app[bot]
b94a4f7047
v14.13.6 2023-10-11 14:12:07 +00:00
flowzone-app[bot]
3e0f33ca56
Merge pull request #2208 from balena-os/remove-docker-logs
Remove unused docker logs logging code
2023-10-11 14:11:11 +00:00
Pagan Gazzard
894bdeeeb6 Remove unused docker logs logging code
Change-type: patch
2023-10-11 14:20:33 +01:00
flowzone-app[bot]
bcf6476b2d
v14.13.5 2023-10-10 18:54:24 +00:00
flowzone-app[bot]
db2046649f
Merge pull request #2206 from balena-os/revert-os-release-file-path
Revert os release file path
2023-10-10 18:53:24 +00:00
Christina Ying Wang
bc1d251e66 Revert os-release path to /mnt/root
/mnt/boot/os-release isn't always accurate so /mnt/root should be the source of truth.

Change-type: patch
Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-10-09 14:02:02 -07:00
Christina Ying Wang
b096cb6328 Make Node & NPM versions in package.json slightly more permissive to avoid warning
Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-10-09 13:41:12 -07:00