@balena/open-balena-api 30.0.1-build-image-env-var-device-update-trigger-a13ed02207e2174e5632918c9f54d637be06756f-1 → 30.0.1-build-service-install-as-async-job-b848a57a64c4deff68f0b1cc64c1a6c33e1dc982-1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,41 @@
1
1
  import _ from 'lodash';
2
2
  import { sbvrUtils, hooks, permissions } from '@balena/pinejs';
3
- const createReleaseServiceInstalls = async (api, deviceFilterOrIds, releaseFilter) => {
3
+ import { randomUUID } from 'node:crypto';
4
+ // TODO: make us env vars :)
5
+ const CREATE_SERVICE_INSTALLS_ASYNC = true;
6
+ const SERVICE_INSTALLS_CREATE_BATCH_SIZE = 2000;
7
+ const createServiceInstallsAsync = async (api, deviceFilterOrIds, tx) => {
8
+ const deviceIds = Array.isArray(deviceFilterOrIds)
9
+ ? deviceFilterOrIds
10
+ : (await api.get({
11
+ resource: 'device',
12
+ options: {
13
+ $select: 'id',
14
+ $filter: deviceFilterOrIds,
15
+ },
16
+ })).map(({ id }) => id);
17
+ await Promise.all(_.chunk(deviceIds, SERVICE_INSTALLS_CREATE_BATCH_SIZE).map(async (deviceBatch) => {
18
+ return await sbvrUtils.api.tasks.post({
19
+ resource: 'task',
20
+ passthrough: { req: permissions.root, tx },
21
+ body: {
22
+ key: randomUUID(),
23
+ is_executed_by__handler: 'create_service_installs',
24
+ is_executed_with__parameter_set: {
25
+ devices: deviceBatch,
26
+ },
27
+ },
28
+ });
29
+ }));
30
+ };
31
+ const createReleaseServiceInstalls = async (api, deviceFilterOrIds, releaseFilter, tx) => {
4
32
  if (Array.isArray(deviceFilterOrIds) && deviceFilterOrIds.length === 0) {
5
33
  return;
6
34
  }
35
+ if (CREATE_SERVICE_INSTALLS_ASYNC) {
36
+ await createServiceInstallsAsync(api, deviceFilterOrIds, tx);
37
+ return;
38
+ }
7
39
  const services = await api.get({
8
40
  resource: 'service',
9
41
  options: {
@@ -98,14 +130,14 @@ const createReleaseServiceInstalls = async (api, deviceFilterOrIds, releaseFilte
98
130
  }));
99
131
  }));
100
132
  };
101
- const createAppServiceInstalls = async (api, appId, deviceIds) => createReleaseServiceInstalls(api, deviceIds, {
133
+ const createAppServiceInstalls = async (api, appId, deviceIds, tx) => createReleaseServiceInstalls(api, deviceIds, {
102
134
  should_be_running_on__application: {
103
135
  $any: {
104
136
  $alias: 'a',
105
137
  $expr: { a: { id: appId } },
106
138
  },
107
139
  },
108
- });
140
+ }, tx);
109
141
  const deleteServiceInstallsForCurrentApp = (api, newAppId, deviceIds) => api.delete({
110
142
  resource: 'service_install',
111
143
  options: {
@@ -141,7 +173,7 @@ const deleteServiceInstallsForCurrentApp = (api, newAppId, deviceIds) => api.del
141
173
  },
142
174
  });
143
175
  hooks.addPureHook('PATCH', 'resin', 'application', {
144
- POSTRUN: async ({ api, request }) => {
176
+ POSTRUN: async ({ api, request, tx }) => {
145
177
  const affectedIds = request.affectedIds;
146
178
  if (request.values.should_be_running__release != null &&
147
179
  affectedIds.length !== 0) {
@@ -151,7 +183,7 @@ hooks.addPureHook('PATCH', 'resin', 'application', {
151
183
  is_pinned_on__release: null,
152
184
  }, {
153
185
  id: request.values.should_be_running__release,
154
- });
186
+ }, tx);
155
187
  }
156
188
  },
157
189
  });
