Commit Graph

2166 Commits

Author SHA1 Message Date
Page-
4be44905aa
Merge pull request #799 from balena-io/update-webpack
Update to webpack 4
2018-12-19 17:50:18 +00:00
Pagan Gazzard
655c476ccd Update to webpack 4
Change-type: minor
2018-12-19 17:12:55 +00:00
Resin CI
e74f2fd7da v9.1.0 2018-12-19 16:06:15 +01:00
CameronDiver
980f5da3a7
Merge pull request #853 from balena-io/834-add-morgan
device-api: Add morgan to log api requests
2018-12-19 15:04:12 +00:00
Cameron Diver
45b322b7e0
device-api: Add morgan to log api requests
Change-type: minor
Closes: #834
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-19 14:30:37 +00:00
Resin CI
e98ec2189d v9.0.3 2018-12-19 15:27:53 +01:00
CameronDiver
fccd66c773
Merge pull request #849 from balena-io/typescript
More typescript conversions
2018-12-19 14:26:13 +00:00
Cameron Diver
0b14af69dd
misc: Update package-lock
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-19 14:08:03 +00:00
Cameron Diver
b977b30dfe
refactor: Convert update-lock module to typescript
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-19 14:07:47 +00:00
Cameron Diver
ec37db597d
refactor: Convert systemd module to typescript
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-19 14:07:45 +00:00
Cameron Diver
e00954babd
refactor: Convert request module to typescript
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-19 14:07:45 +00:00
Cameron Diver
2ea657c95d
refactor: Convert migration module to typescript
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-19 14:07:44 +00:00
Resin CI
dc1450d65d v9.0.2 2018-12-19 13:35:59 +01:00
Giovanni Garufi
63d1a6df3a
Merge pull request #850 from balena-io/fix-changelog-yml
VersionBot: Fix incomplete version in CHANGELOG.yml
2018-12-19 13:33:59 +01:00
Giovanni Garufi
c87123f585 VersionBot: Fix incomplete version in CHANGELOG.yml
Change-type: patch
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
2018-12-18 18:19:46 +01:00
Resin CI
253cc113d8 v9.0.1 2018-12-17 20:34:56 +01:00
Pablo Carranza Vélez
2a3d8de828
Merge pull request #845 from balena-io/fix-download-race
Fix a race condition that could cause an unnecessary restart
2018-12-17 16:33:04 -03:00
Pablo Carranza Velez
42737cb9e9 Fix a race condition that could cause an unnecessary restart of a service immediately after download
Up to now, there was a slim but non-zero chance that an image would be downloaded between the call to `@getTarget` inside deviceState
(which gets the target state and creates Service objects using information from available images), and the call to
`@images.getAvailable` in ApplicationManager (which is used to determine whether we should keep waiting for a download or start the
service). If this race condition happened, then the ApplicationManager would infer that a service was ready to be started (because
the image appears as available), but would have incomplete information about the service because the image wasn't available when
the Service object was created. The result would be that the service would be started, and then immediately on the next applyTarget
the ApplicationManager would try to kill it and restart it to update it with the complete information from the image.

