mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 13:47:54 +00:00
Set default delta apply timeout of 0
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
d19e63d38f
commit
88f19b4147
@ -122,7 +122,7 @@ export const schemaTypes = {
|
||||
},
|
||||
deltaApplyTimeout: {
|
||||
type: PermissiveNumber,
|
||||
default: NullOrUndefined,
|
||||
default: 0,
|
||||
},
|
||||
deltaRetryCount: {
|
||||
type: PermissiveNumber,
|
||||
@ -232,7 +232,7 @@ export const schemaTypes = {
|
||||
deltaEndpoint: t.string,
|
||||
delta: PermissiveBoolean,
|
||||
deltaRequestTimeout: PermissiveNumber,
|
||||
deltaApplyTimeout: t.union([PermissiveNumber, NullOrUndefined]),
|
||||
deltaApplyTimeout: PermissiveNumber,
|
||||
deltaRetryCount: PermissiveNumber,
|
||||
deltaRetryInterval: PermissiveNumber,
|
||||
deltaVersion: PermissiveNumber,
|
||||
|
@ -95,7 +95,7 @@ export class DeviceConfig {
|
||||
deltaApplyTimeout: {
|
||||
envVarName: 'SUPERVISOR_DELTA_APPLY_TIMEOUT',
|
||||
varType: 'int',
|
||||
defaultValue: '',
|
||||
defaultValue: '0',
|
||||
},
|
||||
deltaRetryCount: {
|
||||
envVarName: 'SUPERVISOR_DELTA_RETRY_COUNT',
|
||||
|
@ -9,9 +9,8 @@ import { SchemaReturn } from '../config/schema-type';
|
||||
import { envArrayToObject } from './conversions';
|
||||
import {
|
||||
DeltaStillProcessingError,
|
||||
InternalInconsistencyError,
|
||||
InvalidNetGatewayError,
|
||||
ImageAuthenticationError,
|
||||
InvalidNetGatewayError,
|
||||
} from './errors';
|
||||
import { request, requestLib, resumable } from './request';
|
||||
import { EnvVarObject } from './types';
|
||||
@ -64,12 +63,6 @@ export class DockerUtils extends DockerToolbelt {
|
||||
|
||||
const timeout = deltaOpts.deltaApplyTimeout;
|
||||
|
||||
if (timeout == null) {
|
||||
throw new InternalInconsistencyError(
|
||||
'A delta apply timeout is not set in fetchDeltaWithProgress!',
|
||||
);
|
||||
}
|
||||
|
||||
const log = (str: string) =>
|
||||
console.log(`delta(${deltaOpts.deltaSource}): ${str}`);
|
||||
|
||||
|
@ -16,7 +16,7 @@ DeviceState = require '../src/device-state'
|
||||
mockedInitialConfig = {
|
||||
'RESIN_SUPERVISOR_CONNECTIVITY_CHECK': 'true'
|
||||
'RESIN_SUPERVISOR_DELTA': 'false'
|
||||
'RESIN_SUPERVISOR_DELTA_APPLY_TIMEOUT': ''
|
||||
'RESIN_SUPERVISOR_DELTA_APPLY_TIMEOUT': '0'
|
||||
'RESIN_SUPERVISOR_DELTA_REQUEST_TIMEOUT': '30000'
|
||||
'RESIN_SUPERVISOR_DELTA_RETRY_COUNT': '30'
|
||||
'RESIN_SUPERVISOR_DELTA_RETRY_INTERVAL': '10000'
|
||||
@ -35,7 +35,7 @@ testTarget1 = {
|
||||
'HOST_CONFIG_gpu_mem': '256'
|
||||
'SUPERVISOR_CONNECTIVITY_CHECK': 'true'
|
||||
'SUPERVISOR_DELTA': 'false'
|
||||
'SUPERVISOR_DELTA_APPLY_TIMEOUT': ''
|
||||
'SUPERVISOR_DELTA_APPLY_TIMEOUT': '0'
|
||||
'SUPERVISOR_DELTA_REQUEST_TIMEOUT': '30000'
|
||||
'SUPERVISOR_DELTA_RETRY_COUNT': '30'
|
||||
'SUPERVISOR_DELTA_RETRY_INTERVAL': '10000'
|
||||
@ -117,7 +117,7 @@ testTargetWithDefaults2 = {
|
||||
'HOST_CONFIG_gpu_mem': '512'
|
||||
'SUPERVISOR_CONNECTIVITY_CHECK': 'true'
|
||||
'SUPERVISOR_DELTA': 'false'
|
||||
'SUPERVISOR_DELTA_APPLY_TIMEOUT': ''
|
||||
'SUPERVISOR_DELTA_APPLY_TIMEOUT': '0'
|
||||
'SUPERVISOR_DELTA_REQUEST_TIMEOUT': '30000'
|
||||
'SUPERVISOR_DELTA_RETRY_COUNT': '30'
|
||||
'SUPERVISOR_DELTA_RETRY_INTERVAL': '10000'
|
||||
|
Loading…
Reference in New Issue
Block a user