@@ -164,13 +196,13 @@ hooks.addPureHook('POST', 'resin', 'device', {
164
196
  const rootApi = api.clone({ passthrough: { tx, req: permissions.root } });
165
197
  const app = request.values.belongs_to__application;
166
198
  if (app != null) {
167
- await createAppServiceInstalls(rootApi, app, [deviceId]);
199
+ await createAppServiceInstalls(rootApi, app, [deviceId], tx);
168
200
  }
169
201
  const release = request.values.is_pinned_on__release;
170
202
  if (release != null) {
171
203
  await createReleaseServiceInstalls(api, [deviceId], {
172
204
  id: release,
173
- });
205
+ }, tx);
174
206
  }
175
207
  },
176
208
  });
@@ -185,12 +217,12 @@ hooks.addPureHook('PATCH', 'resin', 'device', {
185
217
  const affectedIds = await sbvrUtils.getAffectedIds(args);
186
218
  if (affectedIds.length !== 0) {
187
219
  await deleteServiceInstallsForCurrentApp(args.api, newAppId, affectedIds);
188
- await createAppServiceInstalls(args.api, newAppId, affectedIds);
220
+ await createAppServiceInstalls(args.api, newAppId, affectedIds, args.tx);
189
221
  }
190
222
  },
191
223
  });
192
224
  hooks.addPureHook('PATCH', 'resin', 'device', {
193
- POSTRUN: async ({ api, request }) => {
225
+ POSTRUN: async ({ api, request, tx }) => {
194
226
  const affectedIds = request.affectedIds;
195
227
  if (request.values.is_pinned_on__release !== undefined &&
196
228
  affectedIds.length !== 0) {
@@ -199,7 +231,7 @@ hooks.addPureHook('PATCH', 'resin', 'device', {
199
231
  if (request.values.is_pinned_on__release != null) {
200
232
  await createReleaseServiceInstalls(api, affectedIds, {
201
233
  id: request.values.is_pinned_on__release,
202
- });
234
+ }, tx);
203
235
  }
204
236
  else {
205
237
  const devices = (await api.get({
@@ -212,7 +244,7 @@ hooks.addPureHook('PATCH', 'resin', 'device', {
212
244
  },
213
245
  }));
214
246
  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))));
247
+ 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
248
  }
217
249
  }
218
250
  },
@@ -232,19 +264,19 @@ const addSystemAppServiceInstallHooks = (fieldName) => {
232
264
  });
233
265
  await createReleaseServiceInstalls(rootApi, [deviceId], {
234
266
  id: releaseId,
235
- });
267
+ }, tx);
236
268
  }
237
269
  },
238
270
  });
239
271
  hooks.addPureHook('PATCH', 'resin', 'device', {
240
- POSTRUN: async ({ api, request }) => {
272
+ POSTRUN: async ({ api, request, tx }) => {
241
273
  const affectedIds = request.affectedIds;
242
274
  const releaseId = request.values[fieldName];
243
275
  // Create supervisor/hostApp service installs when the supervisor/hostApp is pinned on device update
244
276
  if (releaseId != null && affectedIds.length !== 0) {
245
277
  await createReleaseServiceInstalls(api, affectedIds, {
246
278
  id: releaseId,
247
- });
279
+ }, tx);
248
280
  }
249
281
  },
250
282
  });