This patch changes this behavior by ensuring that all of the additional information about the current state, which includes available images,
is gathered *before* building the current and target states that we compare. This means that if the image is downloaded after the call to getAvailable, the Service might be constructed with all the information about the image, but it won't be started until the next pass, because ApplicationManager will treat it as still downloading.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-17 15:41:12 -03:00
Resin CI
53e11436db v9.0.0 2018-12-17 18:59:43 +02:00
Pablo Carranza Vélez
d3d0e19a16
Merge pull request #844 from balena-io/local-mode-unmanaged
Unmanaged + local mode fixes
2018-12-17 13:57:37 -03:00
Cameron Diver
96b614ad6a
Replace offline -> unmanaged in logs and tests
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-17 10:53:24 +00:00
Cameron Diver
c533631f70
unmanaged: Default to local mode in target state when unmanaged
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-17 10:53:23 +00:00
Cameron Diver
151af309fb
config: Force config values to strings when storing in db
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-17 10:53:23 +00:00
Cameron Diver
3ca1d7c864
join: Disable local mode when joining a cloud
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-17 10:53:23 +00:00
Cameron Diver
82602abf8d
config: Replace supervisorOfflineMode and offlineMode with unmanaged
Change-type: major
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-14 15:01:41 +00:00
Cameron Diver
5bea0fdc9d
fix: Give unmanaged target states a source of 'local'
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-14 15:01:41 +00:00
Cameron Diver
178e80d92a
Require an apikey for supervisor api in production unmanaged
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-14 15:01:41 +00:00
Cameron Diver
5bb3820d6a
Switch to local mode in unmanaged mode
Change-type: major
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-14 15:01:41 +00:00
Cameron Diver
91a6340563
Move config.json flag back to the database
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-14 15:01:40 +00:00
Cameron Diver
19f8b75766
Revert "localMode: Remove local mode from device-config"
This reverts commit eda477ff86.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-14 11:05:57 +00:00
Resin CI
edb1f3b1e0 v8.7.1 2018-12-13 16:33:15 +02:00
CameronDiver
6011688041
Merge pull request #846 from balena-io/fix-sync
Fix sync.js after move to balena-sync
2018-12-13 14:31:39 +00:00
Cameron Diver
63d9d8df38
Fix sync.js after move to balena-sync
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-13 14:20:14 +00:00
Resin CI
6840c52b7c v8.7.0 2018-12-13 01:25:44 +02:00
Pablo Carranza Vélez
cbdba686f2
Merge pull request #835 from balena-io/os-migration-backup
Add the ability to restore volumes from a backup.tgz in the data part…
2018-12-12 20:24:20 -03:00
Pablo Carranza Velez
b94921263a Use rimraf package instead of handmade function
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-12 14:22:15 -03:00
Pablo Carranza Velez
af717a3761 Stricter validation for backup file contents
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-12 14:17:34 -03:00
Pablo Carranza Velez
42c39ed36d dindctl: Allow mounting a backup.tgz to test migration backups
Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-12 14:17:34 -03:00
Pablo Carranza Velez
501272266b Add the ability to restore volumes from a backup.tgz in the data partition
Change-type: minor
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-12 14:17:33 -03:00
Resin CI
289b2dad4b v8.6.11 2018-12-12 19:10:52 +02:00
Pablo Carranza Vélez
057f62fcbf
Merge pull request #817 from balena-io/balena-sync
Switch from resin-sync to balena-sync, update knex, sqlite3, lodash, coffee-coverage
2018-12-12 14:08:44 -03:00
Pablo Carranza Velez
35e11de69d Fix webpack loader for knex migrations so it works with knex 0.15.2
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-12 13:42:31 -03:00
Pablo Carranza Velez
7854c48f5a Ignore additional knex mssql dependencies in webpack build
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-12 13:42:31 -03:00
Pablo Carranza Velez
b52c92a044 Update lodash to v4.17.5
Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-12 13:42:30 -03:00
Pablo Carranza Velez
3c52faea54 Remove the unused register-coffee-coverage
Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-12 13:42:30 -03:00
Pablo Carranza Velez
d5b2fcd4dd Update knex to 0.15.2 and sqlite3 to 4.0.4
We also replace a createTableIfNotExists in the migrations with hasTable then createTable, to
avoid a warning message about it being not recommended.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-12 13:42:29 -03:00
Pablo Carranza Velez
cbcf046d91 sync.js: Switch from resin-sync to balena-sync
Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-12 13:42:28 -03:00
Resin CI
2a183e1258 v8.6.10 2018-12-12 18:41:59 +02:00
Pablo Carranza Vélez
f7fd34d96f
Merge pull request #842 from balena-io/fix-resin-cleanup
Fix typo that prevented deleting old resin/ supervisor images
2018-12-12 13:40:16 -03:00
Pablo Carranza Velez
a52683ade0 Fix typo that prevented deleting old resin/ supervisor images
Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-11 13:27:39 -03:00