Commit Graph

2684 Commits

Author SHA1 Message Date
CameronDiver
12f68634d8
Merge pull request #1099 from balena-io/db-target-state-cache
Add a cache around the database application target state
2019-10-07 16:19:03 +01:00
Cameron Diver
7b8e7ea8ca
Add a cache around the database application target state
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-07 14:16:31 +01:00
Balena CI
47d39b70d8 v10.4.1 2019-10-02 21:33:17 +03:00
CameronDiver
5bbd1558e6
Merge pull request #1107 from balena-io/fix-contract-validation
Correctly validate container contracts
2019-10-02 19:31:12 +01:00
Cameron Diver
d16403f654
Correctly validate container contracts
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-02 15:48:17 +01:00
Balena CI
5b48f791d9 v10.4.0 2019-10-01 19:45:32 +03:00
CameronDiver
7c9e2f4287
Merge pull request #1090 from balena-io/container-contracts
Add support for container contracts
2019-10-01 17:43:35 +01:00
Cameron Diver
14e442f943 Add support for container contracts
These contracts can specify an OS version and supervisor version that
they require. If any of the containers in a release have requirements
that are not met, the release is rejected, and the previous release
continues to run.

Change-type: minor
Closes: #1086
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-01 16:17:44 +01:00
Cameron Diver
9843f62e24 Upgrade io-ts and fp-ts to 2.0.0
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-01 16:17:44 +01:00
Cameron Diver
5ce8ba8acf Add contract resolution code, which checks release requirements
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-01 16:17:43 +01:00
Cameron Diver
2d168784b2 Avoid synchronous file accesses for os release info
This also required refactoring the request library to be generated with
a promise, as we now no longer get the information synchronously.

We also cache the release info, to avoid grabbing it again within the
same runtime, which does not make sense.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-01 16:17:43 +01:00
Cameron Diver
487e2c54a1 Add test number to test files name
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-01 16:17:42 +01:00
Cameron Diver
7239b93f4a Add a cache around the database application target state
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-09-26 15:03:36 +01:00
Balena CI
6027556150 v10.3.8 2019-09-23 19:36:18 +03:00
Roman Mazur
b6498fe25a
Merge pull request #1095 from balena-io/roman/error-handling
Unify API errors processing
2019-09-23 19:34:26 +03:00
Roman Mazur
8b4c9837fa
Unify API errors processing
With this change, we define a custom error handler as express middleware
which renders 503 error with JSON response that includes status and message
fields.

The handler also logs the error, so the stack can be inspected in supervisor
logs. It's also a point where we can report the error to analytics services.

This removes a bunch of error handlers written in every request handler
function. Behaviour should remain unchanged except the fact that
/healthy endpoint now returns 503 in case of failure instead of 500.

Change-type: patch
Signed-off-by: Roman Mazur <roman@balena.io>
2019-09-23 17:20:38 +03:00
Balena CI
89d9e9d117 v10.3.7 2019-09-20 17:37:24 +03:00
xginn8
ab6fd22c1e
Merge pull request #1094 from balena-io/ping-unauth
ping: move /ping out from authentication
2019-09-20 16:35:41 +02:00
Matthew McGinn
8d5633a11f
ping: move /ping out from authentication
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-09-20 15:16:47 +02:00
Balena CI
310ecb1afb v10.3.6 2019-09-18 11:47:25 +03:00
CameronDiver
19582a1551
Merge pull request #1093 from balena-io/1083-fix-purge
Fix purge action, after v10 volume rework
2019-09-18 09:45:49 +01:00
Cameron Diver
15a1f45fd7 Explicitly remove volumes when purging
Change-type: patch
Closes: #1083
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-09-18 08:48:26 +01:00
Cameron Diver
7d1da38184 Catch and report cloud stream writing errors
If an error fires when writing to the cloud stream, it can stop any
calling processes from completing. Given that a logging failure should
not cause other processes to cancel, we catch and report the error but
otherwise do nothing else.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-09-18 08:48:26 +01:00
Balena CI
7ef4880beb v10.3.5 2019-09-16 15:33:29 +03:00
CameronDiver
b94dbb1ec4
Merge pull request #1092 from balena-io/fix-network-handling
Correctly handle partial IPAM configurations for networks
2019-09-16 13:31:35 +01:00
Cameron Diver
e78f8eccdc
Correctly handle partial IPAM configurations for networks
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-09-16 12:27:06 +01:00
Balena CI
bae78386a8 v10.3.4 2019-09-11 17:59:14 +03:00
Gergely Imreh
806adb9ef6
Merge pull request #1085 from balena-io/restore-fix
device-state: correctly call volume creation on backup restore step
2019-09-11 15:57:30 +01:00
Gergely Imreh
ca9f8ffca1
device-state: correctly call volume creation on backup restore step
The `createFromPath` method takes 3 parameters, while in a previous
version it was only 2 (the new format splits the old format's first
parameter into two, and keeping the last), before the refactor in commit
23e564389d (supervisor v9.18.4)
The backup restoration call has not been updated and thus calls that
function the old (wrong) way, resulting in failed restore, and volume
management errors on a device that attempted a restore.