@@ -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;AAI/D,MAAM,4BAA4B,GAAG,KAAK,EACzC,GAA+B,EAC/B,iBAAuD,EACvD,aAAsC,EACtB,EAAE;IAClB,IAAI,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxE,OAAO;IACR,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC;QAC9B,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE;YACR,OAAO,EAAE,IAAI;YACb,OAAO,EAAE;gBACR,kBAAkB,EAAE;oBACnB,IAAI,EAAE;wBACL,MAAM,EAAE,GAAG;wBACX,KAAK,EAAE;4BACN,CAAC,EAAE;gCACF,mBAAmB,EAAE;oCACpB,IAAI,EAAE;wCACL,MAAM,EAAE,KAAK;wCACb,KAAK,EAAE;4CACN,GAAG,EAAE;gDACJ,OAAO,EAAE;oDACR,IAAI,EAAE;wDACL,MAAM,EAAE,GAAG;wDACX,KAAK,EAAE,EAAE,CAAC,EAAE,aAAa,EAAE;qDAC3B;iDACD;6CACD;yCACD;qCACD;iCACD;6BACD;yBACD;qBACD;iBACD;aACD;SACD;KACD,CAAC,CAAC;IACH,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO;IACR,CAAC;IACD,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EA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IACZ,+BAA+B,CAAC,SAAS,CAAC,CAAC;AAC5C,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;AAGzC,4BAA4B;AAC5B,MAAM,6BAA6B,GAAG,IAAI,CAAC;AAC3C,MAAM,kCAAkC,GAAG,IAAI,CAAC;AAEhD,MAAM,0BAA0B,GAAG,KAAK,EACvC,GAA+B,EAC/B,iBAAuD,EACvD,EAAM,EACU,EAAE;IAClB,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC;QACjD,CAAC,CAAC,iBAAiB;QACnB,CAAC,CAAC,CACA,MAAM,GAAG,CAAC,GAAG,CAAC;YACb,QAAQ,EAAE,QAAQ;YAClB,OAAO,EAAE;gBACR,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,iBAAiB;aAC1B;SACD,CAAC,CACF,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;IAExB,MAAM,OAAO,CAAC,GAAG,CAChB,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,kCAAkC,CAAC,CAAC,GAAG,CACzD,KAAK,EAAE,WAAW,EAAE,EAAE;QACrB,OAAO,MAAM,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YACrC,QAAQ,EAAE,MAAM;YAChB,WAAW,EAAE,EAAE,GAAG,EAAE,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE;YAC1C,IAAI,EAAE;gBACL,GAAG,EAAE,UAAU,EAAE;gBACjB,uBAAuB,EAAE,yBAAyB;gBAClD,+BAA+B,EAAE;oBAChC,OAAO,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AAgC;CACvB,EAAE,CAAC;IACZ,+BAA+B,CAAC,SAAS,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1 @@
1
+ import './service-installs.js';
@@ -0,0 +1,2 @@
1
+ import './service-installs.js';
2
+ //# sourceMappingURL=index.js.map
@@ -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,3 @@
1
+ export type CreateServiceInstallsTaskParams = {
2
+ devices: number[];
3
+ };
@@ -0,0 +1,159 @@
1
+ import { tasks, sbvrUtils, permissions } from '@balena/pinejs';
2
+ import _ from 'lodash';
3
+ import { randomUUID } from 'node:crypto';
4
+ const schema = {
5
+ type: 'object',
6
+ properties: {
7
+ devices: {
8
+ type: 'array',
9
+ items: { type: 'number' },
10
+ },
11
+ },
12
+ required: ['devices'],
13
+ };
14
+ const { api } = sbvrUtils;
15
+ // TODO: make me an env var :)
16
+ const MAX_JOB_TIME_MS = 30 * 1000;
17
+ tasks.addTaskHandler('create_service_installs', async (options) => {
18
+ try {
19
+ const totalSiCreated = await createServiceInstalls(options.params);
20
+ console.info(`[service-install-task] Created ${totalSiCreated} service installs`);
21
+ return {
22
+ status: 'succeeded',
23
+ };
24
+ }
25
+ catch (e) {
26
+ console.error(`[service-install-task] Error creating service installs: ${e}`);
27
+ return {
28
+ error: `${e}`,
29
+ status: 'failed',
30
+ };
31
+ }
32
+ }, schema);
33
+ const createServiceInstalls = async ({ devices, }) => {
34
+ const startTime = Date.now();
35
+ // TODO: There must be a way to do a single query for it...
36
+ const releaseExpand = {
37
+ $select: 'id',
38
+ $expand: {
39
+ contains__image: {
40
+ $select: 'id',
41
+ $expand: {
42
+ image: {
43
+ $select: 'is_a_build_of__service',
44
+ },
45
+ },
46
+ },
47
+ },
48
+ };
49
+ const deviceWithServices = await api.resin.get({
50
+ resource: 'device',
51
+ passthrough: { req: permissions.rootRead },
52
+ options: {
53
+ $select: 'id',
54
+ $expand: {
55
+ should_be_running__release: releaseExpand,
56
+ should_be_managed_by__release: releaseExpand,
57
+ should_be_operated_by__release: releaseExpand,
58
+ },
59
+ $filter: {
60
+ id: { $in: devices },
61
+ },
62
+ },
63
+ });
64
+ const serviceIds = [
65
+ ...new Set(deviceWithServices.flatMap((device) => [
66
+ ...device.should_be_running__release,
67
+ ...device.should_be_managed_by__release,
68
+ ...device.should_be_operated_by__release,
69
+ ].flatMap((release) => release.contains__image.flatMap((image) => image.image.map((img) => img.is_a_build_of__service.__id))))),
70
+ ];
71
+ const missingServiceFilters = serviceIds.map((serviceId) => ({
72
+ $not: {
73
+ service_install: {
74
+ $any: {
75
+ $alias: 'si',
76
+ $expr: {
77
+ si: {
78
+ installs__service: serviceId,
79
+ },
80
+ },
81
+ },
82
+ },
83
+ },
84
+ }));
85
+ if (missingServiceFilters.length === 0) {
86
+ console.info('[service-install-task] No service installs to create');
87
+ return 0;
88
+ }
89
+ const devicesToAddServiceInstalls = await api.resin.get({
90
+ resource: 'device',
91
+ passthrough: { req: permissions.rootRead },
92
+ options: {
93
+ $select: 'id',
94
+ $expand: {
95
+ service_install: {
96
+ $select: 'installs__service',
97
+ $filter: {
98
+ installs__service: { $in: serviceIds },
99
+ },
100
+ },
101
+ },
102
+ $filter: {
103
+ id: { $in: devices },
104
+ ...(missingServiceFilters.length === 1
105
+ ? missingServiceFilters[0]
106
+ : {
107
+ $or: missingServiceFilters,
108
+ }),
109
+ },
110
+ },
111
+ });
112
+ // hmmm should we really go one device at a time or Promise.all?
113
+ // This is already batched at one level, does it make sense to batch it again?
114
+ const remainingDevices = new Set(devices);
115
+ let totalSiCreated = 0;
116
+ return await sbvrUtils.db.transaction(async (tx) => {
117
+ for (const device of devicesToAddServiceInstalls) {
118
+ // TODO maybe we need to do a improved diff here?
119
+ // e.g keep the mean device time and this become
120
+ // if (Date.now() - startTime > MAX_JOB_TIME_MS - meanDeviceTime)
121
+ // but I am probably overthinking it
122
+ if (Date.now() - startTime > MAX_JOB_TIME_MS) {
123
+ // TODO: better error handling
124
+ await api.tasks.post({
125
+ resource: 'task',
126
+ passthrough: { req: permissions.root, tx },
127
+ body: {
128
+ key: randomUUID(),
129
+ is_executed_by__handler: 'create_service_installs',
130
+ is_executed_with__parameter_set: {
131
+ devices: Array.from(remainingDevices),
132
+ },
133
+ },
134
+ });
135
+ console.info('[service-install-task] Task took too long. Created a new task for the remaining devices');
136
+ return totalSiCreated;
137
+ }
138
+ // Use existingServiceIds as a Set for faster lookups on the follow up filter
139
+ const existingServiceIds = device.service_install.map((si) => si.installs__service.__id);
140
+ const deviceServiceIds = _.difference(serviceIds, existingServiceIds);
141
+ await Promise.all(deviceServiceIds.map(async (serviceId) => {
142
+ // Create a service_install for this pair of service and device
143
+ await api.resin.post({
144
+ resource: 'service_install',
145
+ passthrough: { req: permissions.root, tx },
146
+ body: {
147
+ device: device.id,
148
+ installs__service: serviceId,
149
+ },
150
+ options: { returnResource: false },
151
+ });
152
+ }));
153
+ totalSiCreated += deviceServiceIds.length;
154
+ remainingDevices.delete(device.id);
155
+ }
156
+ return totalSiCreated;
157
+ });
158
+ };
159
+ //# 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;AAEzC,MAAM,MAAM,GAAG;IACd,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACX,OAAO,EAAE;YACR,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACzB;KACD;IACD,QAAQ,EAAE,CAAC,SAAS,CAAC;CACrB,CAAC;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AC;YAED,6EAA6E;YAC7E,MAAM,kBAAkB,GAAG,MAAM,CAAC,eAAe,CAAC,GAAG,CACpD,CAAC,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"}
@@ -267,28 +267,6 @@ addEnvHooks('device_service_environment_variable', async (args) => {
267
267
  });
