@balena/open-balena-api 30.1.0-build-add-power-fan-boot-configs-2e3f638c421ff5009e5853381a46f6bacbdadb8d-1 → 30.1.0-build-service-install-as-async-job-f06e3878c984b1d08abbd9230755a136c13cf86e-1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/features/ci-cd/hooks/service-installs.js +44 -14
- package/dist/features/ci-cd/hooks/service-installs.js.map +1 -1
- package/dist/features/ci-cd/tasks/index.d.ts +1 -0
- package/dist/features/ci-cd/tasks/index.js +2 -0
- package/dist/features/ci-cd/tasks/index.js.map +1 -0
- package/dist/features/ci-cd/tasks/service-installs.d.ts +3 -0
- package/dist/features/ci-cd/tasks/service-installs.js +152 -0
- package/dist/features/ci-cd/tasks/service-installs.js.map +1 -0
- package/dist/features/device-logs/lib/backends/loki.js +8 -6
- package/dist/features/device-logs/lib/backends/loki.js.map +1 -1
- package/dist/features/device-logs/lib/config.js +2 -2
- package/dist/features/device-logs/lib/config.js.map +1 -1
- package/dist/features/device-logs/lib/store.js +14 -14
- package/dist/features/device-logs/lib/store.js.map +1 -1
- package/dist/features/device-state/routes/fleet-state-get-v3.d.ts +1 -1
- package/dist/features/device-state/routes/state-get-v2.js +2 -2
- package/dist/features/device-state/routes/state-get-v2.js.map +1 -1
- package/dist/features/device-state/routes/state-get-v3.d.ts +4 -4
- package/dist/features/device-state/routes/state-get-v3.js +2 -2
- package/dist/features/device-state/routes/state-get-v3.js.map +1 -1
- package/dist/features/device-types/build-info-facade.d.ts +1 -1
- package/dist/features/device-types/build-info-facade.js +13 -7
- package/dist/features/device-types/build-info-facade.js.map +1 -1
- package/dist/features/vars-schema/env-vars.js +0 -23
- package/dist/features/vars-schema/env-vars.js.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +13 -2
- package/dist/lib/config.js +24 -2
- package/dist/lib/config.js.map +1 -1
- package/dist/tasks.d.ts +1 -0
- package/dist/tasks.js +2 -0
- package/dist/tasks.js.map +1 -0
- package/package.json +2 -2
@@ -1,9 +1,39 @@
|
|
1
1
|
import _ from 'lodash';
|
2
2
|
import { sbvrUtils, hooks, permissions } from '@balena/pinejs';
|
3
|
-
|
3
|
+
import { randomUUID } from 'node:crypto';
|
4
|
+
import { ASYNC_TASK_CREATE_SERVICE_INSTALLS_BATCH_SIZE, ASYNC_TASK_CREATE_SERVICE_INSTALLS_ENABLED, ASYNC_TASKS_ENABLED, } from '../../../lib/config.js';
|
5
|
+
const createServiceInstallsAsync = async (api, deviceFilterOrIds, tx) => {
|
6
|
+
const deviceIds = Array.isArray(deviceFilterOrIds)
|
7
|
+
? deviceFilterOrIds
|
8
|
+
: (await api.get({
|
9
|
+
resource: 'device',
|
10
|
+
options: {
|
11
|
+
$select: 'id',
|
12
|
+
$filter: deviceFilterOrIds,
|
13
|
+
},
|
14
|
+
})).map(({ id }) => id);
|
15
|
+
await Promise.all(_.chunk(deviceIds, ASYNC_TASK_CREATE_SERVICE_INSTALLS_BATCH_SIZE).map(async (deviceBatch) => {
|
16
|
+
return await sbvrUtils.api.tasks.post({
|
17
|
+
resource: 'task',
|
18
|
+
passthrough: { req: permissions.root, tx },
|
19
|
+
body: {
|
20
|
+
key: randomUUID(),
|
21
|
+
is_executed_by__handler: 'create_service_installs',
|
22
|
+
is_executed_with__parameter_set: {
|
23
|
+
devices: deviceBatch,
|
24
|
+
},
|
25
|
+
},
|
26
|
+
});
|
27
|
+
}));
|
28
|
+
};
|
29
|
+
const createReleaseServiceInstalls = async (api, deviceFilterOrIds, releaseFilter, tx) => {
|
4
30
|
if (Array.isArray(deviceFilterOrIds) && deviceFilterOrIds.length === 0) {
|
5
31
|
return;
|
6
32
|
}
|
33
|
+
if (ASYNC_TASKS_ENABLED && ASYNC_TASK_CREATE_SERVICE_INSTALLS_ENABLED) {
|
34
|
+
await createServiceInstallsAsync(api, deviceFilterOrIds, tx);
|
35
|
+
return;
|
36
|
+
}
|
7
37
|
const services = await api.get({
|
8
38
|
resource: 'service',
|
9
39
|
options: {
|
@@ -98,14 +128,14 @@ const createReleaseServiceInstalls = async (api, deviceFilterOrIds, releaseFilte
|
|
98
128
|
}));
|
99
129
|
}));
|
100
130
|
};
|
101
|
-
const createAppServiceInstalls = async (api, appId, deviceIds) => createReleaseServiceInstalls(api, deviceIds, {
|
131
|
+
const createAppServiceInstalls = async (api, appId, deviceIds, tx) => createReleaseServiceInstalls(api, deviceIds, {
|
102
132
|
should_be_running_on__application: {
|
103
133
|
$any: {
|
104
134
|
$alias: 'a',
|
105
135
|
$expr: { a: { id: appId } },
|
106
136
|
},
|
107
137
|
},
|
108
|
-
});
|
138
|
+
}, tx);
|
109
139
|
const deleteServiceInstallsForCurrentApp = (api, newAppId, deviceIds) => api.delete({
|
110
140
|
resource: 'service_install',
|
111
141
|
options: {
|
@@ -141,7 +171,7 @@ const deleteServiceInstallsForCurrentApp = (api, newAppId, deviceIds) => api.del
|
|
141
171
|
},
|
142
172
|
});
|
143
173
|
hooks.addPureHook('PATCH', 'resin', 'application', {
|
144
|
-
POSTRUN: async ({ api, request }) => {
|
174
|
+
POSTRUN: async ({ api, request, tx }) => {
|
145
175
|
const affectedIds = request.affectedIds;
|
146
176
|
if (request.values.should_be_running__release != null &&
|
147
177
|
affectedIds.length !== 0) {
|
@@ -151,7 +181,7 @@ hooks.addPureHook('PATCH', 'resin', 'application', {
|
|
151
181
|
is_pinned_on__release: null,
|
152
182
|
}, {
|
153
183
|
id: request.values.should_be_running__release,
|
154
|
-
});
|
184
|
+
}, tx);
|
155
185
|
}
|
156
186
|
},
|
157
187
|
});
|
@@ -164,13 +194,13 @@ hooks.addPureHook('POST', 'resin', 'device', {
|
|
164
194
|
const rootApi = api.clone({ passthrough: { tx, req: permissions.root } });
|
165
195
|
const app = request.values.belongs_to__application;
|
166
196
|
if (app != null) {
|
167
|
-
await createAppServiceInstalls(rootApi, app, [deviceId]);
|
197
|
+
await createAppServiceInstalls(rootApi, app, [deviceId], tx);
|
168
198
|
}
|
169
199
|
const release = request.values.is_pinned_on__release;
|
170
200
|
if (release != null) {
|
171
201
|
await createReleaseServiceInstalls(api, [deviceId], {
|
172
202
|
id: release,
|
173
|
-
});
|
203
|
+
}, tx);
|
174
204
|
}
|
175
205
|
},
|
176
206
|
});
|
@@ -185,12 +215,12 @@ hooks.addPureHook('PATCH', 'resin', 'device', {
|
|
185
215
|
const affectedIds = await sbvrUtils.getAffectedIds(args);
|
186
216
|
if (affectedIds.length !== 0) {
|
187
217
|
await deleteServiceInstallsForCurrentApp(args.api, newAppId, affectedIds);
|
188
|
-
await createAppServiceInstalls(args.api, newAppId, affectedIds);
|
218
|
+
await createAppServiceInstalls(args.api, newAppId, affectedIds, args.tx);
|
189
219
|
}
|
190
220
|
},
|
191
221
|
});
|
192
222
|
hooks.addPureHook('PATCH', 'resin', 'device', {
|
193
|
-
POSTRUN: async ({ api, request }) => {
|
223
|
+
POSTRUN: async ({ api, request, tx }) => {
|
194
224
|
const affectedIds = request.affectedIds;
|
195
225
|
if (request.values.is_pinned_on__release !== undefined &&
|
196
226
|
affectedIds.length !== 0) {
|
@@ -199,7 +229,7 @@ hooks.addPureHook('PATCH', 'resin', 'device', {
|
|
199
229
|
if (request.values.is_pinned_on__release != null) {
|
200
230
|
await createReleaseServiceInstalls(api, affectedIds, {
|
201
231
|
id: request.values.is_pinned_on__release,
|
202
|
-
});
|
232
|
+
}, tx);
|
203
233
|
}
|
204
234
|
else {
|
205
235
|
const devices = (await api.get({
|
@@ -212,7 +242,7 @@ hooks.addPureHook('PATCH', 'resin', 'device', {
|
|
212
242
|
},
|
213
243
|
}));
|
214
244
|
const devicesByApp = _.groupBy(devices, (d) => d.belongs_to__application.__id);
|
215
|
-
await Promise.all(Object.keys(devicesByApp).map((appId) => createAppServiceInstalls(api, devicesByApp[appId][0].belongs_to__application.__id, devicesByApp[appId].map((d) => d.id))));
|
245
|
+
await Promise.all(Object.keys(devicesByApp).map((appId) => createAppServiceInstalls(api, devicesByApp[appId][0].belongs_to__application.__id, devicesByApp[appId].map((d) => d.id), tx)));
|
216
246
|
}
|
217
247
|
}
|
218
248
|
},
|
@@ -232,19 +262,19 @@ const addSystemAppServiceInstallHooks = (fieldName) => {
|
|
232
262
|
});
|
233
263
|
await createReleaseServiceInstalls(rootApi, [deviceId], {
|
234
264
|
id: releaseId,
|
235
|
-
});
|
265
|
+
}, tx);
|
236
266
|
}
|
237
267
|
},
|
238
268
|
});
|
239
269
|
hooks.addPureHook('PATCH', 'resin', 'device', {
|
240
|
-
POSTRUN: async ({ api, request }) => {
|
270
|
+
POSTRUN: async ({ api, request, tx }) => {
|
241
271
|
const affectedIds = request.affectedIds;
|
242
272
|
const releaseId = request.values[fieldName];
|
243
273
|
// Create supervisor/hostApp service installs when the supervisor/hostApp is pinned on device update
|
244
274
|
if (releaseId != null && affectedIds.length !== 0) {
|
245
275
|
await createReleaseServiceInstalls(api, affectedIds, {
|
246
276
|
id: releaseId,
|
247
|
-
});
|
277
|
+
}, tx);
|
248
278
|
}
|
249
279
|
},
|
250
280
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"service-installs.js","sourceRoot":"","sources":["../../../../src/features/ci-cd/hooks/service-installs.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
1
|
+
{"version":3,"file":"service-installs.js","sourceRoot":"","sources":["../../../../src/features/ci-cd/hooks/service-installs.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG/D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EACN,6CAA6C,EAC7C,0CAA0C,EAC1C,mBAAmB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,0BAA0B,GAAG,KAAK,EACvC,GAA+B,EAC/B,iBAAuD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,EAAE,GAAG,EAAE,WAAW,CAAC,IAAI,EAAE;iBAC1C,CAAC,CAAC;gBACH,MAAM,4BAA4B,CACjC,OAAO,EACP,CAAC,QAAQ,CAAC,EACV;oBACC,EAAE,EAAE,SAAS;iBACb,EACD,EAAE,CACF,CAAC;YACH,CAAC;QACF,CAAC;KACD,CAAC,CAAC;IAEH,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC7C,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE;YACvC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAY,CAAC;YACzC,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAC5C,oGAAoG;YACpG,IAAI,SAAS,IAAI,IAAI,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnD,MAAM,4BAA4B,CACjC,GAAG,EACH,WAAW,EACX;oBACC,EAAE,EAAE,SAAS;iBACb,EACD,EAAE,CACF,CAAC;YACH,CAAC;QACF,CAAC;KACD,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,KAAK,MAAM,SAAS,IAAI;IACvB,+BAA+B;IAC/B,gCAAgC;CACvB,EAAE,CAAC;IACZ,+BAA+B,CAAC,SAAS,CAAC,CAAC;AAC5C,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
import './service-installs.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/ci-cd/tasks/index.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC"}
|
@@ -0,0 +1,152 @@
|
|
1
|
+
import { tasks, sbvrUtils, permissions } from '@balena/pinejs';
|
2
|
+
import _ from 'lodash';
|
3
|
+
import { randomUUID } from 'node:crypto';
|
4
|
+
import { ASYNC_TASK_CREATE_SERVICE_INSTALLS_MAX_TIME_MS } from '../../../lib/config.js';
|
5
|
+
const schema = {
|
6
|
+
type: 'object',
|
7
|
+
properties: {
|
8
|
+
devices: {
|
9
|
+
type: 'array',
|
10
|
+
items: { type: 'number' },
|
11
|
+
},
|
12
|
+
},
|
13
|
+
required: ['devices'],
|
14
|
+
};
|
15
|
+
const { api } = sbvrUtils;
|
16
|
+
tasks.addTaskHandler('create_service_installs', async (options) => {
|
17
|
+
try {
|
18
|
+
const totalSiCreated = await createServiceInstalls(options.params);
|
19
|
+
console.info(`[service-install-task] Created ${totalSiCreated} service installs`);
|
20
|
+
return {
|
21
|
+
status: 'succeeded',
|
22
|
+
};
|
23
|
+
}
|
24
|
+
catch (e) {
|
25
|
+
console.error(`[service-install-task] Error creating service installs: ${e}`);
|
26
|
+
return {
|
27
|
+
error: `${e}`,
|
28
|
+
status: 'failed',
|
29
|
+
};
|
30
|
+
}
|
31
|
+
}, schema);
|
32
|
+
const createServiceInstalls = async ({ devices, }) => {
|
33
|
+
const startTime = Date.now();
|
34
|
+
const releaseExpand = {
|
35
|
+
$select: 'id',
|
36
|
+
$expand: {
|
37
|
+
contains__image: {
|
38
|
+
$select: 'id',
|
39
|
+
$expand: {
|
40
|
+
image: {
|
41
|
+
$select: 'is_a_build_of__service',
|
42
|
+
},
|
43
|
+
},
|
44
|
+
},
|
45
|
+
},
|
46
|
+
};
|
47
|
+
const deviceWithServices = await api.resin.get({
|
48
|
+
resource: 'device',
|
49
|
+
passthrough: { req: permissions.rootRead },
|
50
|
+
options: {
|
51
|
+
$select: 'id',
|
52
|
+
$expand: {
|
53
|
+
should_be_running__release: releaseExpand,
|
54
|
+
should_be_managed_by__release: releaseExpand,
|
55
|
+
should_be_operated_by__release: releaseExpand,
|
56
|
+
},
|
57
|
+
$filter: {
|
58
|
+
id: { $in: devices },
|
59
|
+
},
|
60
|
+
},
|
61
|
+
});
|
62
|
+
const serviceIds = [
|
63
|
+
...new Set(deviceWithServices.flatMap((device) => [
|
64
|
+
...device.should_be_running__release,
|
65
|
+
...device.should_be_managed_by__release,
|
66
|
+
...device.should_be_operated_by__release,
|
67
|
+
].flatMap((release) => release.contains__image.flatMap((image) => image.image.map((img) => img.is_a_build_of__service.__id))))),
|
68
|
+
];
|
69
|
+
const missingServiceFilters = serviceIds.map((serviceId) => ({
|
70
|
+
$not: {
|
71
|
+
service_install: {
|
72
|
+
$any: {
|
73
|
+
$alias: 'si',
|
74
|
+
$expr: {
|
75
|
+
si: {
|
76
|
+
installs__service: serviceId,
|
77
|
+
},
|
78
|
+
},
|
79
|
+
},
|
80
|
+
},
|
81
|
+
},
|
82
|
+
}));
|
83
|
+
if (missingServiceFilters.length === 0) {
|
84
|
+
console.info('[service-install-task] No service installs to create');
|
85
|
+
return 0;
|
86
|
+
}
|
87
|
+
const devicesToAddServiceInstalls = await api.resin.get({
|
88
|
+
resource: 'device',
|
89
|
+
passthrough: { req: permissions.rootRead },
|
90
|
+
options: {
|
91
|
+
$select: 'id',
|
92
|
+
$expand: {
|
93
|
+
service_install: {
|
94
|
+
$select: 'installs__service',
|
95
|
+
$filter: {
|
96
|
+
installs__service: { $in: serviceIds },
|
97
|
+
},
|
98
|
+
},
|
99
|
+
},
|
100
|
+
$filter: {
|
101
|
+
id: { $in: devices },
|
102
|
+
...(missingServiceFilters.length === 1
|
103
|
+
? missingServiceFilters[0]
|
104
|
+
: {
|
105
|
+
$or: missingServiceFilters,
|
106
|
+
}),
|
107
|
+
},
|
108
|
+
},
|
109
|
+
});
|
110
|
+
// This is already batched at one level, does it make sense to batch it again?
|
111
|
+
const remainingDevices = new Set(devices);
|
112
|
+
let totalSiCreated = 0;
|
113
|
+
return await sbvrUtils.db.transaction(async (tx) => {
|
114
|
+
for (const device of devicesToAddServiceInstalls) {
|
115
|
+
if (Date.now() - startTime >
|
116
|
+
ASYNC_TASK_CREATE_SERVICE_INSTALLS_MAX_TIME_MS) {
|
117
|
+
await api.tasks.post({
|
118
|
+
resource: 'task',
|
119
|
+
passthrough: { req: permissions.root, tx },
|
120
|
+
body: {
|
121
|
+
key: randomUUID(),
|
122
|
+
is_executed_by__handler: 'create_service_installs',
|
123
|
+
is_executed_with__parameter_set: {
|
124
|
+
devices: Array.from(remainingDevices),
|
125
|
+
},
|
126
|
+
},
|
127
|
+
});
|
128
|
+
console.info('[service-install-task] Task took too long. Created a new task for the remaining devices');
|
129
|
+
return totalSiCreated;
|
130
|
+
}
|
131
|
+
// Use existingServiceIds as a Set for faster lookups on the follow up filter
|
132
|
+
const existingServiceIds = device.service_install.map((si) => si.installs__service.__id);
|
133
|
+
const deviceServiceIds = _.difference(serviceIds, existingServiceIds);
|
134
|
+
await Promise.all(deviceServiceIds.map(async (serviceId) => {
|
135
|
+
// Create a service_install for this pair of service and device
|
136
|
+
await api.resin.post({
|
137
|
+
resource: 'service_install',
|
138
|
+
passthrough: { req: permissions.root, tx },
|
139
|
+
body: {
|
140
|
+
device: device.id,
|
141
|
+
installs__service: serviceId,
|
142
|
+
},
|
143
|
+
options: { returnResource: false },
|
144
|
+
});
|
145
|
+
}));
|
146
|
+
totalSiCreated += deviceServiceIds.length;
|
147
|
+
remainingDevices.delete(device.id);
|
148
|
+
}
|
149
|
+
return totalSiCreated;
|
150
|
+
});
|
151
|
+
};
|
152
|
+
//# sourceMappingURL=service-installs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"service-installs.js","sourceRoot":"","sources":["../../../../src/features/ci-cd/tasks/service-installs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,8CAA8C,EAAE,MAAM,wBAAwB,CAAC;AAExF,MAAM,MAAM,GAAG;IACd,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACX,OAAO,EAAE;YACR,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAA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AAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,iBAAiB,CAAC,IAAI,CACjC,CAAC;YACF,MAAM,gBAAgB,GAAG,CAAC,CAAC,UAAU,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;YAEtE,MAAM,OAAO,CAAC,GAAG,CAChB,gBAAgB,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE;gBACxC,+DAA+D;gBAC/D,MAAM,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;oBACpB,QAAQ,EAAE,iBAAiB;oBAC3B,WAAW,EAAE,EAAE,GAAG,EAAE,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE;oBAC1C,IAAI,EAAE;wBACL,MAAM,EAAE,MAAM,CAAC,EAAE;wBACjB,iBAAiB,EAAE,SAAS;qBAC5B;oBACD,OAAO,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE;iBAClC,CAAC,CAAC;YACJ,CAAC,CAAC,CACF,CAAC;YAEF,cAAc,IAAI,gBAAgB,CAAC,MAAM,CAAC;YAC1C,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,cAAc,CAAC;IACvB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
@@ -2,7 +2,7 @@ import _ from 'lodash';
|
|
2
2
|
import { EventEmitter } from 'events';
|
3
3
|
import loki from 'loki-grpc-client';
|
4
4
|
import { errors, sbvrUtils, permissions } from '@balena/pinejs';
|
5
|
-
import {
|
5
|
+
import { LOKI_READ_HOST, LOKI_READ_PORT, LOKI_WRITE_HOST, LOKI_WRITE_PORT, } from '../../../../lib/config.js';
|
6
6
|
import { captureException } from '../../../../infra/error-handling/index.js';
|
7
7
|
import { setCurrentSubscriptions, incrementSubscriptionTotal, incrementPublishCallSuccessTotal, incrementPublishCallFailedTotal, incrementLokiPushErrorTotal, incrementPublishLogMessagesTotal, incrementPublishLogMessagesDropped, incrementLokiPushTotal, updateLokiPushDurationHistogram, incrementPublishCallTotal, } from './metrics.js';
|
8
8
|
import { setTimeout } from 'timers/promises';
|
@@ -11,6 +11,8 @@ const { BadRequestError } = errors;
|
|
11
11
|
const statusKeys = _.transform(loki.status, function (result, value, key) {
|
12
12
|
result[value] = key;
|
13
13
|
}, {});
|
14
|
+
const lokiQueryAddress = `${LOKI_READ_HOST}:${LOKI_READ_PORT}`;
|
15
|
+
const lokiPushAddress = `${LOKI_WRITE_HOST}:${LOKI_WRITE_PORT}`;
|
14
16
|
// Retries disabled so that writes to Redis are not delayed on Loki error
|
15
17
|
const RETRIES_ENABLED = false;
|
16
18
|
// Timeout set to 1s so that writes to Redis are not delayed if Loki is slow
|
@@ -76,8 +78,8 @@ export class LokiBackend {
|
|
76
78
|
tailCalls;
|
77
79
|
constructor() {
|
78
80
|
this.subscriptions = new EventEmitter();
|
79
|
-
this.querier = new loki.QuerierClient(
|
80
|
-
this.pusher = new loki.PusherClient(
|
81
|
+
this.querier = new loki.QuerierClient(lokiQueryAddress, loki.createInsecureCredentials());
|
82
|
+
this.pusher = new loki.PusherClient(lokiPushAddress, loki.createInsecureCredentials());
|
81
83
|
this.tailCalls = new Map();
|
82
84
|
this.push = backoff(this.push.bind(this), (err) => {
|
83
85
|
incrementLokiPushErrorTotal(err.code ? statusKeys[err.code] : 'UNDEFINED');
|
@@ -111,7 +113,7 @@ export class LokiBackend {
|
|
111
113
|
streams.push(...queryResponse.getStreamsList());
|
112
114
|
});
|
113
115
|
call.on('error', (error) => {
|
114
|
-
const message = `Failed to query logs from ${
|
116
|
+
const message = `Failed to query logs from ${lokiQueryAddress} for device ${ctx.uuid}`;
|
115
117
|
captureException(error, message);
|
116
118
|
reject(new BadRequestError(message));
|
117
119
|
});
|
@@ -134,7 +136,7 @@ export class LokiBackend {
|
|
134
136
|
catch (err) {
|
135
137
|
incrementPublishCallFailedTotal();
|
136
138
|
incrementPublishLogMessagesDropped(countLogs);
|
137
|
-
let message = `Failed to publish logs to ${
|
139
|
+
let message = `Failed to publish logs to ${lokiPushAddress} for device ${ctx.uuid}`;
|
138
140
|
if (VERBOSE_ERROR_MESSAGE) {
|
139
141
|
message += JSON.stringify(logs, (key, value) => (key === 'nanoTimestamp' ? undefined : value), '\t').substring(0, 1000);
|
140
142
|
}
|
@@ -181,7 +183,7 @@ export class LokiBackend {
|
|
181
183
|
});
|
182
184
|
call.on('error', (err) => {
|
183
185
|
if (err.details !== 'Cancelled') {
|
184
|
-
captureException(err, `Loki tail call error from ${
|
186
|
+
captureException(err, `Loki tail call error from ${lokiQueryAddress} for device ${ctx.uuid}`);
|
185
187
|
}
|
186
188
|
this.subscriptions.removeListener(key, subscription);
|
187
189
|
this.tailCalls.delete(key);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"loki.js","sourceRoot":"","sources":["../../../../../src/features/device-logs/lib/backends/loki.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,IAAI,MAAM,kBAAkB,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAQjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EACN,uBAAuB,EACvB,0BAA0B,EAC1B,gCAAgC,EAChC,+BAA+B,EAC/B,2BAA2B,EAC3B,gCAAgC,EAChC,kCAAkC,EAClC,sBAAsB,EACtB,+BAA+B,EAC/B,yBAAyB,GACzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;AAEnC,+EAA+E;AAC/E,MAAM,UAAU,GAAG,CAAC,CAAC,SAAS,CAC7B,IAAI,CAAC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,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;YAC9B,CAAC;YACD,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;QACD,OAAO,OAAO,CAAC;IAChB,CAAC;CACD"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _ from 'lodash';
|
2
2
|
import { RedisBackend } from './backends/redis.js';
|
3
|
-
import { LOGS_DEFAULT_RETENTION_LIMIT,
|
4
|
-
export const LOKI_ENABLED =
|
3
|
+
import { LOGS_DEFAULT_RETENTION_LIMIT, LOKI_READ_HOST, LOKI_WRITE_HOST, LOKI_WRITE_PCT, } from '../../../lib/config.js';
|
4
|
+
export const LOKI_ENABLED = LOKI_READ_HOST && LOKI_WRITE_HOST && LOKI_WRITE_PCT > 0;
|
5
5
|
export const shouldPublishToLoki = () => LOKI_ENABLED && LOKI_WRITE_PCT > Math.random() * 100;
|
6
6
|
export function addRetentionLimit(ctx) {
|
7
7
|
return {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/features/device-logs/lib/config.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EACN,4BAA4B,EAC5B,
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/features/device-logs/lib/config.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EACN,4BAA4B,EAC5B,cAAc,EACd,eAAe,EACf,cAAc,GACd,MAAM,wBAAwB,CAAC;AAEhC,MAAM,CAAC,MAAM,YAAY,GACxB,cAAc,IAAI,eAAe,IAAI,cAAc,GAAG,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CACvC,YAAY,IAAI,cAAc,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;AAEtD,MAAM,UAAU,iBAAiB,CAChC,GAAwC;IAExC,OAAO;QACN,GAAG,GAAG;QACN,eAAe,EAAE,4BAA4B;KAC7C,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,GAAsB,EAAE,CAAC,IAAI,YAAY,EAAE,CAAC,CAAC;AAE9E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,IAAgC,EAAE;IAC3E,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAC3D,OAAO,IAAI,WAAW,EAAE,CAAC;AAC1B,CAAC,CAAC,CAAC"}
|
@@ -12,28 +12,28 @@ const { api } = sbvrUtils;
|
|
12
12
|
const supervisor = new Supervisor();
|
13
13
|
const getWriteContext = (() => {
|
14
14
|
const $getWriteContext = multiCacheMemoizee(async (uuid, req) => {
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
try {
|
16
|
+
const result = await sbvrUtils.db.readTransaction(async (tx) => {
|
17
|
+
return await api.resin.request({
|
18
18
|
method: 'POST',
|
19
19
|
// We use a parameter alias to signify to pinejs that it's a beneficial query to cache
|
20
20
|
url: `device(uuid=@uuid)/canAccess?@uuid='${uuid}'`,
|
21
21
|
passthrough: { req, tx },
|
22
22
|
body: { action: 'write-log' },
|
23
23
|
});
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
}
|
28
|
-
return addRetentionLimit({
|
29
|
-
id: deviceId,
|
30
|
-
uuid,
|
31
|
-
});
|
32
|
-
}
|
33
|
-
catch {
|
24
|
+
});
|
25
|
+
const deviceId = result?.d?.[0]?.id;
|
26
|
+
if (deviceId == null) {
|
34
27
|
return false;
|
35
28
|
}
|
36
|
-
|
29
|
+
return addRetentionLimit({
|
30
|
+
id: deviceId,
|
31
|
+
uuid,
|
32
|
+
});
|
33
|
+
}
|
34
|
+
catch {
|
35
|
+
return false;
|
36
|
+
}
|
37
37
|
}, {
|
38
38
|
cacheKey: 'getDeviceLogsWriteContext',
|
39
39
|
promise: true,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../../src/features/device-logs/lib/store.ts"],"names":[],"mappings":"AAQA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,GACd,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACN,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EACN,oCAAoC,EACpC,uCAAuC,EACvC,0BAA0B,EAC1B,uBAAuB,EACvB,YAAY,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,kBAAkB,EAClB,uBAAuB,GACvB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,EACL,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,GACzB,GAAG,MAAM,CAAC;AACX,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;AAE1B,MAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC;AAEpC,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE;IAC7B,MAAM,gBAAgB,GAAG,kBAAkB,CAC1C,KAAK,EACJ,IAAY,EACZ,GAA8B,EACA,EAAE;QAChC,
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../../src/features/device-logs/lib/store.ts"],"names":[],"mappings":"AAQA,OAAO,UAAU,MAAM,a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,EAAE,CAAC;oBACpB,GAAG,CAAC,MAAM,EAAE,CAAC;gBACd,CAAC;gBACD,kCAAkC;gBAClC,MAAM,cAAc,CAAC;YACtB,CAAC;YACD,gBAAgB,GAAG,KAAK,CAAC;YAEzB,wEAAwE;YACxE,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACvB,QAAQ,EAAE,CAAC;YACZ,CAAC;QACF,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAClC,CAAC;IACF,CAAC;IACD,SAAS,QAAQ;QAChB,IAAI,gBAAgB,KAAK,KAAK,EAAE,CAAC;YAChC,OAAO;QACR,CAAC;QACD,8DAA8D;QAC9D,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS;YAC9B,CAAC,CAAC,0BAA0B;YAC5B,CAAC,CAAC,uCAAuC,CAAC;QAC3C,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QAC9B,gBAAgB,GAAG,IAAI,CAAC;IACzB,CAAC;AACF,CAAC"}
|
@@ -11,7 +11,7 @@ declare const fleetExpand: {
|
|
11
11
|
readonly should_be_running__release: {
|
12
12
|
readonly $select: readonly ["id", "commit", "composition"];
|
13
13
|
readonly $expand: {
|
14
|
-
readonly
|
14
|
+
readonly release_image: {
|
15
15
|
readonly $select: "id";
|
16
16
|
readonly $expand: {
|
17
17
|
readonly image: {
|
@@ -20,7 +20,7 @@ function buildAppFromRelease(device, application, release, config) {
|
|
20
20
|
composition = {};
|
21
21
|
}
|
22
22
|
}
|
23
|
-
for (const ipr of release.
|
23
|
+
for (const ipr of release.release_image) {
|
24
24
|
// extract the per-image information
|
25
25
|
const image = ipr.image[0];
|
26
26
|
const si = device.service_install.find(({ service }) => service.__id === image.is_a_build_of__service[0].id);
|
@@ -98,7 +98,7 @@ const stateQuery = _.once(() => api.resin.prepare({
|
|
98
98
|
should_be_running__release: {
|
99
99
|
$select: ['id', 'commit', 'composition'],
|
100
100
|
$expand: {
|
101
|
-
|
101
|
+
release_image: {
|
102
102
|
$select: 'id',
|
103
103
|
$expand: {
|
104
104
|
image: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state-get-v2.js","sourceRoot":"","sources":["../../../../src/features/device-state/routes/state-get-v2.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EACN,gBAAgB,EAChB,gBAAgB,GAChB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACN,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,yBAAyB,EACzB,qBAAqB,EACrB,SAAS,EACT,6BAA6B,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE9C,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;AA4C1B,SAAS,mBAAmB,CAC3B,MAAsB,EACtB,WAA8D,EAC9D,OAA6D,EAC7D,MAA0B;IAE1B,IAAI,WAAW,GAAc,EAAE,CAAC;IAChC,MAAM,QAAQ,GAA8B,EAAE,CAAC;IAE/C,wDAAwD;IACxD,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QACrC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACnC,CAAC;SAAM,CAAC;QACP,IAAI,CAAC;YACJ,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC/C,CAAC;QAAC,MAAM,CAAC;YACR,WAAW,GAAG,EAAE,CAAC;QAClB,CAAC;IACF,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,
|
1
|
+
{"version":3,"file":"state-get-v2.js","sourceRoot":"","sources":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YAC7B,QAAQ,EAAE,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,EAAE;SACX;QACF,CAAC,CAAC,mBAAmB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACjE,CAAC,CAAC"}
|
@@ -70,7 +70,7 @@ export declare function buildAppFromRelease(device: ExpandedDevice, application:
|
|
70
70
|
export declare const releaseExpand: {
|
71
71
|
readonly $select: readonly ["id", "commit", "composition"];
|
72
72
|
readonly $expand: {
|
73
|
-
readonly
|
73
|
+
readonly release_image: {
|
74
74
|
readonly $select: "id";
|
75
75
|
readonly $expand: {
|
76
76
|
readonly image: {
|
@@ -261,7 +261,7 @@ declare const getDevice: (req: import("@balena/pinejs/out/sbvr-api/permissions.j
|
|
261
261
|
provides__device__installs__image?: Array<import("../../../balena-model.js").ImageInstall["Read"]>;
|
262
262
|
provides__image_install?: Array<import("../../../balena-model.js").ImageInstall["Read"]>;
|
263
263
|
}, "id" | "commit" | "composition"> & {
|
264
|
-
readonly
|
264
|
+
readonly release_image: (import("@balena/abstract-sql-to-typescript").PickDeferred<{
|
265
265
|
created_at: import("@balena/sbvr-types").Types["Date Time"]["Read"];
|
266
266
|
modified_at: import("@balena/sbvr-types").Types["Date Time"]["Read"];
|
267
267
|
image: {
|
@@ -595,7 +595,7 @@ declare const getDevice: (req: import("@balena/pinejs/out/sbvr-api/permissions.j
|
|
595
595
|
value: import("@balena/sbvr-types").Types["Text"]["Read"];
|
596
596
|
}, "name" | "value">[];
|
597
597
|
})[];
|
598
|
-
readonly
|
598
|
+
readonly release_image: (import("@balena/abstract-sql-to-typescript").PickDeferred<{
|
599
599
|
created_at: import("@balena/sbvr-types").Types["Date Time"]["Read"];
|
600
600
|
modified_at: import("@balena/sbvr-types").Types["Date Time"]["Read"];
|
601
601
|
image: {
|
@@ -824,7 +824,7 @@ declare const getDevice: (req: import("@balena/pinejs/out/sbvr-api/permissions.j
|
|
824
824
|
value: import("@balena/sbvr-types").Types["Text"]["Read"];
|
825
825
|
}, "name" | "value">[];
|
826
826
|
})[];
|
827
|
-
readonly
|
827
|
+
readonly release_image: (import("@balena/abstract-sql-to-typescript").PickDeferred<{
|
828
828
|
created_at: import("@balena/sbvr-types").Types["Date Time"]["Read"];
|
829
829
|
modified_at: import("@balena/sbvr-types").Types["Date Time"]["Read"];
|
830
830
|
image: {
|
@@ -20,7 +20,7 @@ export function buildAppFromRelease(device, application, release, config, defaul
|
|
20
20
|
composition = {};
|
21
21
|
}
|
22
22
|
}
|
23
|
-
for (const ipr of release.
|
23
|
+
for (const ipr of release.release_image) {
|
24
24
|
const image = ipr.image[0];
|
25
25
|
const svc = image.is_a_build_of__service[0];
|
26
26
|
const environment = {};
|
@@ -88,7 +88,7 @@ export function buildAppFromRelease(device, application, release, config, defaul
|
|
88
88
|
export const releaseExpand = {
|
89
89
|
$select: ['id', 'commit', 'composition'],
|
90
90
|
$expand: {
|
91
|
-
|
91
|
+
release_image: {
|
92
92
|
$select: 'id',
|
93
93
|
$expand: {
|
94
94
|
image: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state-get-v3.js","sourceRoot":"","sources":["../../../../src/features/device-state/routes/state-get-v3.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EACN,gBAAgB,EAChB,gBAAgB,GAChB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACN,yBAAyB,EACzB,mBAAmB,EACnB,SAAS,EACT,qBAAqB,EACrB,6BAA6B,EAC7B,eAAe,EACf,uBAAuB,EACvB,aAAa,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAK9C,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;AA4F1B,MAAM,UAAU,mBAAmB,CAClC,MAAkC,EAClC,WAAiE,EACjE,OAAwB,EACxB,MAA0B,EAC1B,aAAkC;IAElC,IAAI,WAAW,GAAc,EAAE,CAAC;IAChC,MAAM,QAAQ,GACb,EAAE,CAAC;IAEJ,wDAAwD;IACxD,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QACrC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACnC,CAAC;SAAM,CAAC;QACP,IAAI,CAAC;YACJ,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC/C,CAAC;QAAC,MAAM,CAAC;YACR,WAAW,GAAG,EAAE,CAAC;QAClB,CAAC;IACF,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,
|
1
|
+
{"version":3,"file":"state-get-v3.js","sourceRoot":"","sources":["../../../../src/features/device-state/routes/state-get-v3.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EACN,gBAAgB,EAChB,gBAAgB,GAChB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACN,yBAAyB,EACzB,mBAAmB,EACnB,SAAS,EACT,qBAAqB,EACrB,6BAA6B,EAC7B,eAAe,EACf,uBAAuB,EACvB,aAAa,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAK9C,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;AA4F1B,MAAM,UAAU,mBAAmB,CAClC,MAAkC,EAClC,WAAiE,EACjE,OAAwB,EACxB,MAA0B,EAC1B,aAAkC;IAElC,IAAI,WAAW,GAAc,EAAE,CAAC;IAChC,MAAM,QAAQ,GACb,EAAE,CA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,EAAE,EAAE,CACnB,MAAM,eAAe,CAAC,CAAC,EAAE,EAAE,EAAE,CAC5B,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAC9C,CACF,CAAC;AAEF,MAAM,WAAW,GAAG,CACnB,MAAsB,EACtB,kBAAsC,EACtC,MAA0B,EAC1B,aAAkC,EACD,EAAE;IACnC,IAAI,WAAgC,CAAC;IACrC,IAAI,OAAwB,CAAC;IAC7B,IAAI,kBAAkB,KAAK,4BAA4B,EAAE,CAAC;QACzD,WAAW,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;QAChD,OAAO,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC;SAAM,CAAC;QACP,OAAO,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,EAAE,CAAC;YACd,OAAO,IAAI,CAAC;QACb,CAAC;QACD,WAAW,GACV,OAGA,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO;QACN,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;YACnB,EAAE,EAAE,WAAW,CAAC,EAAE;YAClB,IAAI,EAAE,WAAW,CAAC,QAAQ;YAC1B,OAAO,EAAE,WAAW,CAAC,OAAO;YAC5B,KAAK,EAAE,WAAW,CAAC,YAAY;YAC/B,GAAG,CAAC,OAAO,IAAI,IAAI,IAAI;gBACtB,QAAQ,EAAE,mBAAmB,CAC5B,MAAM,EACN,WAAW,EACX,OAAO,EACP,MAAM,EACN,aAAa,CACb;aACD,CAAC;SACF;KACD,CAAC;AACH,CAAC,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { DeviceTypeJson } from './device-type-json.js';
|
2
|
-
export declare const getLogoUrl:
|
2
|
+
export declare const getLogoUrl: (normalizedSlug: string, buildId: string) => Promise<string | undefined>;
|
3
3
|
export declare const getDeviceTypeJson: import("../../infra/cache/multi-level-memoizee.js").MemoizedFn<(normalizedSlug: string, buildId: string) => Promise<DeviceTypeJson | undefined>>;
|
4
4
|
export declare const getCompressedSize: import("../../infra/cache/multi-level-memoizee.js").MemoizedFn<(normalizedSlug: string, buildId: string) => Promise<number>>;
|
@@ -1,10 +1,7 @@
|
|
1
1
|
import { multiCacheMemoizee } from '../../infra/cache/index.js';
|
2
2
|
import { BUILD_COMPRESSED_SIZE_CACHE_TIMEOUT, BUILD_PROPERTY_CACHE_TIMEOUT, FILES_HOST, } from '../../lib/config.js';
|
3
3
|
import { fileExists, getFile, getFolderSize, getImageKey, } from './storage/index.js';
|
4
|
-
|
5
|
-
if (!FILES_HOST) {
|
6
|
-
return;
|
7
|
-
}
|
4
|
+
const $getLogoUrl = multiCacheMemoizee(async (normalizedSlug, buildId) => {
|
8
5
|
const pathComponents = [normalizedSlug, buildId, 'logo.svg'];
|
9
6
|
try {
|
10
7
|
const logoKey = getImageKey(...pathComponents);
|
@@ -13,20 +10,29 @@ export const getLogoUrl = multiCacheMemoizee(async (normalizedSlug, buildId) =>
|
|
13
10
|
return;
|
14
11
|
}
|
15
12
|
// url encode since the buildId can contain a `+`
|
16
|
-
|
17
|
-
return `https://${FILES_HOST}/${encodedLogoPath}`;
|
13
|
+
return getImageKey(...pathComponents.map(encodeURIComponent));
|
18
14
|
}
|
19
15
|
catch {
|
20
16
|
return;
|
21
17
|
}
|
22
18
|
}, {
|
23
|
-
cacheKey: 'getLogoUrl',
|
19
|
+
cacheKey: '$getLogoUrl',
|
24
20
|
undefinedAs: false,
|
25
21
|
promise: true,
|
26
22
|
primitive: true,
|
27
23
|
preFetch: true,
|
28
24
|
maxAge: BUILD_PROPERTY_CACHE_TIMEOUT,
|
29
25
|
}, { useVersion: false });
|
26
|
+
export const getLogoUrl = async (normalizedSlug, buildId) => {
|
27
|
+
if (!FILES_HOST) {
|
28
|
+
return;
|
29
|
+
}
|
30
|
+
const encodedLogoPath = await $getLogoUrl(normalizedSlug, buildId);
|
31
|
+
if (!encodedLogoPath) {
|
32
|
+
return;
|
33
|
+
}
|
34
|
+
return `https://${FILES_HOST}/${encodedLogoPath}`;
|
35
|
+
};
|
30
36
|
export const getDeviceTypeJson = multiCacheMemoizee(async (normalizedSlug, buildId) => {
|
31
37
|
const isIgnored = await fileExists(getImageKey(normalizedSlug, buildId, 'IGNORE'));
|
32
38
|
if (isIgnored) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"build-info-facade.js","sourceRoot":"","sources":["../../../src/features/device-types/build-info-facade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAIhE,OAAO,EACN,mCAAmC,EACnC,4BAA4B,EAC5B,UAAU,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,UAAU,EACV,OAAO,EACP,aAAa,EACb,WAAW,GACX,MAAM,oBAAoB,CAAC;AAE5B,MAAM,
|
1
|
+
{"version":3,"file":"build-info-facade.js","sourceRoot":"","sources":["../../../src/features/device-types/build-info-facade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAIhE,OAAO,EACN,mCAAmC,EACnC,4BAA4B,EAC5B,UAAU,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,UAAU,EACV,OAAO,EACP,aAAa,EACb,WAAW,GACX,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,GAAG,kBAAkB,CACrC,KAAK,EACJ,cAAsB,EACtB,OAAe,EACe,EAAE;IAChC,MAAM,cAAc,GAAG,CAAC,cAAc,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7D,IAAI,CAAC;QACJ,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,cAAc,CAAC,CAAC;QAC/C,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC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IAAI,CAAC,QAAQ,EAAE,CAAoB;QAC1D,CAAC,CAAC,SAAS,CAAC;IACd,IAAI,UAAU,EAAE,CAAC;QAChB,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;IAC9B,CAAC;IACD,OAAO,UAAU,CAAC;AACnB,CAAC,EACD;IACC,QAAQ,EAAE,mBAAmB;IAC7B,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,4BAA4B;CACpC,EACD,EAAE,UAAU,EAAE,KAAK,EAAE,CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAClD,KAAK,EAAE,cAAsB,EAAE,OAAe,EAAmB,EAAE;IAClE,OAAO,MAAM,aAAa,CACzB,WAAW,CAAC,cAAc,EAAE,OAAO,EAAE,YAAY,CAAC,CAClD,CAAC;AACH,CAAC,EACD;IACC,QAAQ,EAAE,mBAAmB;IAC7B,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,mCAAmC;CAC3C,EACD,EAAE,UAAU,EAAE,KAAK,EAAE,CACrB,CAAC"}
|
@@ -326,29 +326,6 @@ export const DEVICE_TYPE_SPECIFIC_CONFIG_VAR_PROPERTIES = [
|
|
326
326
|
default: 1,
|
327
327
|
},
|
328
328
|
}),
|
329
|
-
...getDefinitionWithMinimumSupervisorVersion({
|
330
|
-
'16.8.0': [
|
331
|
-
'jetson-agx-orin-devkit',
|
332
|
-
'jetson-agx-orin-devkit-64gb',
|
333
|
-
'jetson-orin-nano-devkit-nvme',
|
334
|
-
'jetson-orin-nano-seeed-j3010',
|
335
|
-
'jetson-orin-nx-seeed-j4012',
|
336
|
-
'jetson-orin-nx-xavier-nx-devkit',
|
337
|
-
],
|
338
|
-
}, {
|
339
|
-
BALENA_HOST_CONFIG_power_mode: {
|
340
|
-
type: 'string',
|
341
|
-
description: 'Define the device power mode. Supported by OS with Jetpack 6 or higher.',
|
342
|
-
examples: ['low', 'mid', 'high'],
|
343
|
-
will_reboot: true,
|
344
|
-
},
|
345
|
-
BALENA_HOST_CONFIG_fan_profile: {
|
346
|
-
type: 'string',
|
347
|
-
description: 'Define the device fan profile. Supported by OS with Jetpack 6 or higher.',
|
348
|
-
examples: ['quiet', 'cool'],
|
349
|
-
will_reboot: false,
|
350
|
-
},
|
351
|
-
}),
|
352
329
|
];
|
353
330
|
const startsWithAny = (ns, name) => {
|
354
331
|
return ns.some((n) => name.startsWith(n));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"env-vars.js","sourceRoot":"","sources":["../../../src/features/vars-schema/env-vars.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAEvE,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;AAEnC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AAEzD,MAAM,mBAAmB,GAAG,CAAC,KAAe,EAAE,EAAE;IAC/C,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAC7C,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,GAAG,KAAK,CAAC,CACpC,CAAC;AACH,CAAC,CAAC;AAQF,yDAAyD;AACzD,8DAA8D;AAC9D,8CAA8C;AAC9C,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAChD,oBAAoB;IACpB,qBAAqB;IACrB,gCAAgC;IAChC,eAAe;IACf,+BAA+B;IAC/B,6BAA6B;IAC7B,uBAAuB;IACvB,wBAAwB;IACxB,0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AAsB,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC;IAE9D,IAAI,aAAa,CAAC,mBAAmB,EAAE,IAAI,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,eAAe,CACxB,wCAAwC,mBAAmB,CAAC,IAAI,CAC/D,IAAI,CACJ,gBAAgB,CACjB,CAAC;IACH,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAa,EAAE,EAAE;IACzD,IAAI,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,eAAe,CACxB,sDAAsD,CACtD,CAAC;IACH,CAAC;AACF,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
@@ -22,7 +22,7 @@ passport.use(jwt.createStrategy(async (id) => await api.resin.get({
|
|
22
22
|
$select: ['actor', 'jwt_secret'],
|
23
23
|
},
|
24
24
|
})));
|
25
|
-
import { API_HOST, COOKIE_SESSION_SECRET, DB_POOL_SIZE, DB_STATEMENT_TIMEOUT, DB_QUERY_TIMEOUT, NODE_ENV, SENTRY_DSN, HIDE_UNVERSIONED_ENDPOINT, setVersion, NDJSON_CTYPE, BROTLI_COMPRESSION_QUALITY, GZIP_COMPRESSION_QUALITY, BROTLI_COMPRESSION_WINDOW_BITS, } from './lib/config.js';
|
25
|
+
import { API_HOST, COOKIE_SESSION_SECRET, DB_POOL_SIZE, DB_STATEMENT_TIMEOUT, DB_QUERY_TIMEOUT, NODE_ENV, SENTRY_DSN, HIDE_UNVERSIONED_ENDPOINT, setVersion, NDJSON_CTYPE, BROTLI_COMPRESSION_QUALITY, GZIP_COMPRESSION_QUALITY, BROTLI_COMPRESSION_WINDOW_BITS, ASYNC_TASKS_ENABLED, PINEJS_QUEUE_INTERVAL_MS, PINEJS_QUEUE_CONCURRENCY, } from './lib/config.js';
|
26
26
|
import { captureException, handleHttpErrors, ThisShouldNeverHappenError, translateError, } from './infra/error-handling/index.js';
|
27
27
|
import { findUser, getUser, reqHasPermission, userFields, userHasPermission, comparePassword, registerUser, setPassword, setRegistrationRoleFunc, validatePassword, checkUserPassword, } from './infra/auth/auth.js';
|
28
28
|
import { setUserTokenDataCallback, tokenFields, generateNewJwtSecret, loginUserXHR, updateUserXHR, createSessionToken, } from './infra/auth/jwt.js';
|
@@ -247,6 +247,13 @@ export async function setup(app, options) {
|
|
247
247
|
}
|
248
248
|
await import('./hooks.js');
|
249
249
|
await options.onInitHooks?.(app);
|
250
|
+
if (ASYNC_TASKS_ENABLED) {
|
251
|
+
pine.env.tasks.queueConcurrency = PINEJS_QUEUE_CONCURRENCY;
|
252
|
+
pine.env.tasks.queueIntervalMS = PINEJS_QUEUE_INTERVAL_MS;
|
253
|
+
await pine.tasks.setup();
|
254
|
+
await import('./tasks.js');
|
255
|
+
await pine.tasks.worker?.start();
|
256
|
+
}
|
250
257
|
const routes = await import('./routes.js');
|
251
258
|
routes.setup(app, options);
|
252
259
|
await options.onInitRoutes?.(app);
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAE3C,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,YAAY,MAAM,cAAc,CAAC;AACxC,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAG3C,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAO3C,OAAO,KAAK,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U,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IAC3D,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACnD,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IAC/B,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAC,CAAC,CAAC;IAErE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AACzB,CAAC;AAED,KAAK,UAAU,WAAW,CACzB,GAAgB,EAChB,IAAqB;IAErB,IAAI,MAAc,CAAC;IACnB,+CAA+C;IAC/C,mDAAmD;IACnD,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE;QAC9B,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;IACH,MAAM,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,EAAE,EAAE;QAClC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,EAA8B,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,uBAAuB,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IAC1E,OAAO,MAAO,CAAC;AAChB,CAAC"}
|
package/dist/lib/config.d.ts
CHANGED
@@ -17,6 +17,7 @@ export declare let API_HEARTBEAT_STATE_TIMEOUT_SECONDS: number;
|
|
17
17
|
export declare let API_HEARTBEAT_STATE_ONLINE_UPDATE_CACHE_TIMEOUT: number | null;
|
18
18
|
export declare const API_VPN_SERVICE_API_KEY: string;
|
19
19
|
export declare const VPN_CONNECT_PROXY_PORT: number;
|
20
|
+
export declare let ASYNC_TASKS_ENABLED: boolean;
|
20
21
|
export declare const AUTH_RESINOS_REGISTRY_CODE: string | undefined;
|
21
22
|
export declare const COOKIE_SESSION_SECRET: string;
|
22
23
|
/**
|
@@ -90,8 +91,10 @@ export declare const REDIS: {
|
|
90
91
|
};
|
91
92
|
export declare const REDIS_LOGS_SHARDED_PUBSUB: boolean;
|
92
93
|
export declare const REDIS_LOGS_COMPRESSION_ENABLED: boolean;
|
93
|
-
export declare const
|
94
|
-
export declare const
|
94
|
+
export declare const LOKI_WRITE_HOST: string | undefined;
|
95
|
+
export declare const LOKI_READ_HOST: string | undefined;
|
96
|
+
export declare const LOKI_WRITE_PORT: number;
|
97
|
+
export declare const LOKI_READ_PORT: number;
|
95
98
|
export declare const LOKI_WRITE_PCT: number;
|
96
99
|
export declare const NDJSON_CTYPE = "application/x-ndjson";
|
97
100
|
export declare const LOGS_HEARTBEAT_INTERVAL = 58000;
|
@@ -104,6 +107,11 @@ export declare const LOGS_READ_STREAM_FLUSH_INTERVAL: number;
|
|
104
107
|
export declare const LOGS_STREAM_FLUSH_INTERVAL: number;
|
105
108
|
export declare const LOGS_BACKEND_UNAVAILABLE_FLUSH_INTERVAL: number;
|
106
109
|
export declare const LOGS_WRITE_BUFFER_LIMIT: number;
|
110
|
+
export declare const PINEJS_QUEUE_CONCURRENCY: number;
|
111
|
+
export declare let PINEJS_QUEUE_INTERVAL_MS: number;
|
112
|
+
export declare let ASYNC_TASK_CREATE_SERVICE_INSTALLS_ENABLED: boolean;
|
113
|
+
export declare const ASYNC_TASK_CREATE_SERVICE_INSTALLS_BATCH_SIZE: number;
|
114
|
+
export declare const ASYNC_TASK_CREATE_SERVICE_INSTALLS_MAX_TIME_MS: number;
|
107
115
|
export declare const REGISTRY2_HOST: string;
|
108
116
|
export declare const SENTRY_DSN: string | undefined;
|
109
117
|
export declare const SUPERUSER_EMAIL: string;
|
@@ -161,5 +169,8 @@ export declare const TEST_MOCK_ONLY: {
|
|
161
169
|
DEFAULT_SUPERVISOR_POLL_INTERVAL: number;
|
162
170
|
API_HEARTBEAT_STATE_TIMEOUT_SECONDS: number;
|
163
171
|
API_HEARTBEAT_STATE_ONLINE_UPDATE_CACHE_TIMEOUT: number | null;
|
172
|
+
ASYNC_TASKS_ENABLED: boolean;
|
173
|
+
ASYNC_TASK_CREATE_SERVICE_INSTALLS_ENABLED: boolean;
|
174
|
+
PINEJS_QUEUE_INTERVAL_MS: number;
|
164
175
|
};
|
165
176
|
export {};
|
package/dist/lib/config.js
CHANGED
@@ -58,6 +58,7 @@ export let API_HEARTBEAT_STATE_TIMEOUT_SECONDS = intVar('API_HEARTBEAT_STATE_TIM
|
|
58
58
|
export let API_HEARTBEAT_STATE_ONLINE_UPDATE_CACHE_TIMEOUT = intVar('API_HEARTBEAT_STATE_ONLINE_UPDATE_CACHE_TIMEOUT', null);
|
59
59
|
export const API_VPN_SERVICE_API_KEY = requiredVar('API_VPN_SERVICE_API_KEY');
|
60
60
|
export const VPN_CONNECT_PROXY_PORT = intVar('VPN_CONNECT_PROXY_PORT', 3128);
|
61
|
+
export let ASYNC_TASKS_ENABLED = boolVar('ASYNC_TASKS_ENABLED', false);
|
61
62
|
export const AUTH_RESINOS_REGISTRY_CODE = optionalVar('AUTH_RESINOS_REGISTRY_CODE');
|
62
63
|
export const COOKIE_SESSION_SECRET = requiredVar('COOKIE_SESSION_SECRET');
|
63
64
|
/**
|
@@ -171,8 +172,12 @@ export const REDIS = {
|
|
171
172
|
};
|
172
173
|
export const REDIS_LOGS_SHARDED_PUBSUB = boolVar('REDIS_LOGS_SHARDED_PUBSUB', false);
|
173
174
|
export const REDIS_LOGS_COMPRESSION_ENABLED = boolVar('REDIS_LOGS_COMPRESSION_ENABLED', true);
|
174
|
-
|
175
|
-
export const
|
175
|
+
const LOKI_HOST = optionalVar('LOKI_HOST');
|
176
|
+
export const LOKI_WRITE_HOST = optionalVar('LOKI_WRITE_HOST', LOKI_HOST);
|
177
|
+
export const LOKI_READ_HOST = optionalVar('LOKI_READ_HOST', LOKI_HOST);
|
178
|
+
const LOKI_PORT = intVar('LOKI_PORT', 9095);
|
179
|
+
export const LOKI_WRITE_PORT = intVar('LOKI_WRITE_PORT', LOKI_PORT);
|
180
|
+
export const LOKI_READ_PORT = intVar('LOKI_READ_PORT', LOKI_PORT);
|
176
181
|
// control the percent of logs written to Loki while scaling up
|
177
182
|
export const LOKI_WRITE_PCT = intVar('LOKI_WRITE_PCT', 0);
|
178
183
|
export const NDJSON_CTYPE = 'application/x-ndjson';
|
@@ -189,6 +194,11 @@ export const LOGS_READ_STREAM_FLUSH_INTERVAL = intVar('LOGS_READ_STREAM_FLUSH_IN
|
|
189
194
|
export const LOGS_STREAM_FLUSH_INTERVAL = intVar('LOGS_STREAM_FLUSH_INTERVAL', 500);
|
190
195
|
export const LOGS_BACKEND_UNAVAILABLE_FLUSH_INTERVAL = intVar('LOGS_BACKEND_UNAVAILABLE_FLUSH_INTERVAL', 5000);
|
191
196
|
export const LOGS_WRITE_BUFFER_LIMIT = intVar('LOGS_WRITE_BUFFER_LIMIT', 50);
|
197
|
+
export const PINEJS_QUEUE_CONCURRENCY = intVar('PINEJS_QUEUE_CONCURRENCY', 1);
|
198
|
+
export let PINEJS_QUEUE_INTERVAL_MS = intVar('PINEJS_QUEUE_INTERVAL_MS', 1000);
|
199
|
+
export let ASYNC_TASK_CREATE_SERVICE_INSTALLS_ENABLED = boolVar('ASYNC_TASK_CREATE_SERVICE_INSTALLS_ENABLED', false);
|
200
|
+
export const ASYNC_TASK_CREATE_SERVICE_INSTALLS_BATCH_SIZE = intVar('ASYNC_TASK_CREATE_SERVICE_INSTALLS_BATCH_SIZE', 2000);
|
201
|
+
export const ASYNC_TASK_CREATE_SERVICE_INSTALLS_MAX_TIME_MS = intVar('ASYNC_TASK_CREATE_SERVICE_INSTALLS_MAX_TIME_MS', 30 * 1000);
|
192
202
|
export const REGISTRY2_HOST = requiredVar('REGISTRY2_HOST');
|
193
203
|
export const SENTRY_DSN = optionalVar('SENTRY_DSN');
|
194
204
|
export const SUPERUSER_EMAIL = optionalVar('SUPERUSER_EMAIL', '');
|
@@ -314,5 +324,17 @@ export const TEST_MOCK_ONLY = {
|
|
314
324
|
guardTestMockOnly();
|
315
325
|
API_HEARTBEAT_STATE_ONLINE_UPDATE_CACHE_TIMEOUT = v;
|
316
326
|
},
|
327
|
+
set ASYNC_TASKS_ENABLED(v) {
|
328
|
+
guardTestMockOnly();
|
329
|
+
ASYNC_TASKS_ENABLED = v;
|
330
|
+
},
|
331
|
+
set ASYNC_TASK_CREATE_SERVICE_INSTALLS_ENABLED(v) {
|
332
|
+
guardTestMockOnly();
|
333
|
+
ASYNC_TASK_CREATE_SERVICE_INSTALLS_ENABLED = v;
|
334
|
+
},
|
335
|
+
set PINEJS_QUEUE_INTERVAL_MS(v) {
|
336
|
+
guardTestMockOnly();
|
337
|
+
PINEJS_QUEUE_INTERVAL_MS = v;
|
338
|
+
},
|
317
339
|
};
|
318
340
|
//# sourceMappingURL=config.js.map
|
package/dist/lib/config.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AACA,OAAO,EACN,OAAO,EACP,KAAK,EACL,MAAM,EACN,OAAO,EACP,WAAW,EACX,WAAW,EACX,OAAO,EACP,YAAY,EACZ,aAAa,EACb,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B,yEAAyE;AACzE,uEAAuE;AACvE,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,MAAM,CAAC,IAAI,OAAe,CAAC;AAC3B,MAAM,UAAU,UAAU,CAAC,CAAiB;IAC3C,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACd,iDAAiD,OAAO,WAAW,CAAC,GAAG,CACvE,CAAC;IACH,CAAC;IACD,O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AQ,EAAE,KAAK,CAAC,CAAC,CAAC;gBAClB,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;aAClB,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,KAAK,CACd,IAAI,OAAO,sGAAsG,CACjH,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACrC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,MAAM,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACtE,CAAC;AACF,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,IAAI,gCAAgC,CACnC,CAA0C;QAE1C,iBAAiB,EAAE,CAAC;QACpB,gCAAgC,GAAG,CAAC,CAAC;IACtC,CAAC;IACD,IAAI,mCAAmC,CACtC,CAA6C;QAE7C,iBAAiB,EAAE,CAAC;QACpB,mCAAmC,GAAG,CAAC,CAAC;IACzC,CAAC;IACD,IAAI,+CAA+C,CAClD,CAAyD;QAEzD,iBAAiB,EAAE,CAAC;QACpB,+CAA+C,GAAG,CAAC,CAAC;IACrD,CAAC;IACD,IAAI,mBAAmB,CAAC,CAA6B;QACpD,iBAAiB,EAAE,CAAC;QACpB,mBAAmB,GAAG,CAAC,CAAC;IACzB,CAAC;IACD,IAAI,0CAA0C,CAC7C,CAAoD;QAEpD,iBAAiB,EAAE,CAAC;QACpB,0CAA0C,GAAG,CAAC,CAAC;IAChD,CAAC;IACD,IAAI,wBAAwB,CAAC,CAAkC;QAC9D,iBAAiB,EAAE,CAAC;QACpB,wBAAwB,GAAG,CAAC,CAAC;IAC9B,CAAC;CACD,CAAC"}
|
package/dist/tasks.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
import './features/ci-cd/tasks/index.js';
|
package/dist/tasks.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../src/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@balena/open-balena-api",
|
3
3
|
"description": "Internet of things, Made Simple",
|
4
|
-
"version": "30.1.0-build-
|
4
|
+
"version": "30.1.0-build-service-install-as-async-job-f06e3878c984b1d08abbd9230755a136c13cf86e-1",
|
5
5
|
"license": "AGPL-3.0",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
@@ -167,6 +167,6 @@
|
|
167
167
|
"loader": "ts-node/esm/transpile-only"
|
168
168
|
},
|
169
169
|
"versionist": {
|
170
|
-
"publishedAt": "2024-10-
|
170
|
+
"publishedAt": "2024-10-23T14:31:16.137Z"
|
171
171
|
}
|
172
172
|
}
|