@highstate/backend 0.9.16 → 0.9.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/chunk-NAAIDR4U.js +8499 -0
  2. package/dist/chunk-NAAIDR4U.js.map +1 -0
  3. package/dist/chunk-OU5OQBLB.js +74 -0
  4. package/dist/chunk-OU5OQBLB.js.map +1 -0
  5. package/dist/{chunk-WHALQHEZ.js → chunk-Y7DXREVO.js} +502 -774
  6. package/dist/chunk-Y7DXREVO.js.map +1 -0
  7. package/dist/highstate.manifest.json +4 -4
  8. package/dist/index.js +2979 -2233
  9. package/dist/index.js.map +1 -1
  10. package/dist/library/package-resolution-worker.js +7 -5
  11. package/dist/library/package-resolution-worker.js.map +1 -1
  12. package/dist/library/worker/main.js +40 -41
  13. package/dist/library/worker/main.js.map +1 -1
  14. package/dist/magic-string.es-5ABAC4JN.js +1292 -0
  15. package/dist/magic-string.es-5ABAC4JN.js.map +1 -0
  16. package/dist/shared/index.js +3 -216
  17. package/dist/shared/index.js.map +1 -1
  18. package/package.json +9 -6
  19. package/src/artifact/encryption.ts +47 -7
  20. package/src/artifact/factory.ts +2 -2
  21. package/src/artifact/local.ts +2 -6
  22. package/src/business/__traces__/secret/update-instance-secrets/create-and-delete-secrets-simultaneously.md +356 -0
  23. package/src/business/__traces__/secret/update-instance-secrets/create-new-secrets-for-instance.md +274 -0
  24. package/src/business/__traces__/secret/update-instance-secrets/delete-existing-secrets.md +223 -0
  25. package/src/business/__traces__/secret/update-instance-secrets/no-op-when-no-changes.md +147 -0
  26. package/src/business/__traces__/secret/update-instance-secrets/update-existing-secrets.md +280 -0
  27. package/src/business/__traces__/worker/update-unit-registrations/add-new-unit-registration-when-other-exists.md +360 -0
  28. package/src/business/__traces__/worker/update-unit-registrations/add-new-unit-registration.md +215 -0
  29. package/src/business/__traces__/worker/update-unit-registrations/create-multiple-workers-with-different-identities.md +427 -0
  30. package/src/business/__traces__/worker/update-unit-registrations/handle-nonexistent-registration-id-gracefully.md +217 -0
  31. package/src/business/__traces__/worker/update-unit-registrations/no-op-when-no-changes.md +132 -0
  32. package/src/business/__traces__/worker/update-unit-registrations/recreate-worker-when-image-changes.md +454 -0
  33. package/src/business/__traces__/worker/update-unit-registrations/recreate-worker-when-image-version-changes.md +426 -0
  34. package/src/business/__traces__/worker/update-unit-registrations/recreate-worker-with-same-identity-reuses-service-account.md +372 -0
  35. package/src/business/__traces__/worker/update-unit-registrations/remove-one-of-multiple-unit-registrations.md +383 -0
  36. package/src/business/__traces__/worker/update-unit-registrations/remove-unit-registration.md +245 -0
  37. package/src/business/__traces__/worker/update-unit-registrations/update-existing-unit-registration-when-params-change.md +174 -0
  38. package/src/business/__traces__/worker/update-unit-registrations/update-params-and-image-simultaneously.md +432 -0
  39. package/src/business/__traces__/worker/update-unit-registrations/worker-with-multiple-registrations-not-deleted-when-one-removed.md +220 -0
  40. package/src/business/artifact.ts +2 -1
  41. package/src/business/index.ts +1 -0
  42. package/src/business/instance-lock.ts +3 -2
  43. package/src/business/instance-state.ts +202 -60
  44. package/src/business/project-unlock.ts +41 -23
  45. package/src/business/project.ts +299 -0
  46. package/src/business/secret.test.ts +178 -0
  47. package/src/business/secret.ts +139 -45
  48. package/src/business/worker.test.ts +614 -0
  49. package/src/business/worker.ts +289 -52
  50. package/src/common/clock.ts +18 -0
  51. package/src/common/index.ts +3 -0
  52. package/src/common/random.ts +68 -0
  53. package/src/common/test/index.ts +2 -0
  54. package/src/common/test/render.ts +98 -0
  55. package/src/common/test/tracer.ts +359 -0
  56. package/src/config.ts +5 -1
  57. package/src/hotstate/manager.ts +8 -8
  58. package/src/hotstate/validation.ts +0 -1
  59. package/src/library/abstractions.ts +20 -11
  60. package/src/library/local.ts +6 -13
  61. package/src/library/worker/evaluator.ts +30 -34
  62. package/src/library/worker/loader.lite.ts +13 -0
  63. package/src/library/worker/main.ts +8 -8
  64. package/src/library/worker/protocol.ts +0 -11
  65. package/src/lock/index.ts +1 -0
  66. package/src/lock/manager.ts +17 -2
  67. package/src/lock/test.ts +108 -0
  68. package/src/orchestrator/manager.ts +17 -36
  69. package/src/orchestrator/operation-workset.ts +34 -37
  70. package/src/orchestrator/operation.ts +129 -74
  71. package/src/project/abstractions.ts +27 -51
  72. package/src/project/evaluation.ts +248 -0
  73. package/src/project/index.ts +1 -1
  74. package/src/project/local.ts +75 -127
  75. package/src/pubsub/manager.ts +21 -13
  76. package/src/runner/abstractions.ts +29 -9
  77. package/src/runner/artifact-env.ts +3 -3
  78. package/src/runner/local.ts +29 -19
  79. package/src/runner/pulumi.ts +4 -1
  80. package/src/services.ts +77 -24
  81. package/src/shared/models/backend/library.ts +4 -4
  82. package/src/shared/models/backend/project.ts +25 -6
  83. package/src/shared/models/backend/unlock-method.ts +1 -1
  84. package/src/shared/models/base.ts +1 -84
  85. package/src/shared/models/project/api-key.ts +5 -2
  86. package/src/shared/models/project/artifact.ts +3 -33
  87. package/src/shared/models/project/index.ts +1 -2
  88. package/src/shared/models/project/lock.ts +3 -3
  89. package/src/shared/models/project/model.ts +14 -0
  90. package/src/shared/models/project/operation.ts +3 -3
  91. package/src/shared/models/project/page.ts +3 -3
  92. package/src/shared/models/project/secret.ts +4 -18
  93. package/src/shared/models/project/service-account.ts +2 -2
  94. package/src/shared/models/project/state.ts +32 -15
  95. package/src/shared/models/project/terminal.ts +4 -5
  96. package/src/shared/models/project/trigger.ts +1 -1
  97. package/src/shared/models/project/unlock-method.ts +9 -2
  98. package/src/shared/models/project/worker.ts +9 -7
  99. package/src/shared/resolvers/graph-resolver.ts +41 -26
  100. package/src/shared/resolvers/input.ts +47 -5
  101. package/src/shared/resolvers/validation.ts +23 -7
  102. package/src/shared/utils/args.ts +25 -0
  103. package/src/shared/utils/index.ts +1 -0
  104. package/src/state/abstractions.ts +98 -259
  105. package/src/state/encryption.ts +39 -0
  106. package/src/state/index.ts +1 -0
  107. package/src/state/local/backend.ts +29 -222
  108. package/src/state/local/collection.ts +105 -86
  109. package/src/state/manager.ts +358 -287
  110. package/src/state/memory/backend.ts +70 -0
  111. package/src/state/memory/collection.ts +270 -0
  112. package/src/state/memory/index.ts +2 -0
  113. package/src/state/repository/repository.index.ts +1 -1
  114. package/src/state/repository/repository.ts +71 -22
  115. package/src/state/test.ts +457 -0
  116. package/src/unlock/abstractions.ts +49 -0
  117. package/src/unlock/index.ts +2 -0
  118. package/src/unlock/memory.ts +32 -0
  119. package/src/worker/manager.ts +28 -0
  120. package/dist/chunk-RCB4AFGD.js +0 -159
  121. package/dist/chunk-RCB4AFGD.js.map +0 -1
  122. package/dist/chunk-WHALQHEZ.js.map +0 -1
  123. package/src/project/manager.ts +0 -574
  124. package/src/shared/models/project/component.ts +0 -45
  125. package/src/shared/models/project/instance.ts +0 -74