268
268
  addEnvHooks('image_environment_variable', async (args) => {
269
269
  if (args.req.body.release_image != null) {
270
- const isPartOfSuccessfulRelease = (await args.api.get({
271
- resource: 'release_image',
272
- id: args.req.body.release_image,
273
- options: {
274
- $select: 'id',
275
- $filter: {
276
- is_part_of__release: {
277
- $any: {
278
- $alias: 'r',
279
- $expr: {
280
- r: {
281
- status: 'success',
282
- },
283
- },
284
- },
285
- },
286
- },
287
- },
288
- })) != null;
289
- if (!isPartOfSuccessfulRelease) {
290
- return;
291
- }
292
270
  return {
293
271
  image_install: {
294
272
  $any: {
@@ -1 +1 @@
1
- {"version":3,"file":"vars-update-trigger.js","sourceRoot":"","sources":["../../../../src/features/vars-schema/hooks/vars-update-trigger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,CAAC,MAAM,QAAQ,CAAC;AAGvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAOjE,4FAA4F;AAC5F,wFAAwF;AACxF,8BAA8B;AAC9B,uIAAuI;AACvI,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC;AAE7C,iBAAiB;AACjB,MAAM,WAAW,GAAG,CACnB,QAAW,EACX,WAWC,EACM,EAAE;IACT,MAAM,oBAAoB,GAAG,KAAK,EACjC,IAEC,EACA,EAAE;QACH,IAAI,CAAC;YACJ,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;YACvC,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;gBACpB,OAAO;YACR,CAAC;YACD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;gBACpC,CAAC,CAAC,CAAC,GAAG,EAAE;oBACN,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,MAAM,CAAC;oBAC5C,4GAA4G;oBAC5G,OAAO,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAC3D,aAAa,CAAC,GAAG,CAAC,CAClB,CAAC;gBACH,CAAC,CAAC,EAAE;gBACL,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YACZ,MAAM,SAAS,GAAG,CACjB,MAAM,OAAO,CAAC,GAAG,CAChB,OAAO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C,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO;IACR,CAAC;IACD,OAAO;QACN,SAAS;QACT,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YACpB,aAAa,EAAE;gBACd,IAAI,EAAE;oBACL,MAAM,EAAE,IAAI;oBACZ,KAAK,EAAE;wBACN,eAAe,EAAE;4BAChB,IAAI,EAAE;gCACL,MAAM,EAAE,GAAG;gCACX,KAAK,EAAE;oCACN,CAAC,EAAE;wCACF,aAAa,EAAE;4CACd,IAAI,EAAE;gDACL,MAAM,EAAE,IAAI;gDACZ,KAAK,EAAE;oDACN,EAAE,EAAE;wDACH,0BAA0B,EAAE;4DAC3B,IAAI,EAAE;gEACL,MAAM,EAAE,GAAG;gEACX,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,EAAE,EAAE;6DAC7C;yDACD;qDACD;iDACD;6CACD;yCACD;qCACD;iCACD;6BACD;yBACD;qBACD;iBACD;aACD;SACD,CAAC;KACF,CAAC;AACH,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"vars-update-trigger.js","sourceRoot":"","sources":["../../../../src/features/vars-schema/hooks/vars-update-trigger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,CAAC,MAAM,QAAQ,CAAC;AAGvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAOjE,4FAA4F;AAC5F,wFAAwF;AACxF,8BAA8B;AAC9B,uIAAuI;AACvI,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC;AAE7C,iBAAiB;AACjB,MAAM,WAAW,GAAG,CACnB,QAAW,EACX,WAWC,EACM,EAAE;IACT,MAAM,oBAAoB,GAAG,KAAK,EACjC,IAE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ACD;qBACD;iBACD;aACD;SACD,CAAC;IACH,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IACvD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO;IACR,CAAC;IACD,OAAO;QACN,SAAS;QACT,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YACpB,aAAa,EAAE;gBACd,IAAI,EAAE;oBACL,MAAM,EAAE,IAAI;oBACZ,KAAK,EAAE;wBACN,eAAe,EAAE;4BAChB,IAAI,EAAE;gCACL,MAAM,EAAE,GAAG;gCACX,KAAK,EAAE;oCACN,CAAC,EAAE;wCACF,aAAa,EAAE;4CACd,IAAI,EAAE;gDACL,MAAM,EAAE,IAAI;gDACZ,KAAK,EAAE;oDACN,EAAE,EAAE;wDACH,0BAA0B,EAAE;4DAC3B,IAAI,EAAE;gEACL,MAAM,EAAE,GAAG;gEACX,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,EAAE,EAAE;6DAC7C;yDACD;qDACD;iDACD;6CACD;yCACD;qCACD;iCACD;6BACD;yBACD;qBACD;iBACD;aACD;SACD,CAAC;KACF,CAAC;AACH,CAAC,CAAC,CAAC"}
package/dist/index.js CHANGED
@@ -246,8 +246,13 @@ export async function setup(app, options) {
246
246
  if (options.getNewUserRole) {
247
247
  setRegistrationRoleFunc(options.getNewUserRole);
248
248
  }
249
+ pine.env.tasks.queueConcurrency = 1;
250
+ pine.env.tasks.queueIntervalMS = 100;
251
+ await pine.tasks.setup();
249
252
  await import('./hooks.js');
250
253
  await options.onInitHooks?.(app);
254
+ await import('./tasks.js');
255
+ void pine.tasks.worker?.start();
251
256
  const routes = await import('./routes.js');
252
257
  routes.setup(app, options);
253
258
  await options.onInitRoutes?.(app);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources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,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"}
@@ -0,0 +1 @@
1
+ import './features/ci-cd/tasks/index.js';
package/dist/tasks.js ADDED
@@ -0,0 +1,2 @@
1
+ import './features/ci-cd/tasks/index.js';
2
+ //# sourceMappingURL=tasks.js.map
@@ -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.0.1-build-image-env-var-device-update-trigger-a13ed02207e2174e5632918c9f54d637be06756f-1",
4
+ "version": "30.0.1-build-service-install-as-async-job-b848a57a64c4deff68f0b1cc64c1a6c33e1dc982-1",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -168,6 +168,6 @@
168
168
  "loader": "ts-node/esm/transpile-only"
169
169
  },
170
170
  "versionist": {
171
- "publishedAt": "2024-10-17T10:10:50.839Z"
171
+ "publishedAt": "2024-10-17T12:07:26.444Z"
172
172
  }
173
173
  }