Commit Graph

2720 Commits

Author SHA1 Message Date
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
Cameron Diver
55ee5a468f
Remove unused local mode parameter from images.getAvailable
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-19 17:00:38 +01:00
Resin CI
384e0e37bc v10.2.5 2019-08-19 19:00:24 +03:00
CameronDiver
b9800ae3d9
Merge pull request #1067 from balena-io/selective-xor-compare
Only consider certain array fields without order
2019-08-19 16:58:54 +01:00
Cameron Diver
76de276b92
Only consider certain array fields without order
Various fields returned from the docker daemon don't retain order (for
example the volumes field). We now only select certain array values to
compare taking order into account.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-19 14:55:06 +01:00
Resin CI
b20e5c567d v10.2.4 2019-08-16 11:20:02 +03:00
CameronDiver
37430124ca
Merge pull request #1063 from balena-io/1060-list-comp
Take order into account when comparing service config arrays
2019-08-16 09:18:13 +01:00
Cameron Diver
86e8a85640
Take order into account when comparing service config arrays
Change-type: patch
Closes: #1060
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-15 17:07:22 +01:00
Resin CI
587e7fa859 v10.2.3 2019-08-15 17:24:43 +03:00
xginn8
aa98899a65
Merge pull request #1061 from balena-io/pcarranzav-codeowners
meta: remove pcarranzav as codeowner
2019-08-15 16:21:18 +02:00
Matthew McGinn
c3fe0f4d37
meta: remove pcarranzav as codeowner
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-08-14 19:57:04 +02:00
Resin CI
30da419033 v10.2.2 2019-08-09 20:57:49 +03:00
xginn8
4b42ebdedd
Merge pull request #1056 from balena-io/docs-typo
docs: fix up typo "sucess" -> "success"
2019-08-09 19:56:03 +02:00
Matthew McGinn
8c9f974b07 docs: fix up typo "sucess" -> "success"
Related to https://github.com/balena-io/docs/pull/1065

Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-08-09 16:36:57 +02:00
Resin CI
0cb1d454e8 v10.2.1 2019-08-09 16:15:59 +03:00