Change-type: patch
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-09-11 12:11:05 +01:00
Balena CI
b882239fa7 v10.3.3 2019-09-05 13:10:34 +03:00
xginn8
d5f6b903b4
Merge pull request #1078 from balena-io/shellcheck-entry-cleanup
entry.sh: conform to shellcheck syntax
2019-09-05 12:09:00 +02:00
Matthew McGinn
cda39ab9e1
entry.sh: conform to shellcheck syntax
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-09-02 18:39:16 +02:00
Balena CI
b487408a18 v10.3.2 2019-09-02 18:11:13 +03:00
CameronDiver
f3f4e2d3dc
Merge pull request #1057 from balena-io/migrate-unpack
modification to unpacking volume backup
2019-09-02 16:09:24 +01:00
Thomas
e3c1c333f0
Modification to unpacking volume backup
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-09-02 13:28:30 +01:00
Resin CI
72e739f15e v10.3.1 2019-08-22 14:29:42 +03:00
CameronDiver
b915ac5f79
Merge pull request #1071 from balena-io/pin-debug-base-images
Pin debug builds to stretch base images to match non-debug builds
2019-08-22 12:28:04 +01:00
Cameron Diver
93e3bc620a
Pin debug builds to stretch base images to match non-debug builds
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-22 09:47:17 +01:00
Resin CI
8677c37670 v10.3.0 2019-08-22 11:38:22 +03:00
CameronDiver
8fe18ed74a
Merge pull request #1070 from balena-io/update-journald-handling-and-docs
Update documentation and explicitly unpipe journald stream
2019-08-22 09:36:40 +01:00
Cameron Diver
da0534b3c8 Add usage example repo to documentation
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-21 18:33:47 +01:00
Cameron Diver
48bccd34db Add journald format flag
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-21 15:02:05 +01:00
Cameron Diver
2d924b83fc Update documentation and explicitly unpipe journald stream
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-21 15:02:05 +01:00
Resin CI
5121767766 v10.2.7 2019-08-21 16:31:22 +03:00
CameronDiver
aea9362abd
Merge pull request #1069 from balena-io/fix-step-name
Correctly generate network or volume creation steps
2019-08-21 14:29:33 +01:00
Cameron Diver
ded828da9a Correctly generate network or volume creation steps
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-21 10:48:38 +01:00
Resin CI
9a823475b5 v10.2.6 2019-08-19 23:04:25 +03:00
CameronDiver
408ddaa477
Merge pull request #1066 from balena-io/extra-step-engine
Extract composition step engine to typescript module
2019-08-19 21:03:03 +01:00
Cameron Diver
4f31b18670
Extract composition step work out to typescript compose module
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-19 17:00:39 +01:00
Cameron Diver
bd022df8bd
Add default exports for Volume and Network modules
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-19 17:00:38 +01:00