@@ -0,0 +1,427 @@
1
+ ## act
2
+
3
+ ### <a id="trace-1"></a> 1. 🔒 locked, released at [32](#trace-32)
4
+
5
+ **Keys:**
6
+
7
+ `"worker-image:test:ghcr.io/org/worker:v1"`
8
+
9
+ `"worker-image:test:ghcr.io/org/otherworker:v1"`
10
+
11
+ ### <a id="trace-2"></a> 2. 📖 getManyRecord
12
+
13
+ **Collection:** `worker-registrations:test`
14
+
15
+ **Keys:** `[]`
16
+
17
+ **Result:** `{}`
18
+
19
+ ### <a id="trace-3"></a> 3. 🔒 locked, released at [13](#trace-13)
20
+
21
+ **Keys:**
22
+
23
+ `"worker-image:test:ghcr.io/org/worker"`
24
+
25
+ ### <a id="trace-4"></a> 4. 📖 getAllItems
26
+
27
+ **Collection:** `workers:test`
28
+
29
+ **Result:** `[]`
30
+
31
+ ### <a id="trace-5"></a> 5. â„šī¸ info
32
+
33
+ `creating new worker for image "ghcr.io/org/worker:v1" with identity "ghcr.io/org/worker" in project "test"`
34
+
35
+ **Data:**
36
+
37
+ ```js
38
+ {
39
+ "service": "WorkerService",
40
+ "projectId": "test",
41
+ "image": "ghcr.io/org/worker:v1",
42
+ "identity": "ghcr.io/org/worker"
43
+ }
44
+ ```
45
+
46
+ ### <a id="trace-6"></a> 6. â„šī¸ info
47
+
48
+ `creating service account "00000000-0011-7000-8000-413b6b3e4040" for worker identity "ghcr.io/org/worker" in project "test"`
49
+
50
+ **Data:**
51
+
52
+ ```js
53
+ {
54
+ "service": "WorkerService",
55
+ "projectId": "test",
56
+ "serviceAccountId": "00000000-0011-7000-8000-413b6b3e4040",
57
+ "identity": "ghcr.io/org/worker"
58
+ }
59
+ ```
60
+
61
+ ### <a id="trace-7"></a> 7. 💾 putItem
62
+
63
+ **Collection:** `service-accounts:test`
64
+
65
+ **Batch ID:** `2`, written at [11](#trace-11)
66
+
67
+ **Key:** `"00000000-0011-7000-8000-413b6b3e4040"`
68
+
69
+ **Value:**
70
+
71
+ ```js
72
+ {
73
+ "id": "00000000-0011-7000-8000-413b6b3e4040",
74
+ "meta": {}
75
+ }
76
+ ```
77
+
78
+ ### <a id="trace-8"></a> 8. 💾 putItem
79
+
80
+ **Collection:** `api-keys:test`
81
+
82
+ **Batch ID:** `2`, written at [11](#trace-11)
83
+
84
+ **Key:** `"00000000-0023-7000-8000-8b4d7d505252"`
85
+
86
+ **Value:**
87
+
88
+ ```js
89
+ {
90
+ "id": "00000000-0023-7000-8000-8b4d7d505252",
91
+ "meta": {},
92
+ "token": "55575f585a5f6260655e8d5f8f626464666e67696e716f746d9c6e9e71737375",
93
+ "scopes": [
94
+ {
95
+ "type": "service-account",
96
+ "actions": [
97
+ "full"
98
+ ],
99
+ "serviceAccountIds": [
100
+ "00000000-0011-7000-8000-413b6b3e4040"
101
+ ]
102
+ }
103
+ ]
104
+ }
105
+ ```
106
+
107
+ ### <a id="trace-9"></a> 9. â„šī¸ info
108
+
109
+ `creating worker "00000000-0055-7000-8001-517faf828484" for image "ghcr.io/org/worker:v1" in project "test"`
110
+
111
+ **Data:**
112
+
113
+ ```js
114
+ {
115
+ "service": "WorkerService",
116
+ "projectId": "test",
117
+ "workerId": "00000000-0055-7000-8001-517faf828484",
118
+ "image": "ghcr.io/org/worker:v1",
119
+ "identity": "ghcr.io/org/worker",
120
+ "serviceAccountId": "00000000-0011-7000-8000-413b6b3e4040"
121
+ }
122
+ ```
123
+
124
+ ### <a id="trace-10"></a> 10. 💾 putItem
125
+
126
+ **Collection:** `workers:test`
127
+
128
+ **Batch ID:** `2`, written at [11](#trace-11)
129
+
130
+ **Key:** `"00000000-0055-7000-8001-517faf828484"`
131
+
132
+ **Value:**
133
+
134
+ ```js
135
+ {
136
+ "id": "00000000-0055-7000-8001-517faf828484",
137
+ "meta": {},
138
+ "status": "starting",
139
+ "failedStartAttempts": 5,
140
+ "identity": "ghcr.io/org/worker",
141
+ "image": "ghcr.io/org/worker:v1",
142
+ "serviceAccountId": "00000000-0011-7000-8000-413b6b3e4040",
143
+ "apiKeyId": "00000000-0023-7000-8000-8b4d7d505252"
144
+ }
145
+ ```
146
+
147
+ ### <a id="trace-11"></a> 11. 💾 write [7](#trace-7), [8](#trace-8), [10](#trace-10)
148
+
149
+ ### <a id="trace-12"></a> 12. ✅ workerManager.startWorker
150
+
151
+ **Args:**
152
+
153
+ `"test"`
154
+
155
+ `"00000000-0055-7000-8001-517faf828484"`
156
+
157
+ ### <a id="trace-13"></a> 13. 🔓 released, locked at [3](#trace-3)
158
+
159
+ **Keys:**
160
+
161
+ `"worker-image:test:ghcr.io/org/worker"`
162
+
163
+ ### <a id="trace-14"></a> 14. â„šī¸ info
164
+
165
+ `creating worker registration "00000000-0067-7000-8001-9b91c1949696" for unit worker "worker1" in project "test"`
166
+
167
+ **Data:**
168
+
169
+ ```js
170
+ {
171
+ "service": "WorkerService",
172
+ "projectId": "test",
173
+ "registrationId": "00000000-0067-7000-8001-9b91c1949696",
174
+ "unitWorkerName": "worker1",
175
+ "workerId": "00000000-0055-7000-8001-517faf828484",
176
+ "image": "ghcr.io/org/worker:v1"
177
+ }
178
+ ```
179
+
180
+ ### <a id="trace-15"></a> 15. 💾 putItem
181
+
182
+ **Collection:** `worker-registrations:test`
183
+
184
+ **Batch ID:** `1`, written at [31](#trace-31)
185
+
186
+ **Key:** `"00000000-0067-7000-8001-9b91c1949696"`
187
+
188
+ **Value:**
189
+
190
+ ```js
191
+ {
192
+ "id": "00000000-0067-7000-8001-9b91c1949696",
193
+ "meta": {},
194
+ "image": "ghcr.io/org/worker:v1",
195
+ "params": {},
196
+ "instanceId": "test",
197
+ "workerId": "00000000-0055-7000-8001-517faf828484"
198
+ }
199
+ ```
200
+
201
+ ### <a id="trace-16"></a> 16. 💾 put
202
+
203
+ **Collection:** `worker-registration-index:test:00000000-0055-7000-8001-517faf828484`
204
+
205
+ **Key:** `"00000000-0067-7000-8001-9b91c1949696"`
206
+
207
+ **Value:**
208
+
209
+ `""`
210
+
211
+ ### <a id="trace-17"></a> 17. 🔒 locked, released at [27](#trace-27)
212
+
213
+ **Keys:**
214
+
215
+ `"worker-image:test:ghcr.io/org/otherworker"`
216
+
217
+ ### <a id="trace-18"></a> 18. 📖 getAllItems
218
+
219
+ **Collection:** `workers:test`
220
+
221
+ **Result:**
222
+
223
+ ```js
224
+ {
225
+ "id": "00000000-0055-7000-8001-517faf828484",
226
+ "meta": {
227
+ "createdAt": 0,
228
+ "updatedAt": 0
229
+ },
230
+ "status": "starting",
231
+ "failedStartAttempts": 5,
232
+ "identity": "ghcr.io/org/worker",
233
+ "image": "ghcr.io/org/worker:v1",
234
+ "serviceAccountId": "00000000-0011-7000-8000-413b6b3e4040",
235
+ "apiKeyId": "00000000-0023-7000-8000-8b4d7d505252"
236
+ }
237
+ ```
238
+
239
+ ### <a id="trace-19"></a> 19. â„šī¸ info
240
+
241
+ `creating new worker for image "ghcr.io/org/otherworker:v1" with identity "ghcr.io/org/otherworker" in project "test"`
242
+
243
+ **Data:**
244
+
245
+ ```js
246
+ {
247
+ "service": "WorkerService",
248
+ "projectId": "test",
249
+ "image": "ghcr.io/org/otherworker:v1",
250
+ "identity": "ghcr.io/org/otherworker"
251
+ }
252
+ ```
253
+
254
+ ### <a id="trace-20"></a> 20. â„šī¸ info
255
+
256
+ `creating service account "00000000-0079-7000-8001-e1a3d3a6a8a8" for worker identity "ghcr.io/org/otherworker" in project "test"`
257
+
258
+ **Data:**
259
+
260
+ ```js
261
+ {
262
+ "service": "WorkerService",
263
+ "projectId": "test",
264
+ "serviceAccountId": "00000000-0079-7000-8001-e1a3d3a6a8a8",
265
+ "identity": "ghcr.io/org/otherworker"
266
+ }
267
+ ```
268
+
269
+ ### <a id="trace-21"></a> 21. 💾 putItem
270
+
271
+ **Collection:** `service-accounts:test`
272
+
273
+ **Batch ID:** `3`, written at [25](#trace-25)
274
+
275
+ **Key:** `"00000000-0079-7000-8001-e1a3d3a6a8a8"`
276
+
277
+ **Value:**
278
+
279
+ ```js
280
+ {
281
+ "id": "00000000-0079-7000-8001-e1a3d3a6a8a8",
282
+ "meta": {}
283
+ }
284
+ ```
285
+
286
+ ### <a id="trace-22"></a> 22. 💾 putItem
287
+
288
+ **Collection:** `api-keys:test`
289
+
290
+ **Batch ID:** `3`, written at [25](#trace-25)
291
+
292
+ **Key:** `"00000000-008b-7000-8002-2bb5e5b8baba"`
293
+
294
+ **Value:**
295
+
296
+ ```js
297
+ {
298
+ "id": "00000000-008b-7000-8002-2bb5e5b8baba",
299
+ "meta": {},
300
+ "token": "bdbfc7c0c2c7cac8cdc6f5c7f7caccccced6cfd1d6d9d7dcd504d606d9dbdbdd",
301
+ "scopes": [
302
+ {
303
+ "type": "service-account",
304
+ "actions": [
305
+ "full"
306
+ ],
307
+ "serviceAccountIds": [
308
+ "00000000-0079-7000-8001-e1a3d3a6a8a8"
309
+ ]
310
+ }
311
+ ]
312
+ }
313
+ ```
314
+
315
+ ### <a id="trace-23"></a> 23. â„šī¸ info
316
+
317
+ `creating worker "00000000-00bd-7000-8002-f1e717eaecec" for image "ghcr.io/org/otherworker:v1" in project "test"`
318
+
319
+ **Data:**
320
+
321
+ ```js
322
+ {
323
+ "service": "WorkerService",
324
+ "projectId": "test",
325
+ "workerId": "00000000-00bd-7000-8002-f1e717eaecec",
326
+ "image": "ghcr.io/org/otherworker:v1",
327
+ "identity": "ghcr.io/org/otherworker",
328
+ "serviceAccountId": "00000000-0079-7000-8001-e1a3d3a6a8a8"
329
+ }
330
+ ```
331
+
332
+ ### <a id="trace-24"></a> 24. 💾 putItem
333
+
334
+ **Collection:** `workers:test`
335
+
336
+ **Batch ID:** `3`, written at [25](#trace-25)
337
+
338
+ **Key:** `"00000000-00bd-7000-8002-f1e717eaecec"`
339
+
340
+ **Value:**
341
+
342
+ ```js
343
+ {
344
+ "id": "00000000-00bd-7000-8002-f1e717eaecec",
345
+ "meta": {},
346
+ "status": "starting",
347
+ "failedStartAttempts": 5,
348
+ "identity": "ghcr.io/org/otherworker",
349
+ "image": "ghcr.io/org/otherworker:v1",
350
+ "serviceAccountId": "00000000-0079-7000-8001-e1a3d3a6a8a8",
351
+ "apiKeyId": "00000000-008b-7000-8002-2bb5e5b8baba"
352
+ }
353
+ ```
354
+
355
+ ### <a id="trace-25"></a> 25. 💾 write [21](#trace-21), [22](#trace-22), [24](#trace-24)
356
+
357
+ ### <a id="trace-26"></a> 26. ✅ workerManager.startWorker
358
+
359
+ **Args:**
360
+
361
+ `"test"`
362
+
363
+ `"00000000-00bd-7000-8002-f1e717eaecec"`
364
+
365
+ ### <a id="trace-27"></a> 27. 🔓 released, locked at [17](#trace-17)
366
+
367
+ **Keys:**
368
+
369
+ `"worker-image:test:ghcr.io/org/otherworker"`
370
+
371
+ ### <a id="trace-28"></a> 28. â„šī¸ info
372
+
373
+ `creating worker registration "00000000-00cf-7000-8003-3bf929fcfefe" for unit worker "worker2" in project "test"`
374
+
375
+ **Data:**
376
+
377
+ ```js
378
+ {
379
+ "service": "WorkerService",
380
+ "projectId": "test",
381
+ "registrationId": "00000000-00cf-7000-8003-3bf929fcfefe",
382
+ "unitWorkerName": "worker2",
383
+ "workerId": "00000000-00bd-7000-8002-f1e717eaecec",
384
+ "image": "ghcr.io/org/otherworker:v1"
385
+ }
386
+ ```
387
+
388
+ ### <a id="trace-29"></a> 29. 💾 putItem
389
+
390
+ **Collection:** `worker-registrations:test`
391
+
392
+ **Batch ID:** `1`, written at [31](#trace-31)
393
+
394
+ **Key:** `"00000000-00cf-7000-8003-3bf929fcfefe"`
395
+
396
+ **Value:**
397
+
398
+ ```js
399
+ {
400
+ "id": "00000000-00cf-7000-8003-3bf929fcfefe",
401
+ "meta": {},
402
+ "image": "ghcr.io/org/otherworker:v1",
403
+ "params": {},
404
+ "instanceId": "test",
405
+ "workerId": "00000000-00bd-7000-8002-f1e717eaecec"
406
+ }
407
+ ```
408
+
409
+ ### <a id="trace-30"></a> 30. 💾 put
410
+
411
+ **Collection:** `worker-registration-index:test:00000000-00bd-7000-8002-f1e717eaecec`
412
+
413
+ **Key:** `"00000000-00cf-7000-8003-3bf929fcfefe"`
414
+
415
+ **Value:**
416
+
417
+ `""`
418
+
419
+ ### <a id="trace-31"></a> 31. 💾 write [15](#trace-15), [29](#trace-29)
420
+
421
+ ### <a id="trace-32"></a> 32. 🔓 released, locked at [1](#trace-1)
422
+
423
+ **Keys:**
424
+
425
+ `"worker-image:test:ghcr.io/org/worker:v1"`
426
+
427
+ `"worker-image:test:ghcr.io/org/otherworker:v1"`
@@ -0,0 +1,217 @@
1
+ ## act
2
+
3
+ ### <a id="trace-1"></a> 1. 🔒 locked, released at [18](#trace-18)
4
+
5
+ **Keys:**
6
+
7
+ `"worker-image:test:ghcr.io/org/worker:v1"`
8
+
9
+ ### <a id="trace-2"></a> 2. 📖 getManyRecord
10
+
11
+ **Collection:** `worker-registrations:test`
12
+
13
+ **Keys:**
14
+
15
+ `"nonexistent-registration-id"`
16
+
17
+ **Result:** `{}`
18
+
19
+ ### <a id="trace-3"></a> 3. 🔒 locked, released at [13](#trace-13)
20
+
21
+ **Keys:**
22
+
23
+ `"worker-image:test:ghcr.io/org/worker"`
24
+
25
+ ### <a id="trace-4"></a> 4. 📖 getAllItems
26
+
27
+ **Collection:** `workers:test`
28
+
29
+ **Result:** `[]`
30
+
31
+ ### <a id="trace-5"></a> 5. â„šī¸ info
32
+
33
+ `creating new worker for image "ghcr.io/org/worker:v1" with identity "ghcr.io/org/worker" in project "test"`
34
+
35
+ **Data:**
36
+
37
+ ```js
38
+ {
39
+ "service": "WorkerService",
40
+ "projectId": "test",
41
+ "image": "ghcr.io/org/worker:v1",
42
+ "identity": "ghcr.io/org/worker"
43
+ }
44
+ ```
45
+
46
+ ### <a id="trace-6"></a> 6. â„šī¸ info
47
+
48
+ `creating service account "00000000-0011-7000-8000-413b6b3e3f40" for worker identity "ghcr.io/org/worker" in project "test"`
49
+
50
+ **Data:**
51
+
52
+ ```js
53
+ {
54
+ "service": "WorkerService",
55
+ "projectId": "test",
56
+ "serviceAccountId": "00000000-0011-7000-8000-413b6b3e3f40",
57
+ "identity": "ghcr.io/org/worker"
58
+ }
59
+ ```
60
+
61
+ ### <a id="trace-7"></a> 7. 💾 putItem
62
+
63
+ **Collection:** `service-accounts:test`
64
+
65
+ **Batch ID:** `2`, written at [11](#trace-11)
66
+
67
+ **Key:** `"00000000-0011-7000-8000-413b6b3e3f40"`
68
+
69
+ **Value:**
70
+
71
+ ```js
72
+ {
73
+ "id": "00000000-0011-7000-8000-413b6b3e3f40",
74
+ "meta": {}
75
+ }
76
+ ```
77
+
78
+ ### <a id="trace-8"></a> 8. 💾 putItem
79
+
80
+ **Collection:** `api-keys:test`
81
+
82
+ **Batch ID:** `2`, written at [11](#trace-11)
83
+
84
+ **Key:** `"00000000-0023-7000-8000-8b4d7d505152"`
85
+
86
+ **Value:**
87
+
88
+ ```js
89
+ {
90
+ "id": "00000000-0023-7000-8000-8b4d7d505152",
91
+ "meta": {},
92
+ "token": "55575f585a5f6260655e8d5f8f626364666e67696e716f746d9c6e9e71727375",
93
+ "scopes": [
94
+ {
95
+ "type": "service-account",
96
+ "actions": [
97
+ "full"
98
+ ],
99
+ "serviceAccountIds": [
100
+ "00000000-0011-7000-8000-413b6b3e3f40"
101
+ ]
102
+ }
103
+ ]
104
+ }
105
+ ```
106
+
107
+ ### <a id="trace-9"></a> 9. â„šī¸ info
108
+
109
+ `creating worker "00000000-0055-7000-8001-517faf828384" for image "ghcr.io/org/worker:v1" in project "test"`
110
+
111
+ **Data:**
112
+
113
+ ```js
114
+ {
115
+ "service": "WorkerService",
116
+ "projectId": "test",
117
+ "workerId": "00000000-0055-7000-8001-517faf828384",
118
+ "image": "ghcr.io/org/worker:v1",
119
+ "identity": "ghcr.io/org/worker",
120
+ "serviceAccountId": "00000000-0011-7000-8000-413b6b3e3f40"
121
+ }
122
+ ```
123
+
124
+ ### <a id="trace-10"></a> 10. 💾 putItem
125
+
126
+ **Collection:** `workers:test`
127
+
128
+ **Batch ID:** `2`, written at [11](#trace-11)
129
+
130
+ **Key:** `"00000000-0055-7000-8001-517faf828384"`
131
+
132
+ **Value:**
133
+
134
+ ```js
135
+ {
136
+ "id": "00000000-0055-7000-8001-517faf828384",
137
+ "meta": {},
138
+ "status": "starting",
139
+ "failedStartAttempts": 5,
140
+ "identity": "ghcr.io/org/worker",
141
+ "image": "ghcr.io/org/worker:v1",
142
+ "serviceAccountId": "00000000-0011-7000-8000-413b6b3e3f40",
143
+ "apiKeyId": "00000000-0023-7000-8000-8b4d7d505152"
144
+ }
145
+ ```
146
+
147
+ ### <a id="trace-11"></a> 11. 💾 write [7](#trace-7), [8](#trace-8), [10](#trace-10)
148
+
149
+ ### <a id="trace-12"></a> 12. ✅ workerManager.startWorker
150
+
151
+ **Args:**
152
+
153
+ `"test"`
154
+
155
+ `"00000000-0055-7000-8001-517faf828384"`
156
+
157
+ ### <a id="trace-13"></a> 13. 🔓 released, locked at [3](#trace-3)
158
+
159
+ **Keys:**
160
+
161
+ `"worker-image:test:ghcr.io/org/worker"`
162
+
163
+ ### <a id="trace-14"></a> 14. â„šī¸ info
164
+
165
+ `creating worker registration "00000000-0067-7000-8001-9b91c1949596" for unit worker "worker" in project "test"`
166
+
167
+ **Data:**
168
+
169
+ ```js
170
+ {
171
+ "service": "WorkerService",
172
+ "projectId": "test",
173
+ "registrationId": "00000000-0067-7000-8001-9b91c1949596",
174
+ "unitWorkerName": "worker",
175
+ "workerId": "00000000-0055-7000-8001-517faf828384",
176
+ "image": "ghcr.io/org/worker:v1"
177
+ }
178
+ ```
179
+
180
+ ### <a id="trace-15"></a> 15. 💾 putItem
181
+
182
+ **Collection:** `worker-registrations:test`
183
+
184
+ **Batch ID:** `1`, written at [17](#trace-17)
185
+
186
+ **Key:** `"00000000-0067-7000-8001-9b91c1949596"`
187
+
188
+ **Value:**
189
+
190
+ ```js
191
+ {
192
+ "id": "00000000-0067-7000-8001-9b91c1949596",
193
+ "meta": {},
194
+ "image": "ghcr.io/org/worker:v1",
195
+ "params": {},
196
+ "instanceId": "test",
197
+ "workerId": "00000000-0055-7000-8001-517faf828384"
198
+ }
199
+ ```
200
+
201
+ ### <a id="trace-16"></a> 16. 💾 put
202
+
203
+ **Collection:** `worker-registration-index:test:00000000-0055-7000-8001-517faf828384`
204
+
205
+ **Key:** `"00000000-0067-7000-8001-9b91c1949596"`
206
+
207
+ **Value:**
208
+
209
+ `""`
210
+
211
+ ### <a id="trace-17"></a> 17. 💾 write [15](#trace-15)
212
+
213
+ ### <a id="trace-18"></a> 18. 🔓 released, locked at [1](#trace-1)
214
+
215
+ **Keys:**
216
+
217
+ `"worker-image:test:ghcr.io/org/worker:v1"`