@highstate/backend 0.9.15 → 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 (187) 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-Y7DXREVO.js +1745 -0
  6. package/dist/chunk-Y7DXREVO.js.map +1 -0
  7. package/dist/highstate.manifest.json +4 -4
  8. package/dist/index.js +7227 -2501
  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 +76 -185
  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 -98
  17. package/dist/shared/index.js.map +1 -1
  18. package/package.json +31 -10
  19. package/src/artifact/abstractions.ts +46 -0
  20. package/src/artifact/encryption.ts +109 -0
  21. package/src/artifact/factory.ts +36 -0
  22. package/src/artifact/index.ts +3 -0
  23. package/src/artifact/local.ts +138 -0
  24. package/src/business/__traces__/secret/update-instance-secrets/create-and-delete-secrets-simultaneously.md +356 -0
  25. package/src/business/__traces__/secret/update-instance-secrets/create-new-secrets-for-instance.md +274 -0
  26. package/src/business/__traces__/secret/update-instance-secrets/delete-existing-secrets.md +223 -0
  27. package/src/business/__traces__/secret/update-instance-secrets/no-op-when-no-changes.md +147 -0
  28. package/src/business/__traces__/secret/update-instance-secrets/update-existing-secrets.md +280 -0
  29. package/src/business/__traces__/worker/update-unit-registrations/add-new-unit-registration-when-other-exists.md +360 -0
  30. package/src/business/__traces__/worker/update-unit-registrations/add-new-unit-registration.md +215 -0
  31. package/src/business/__traces__/worker/update-unit-registrations/create-multiple-workers-with-different-identities.md +427 -0
  32. package/src/business/__traces__/worker/update-unit-registrations/handle-nonexistent-registration-id-gracefully.md +217 -0
  33. package/src/business/__traces__/worker/update-unit-registrations/no-op-when-no-changes.md +132 -0
  34. package/src/business/__traces__/worker/update-unit-registrations/recreate-worker-when-image-changes.md +454 -0
  35. package/src/business/__traces__/worker/update-unit-registrations/recreate-worker-when-image-version-changes.md +426 -0
  36. package/src/business/__traces__/worker/update-unit-registrations/recreate-worker-with-same-identity-reuses-service-account.md +372 -0
  37. package/src/business/__traces__/worker/update-unit-registrations/remove-one-of-multiple-unit-registrations.md +383 -0
  38. package/src/business/__traces__/worker/update-unit-registrations/remove-unit-registration.md +245 -0
  39. package/src/business/__traces__/worker/update-unit-registrations/update-existing-unit-registration-when-params-change.md +174 -0
  40. package/src/business/__traces__/worker/update-unit-registrations/update-params-and-image-simultaneously.md +432 -0
  41. package/src/business/__traces__/worker/update-unit-registrations/worker-with-multiple-registrations-not-deleted-when-one-removed.md +220 -0
  42. package/src/business/api-key.ts +65 -0
  43. package/src/business/artifact.ts +289 -0
  44. package/src/business/backend-unlock.ts +10 -0
  45. package/src/business/index.ts +10 -0
  46. package/src/business/instance-lock.ts +125 -0
  47. package/src/business/instance-state.ts +434 -0
  48. package/src/business/operation.ts +251 -0
  49. package/src/business/project-unlock.ts +260 -0
  50. package/src/business/project.ts +299 -0
  51. package/src/business/secret.test.ts +178 -0
  52. package/src/business/secret.ts +281 -0
  53. package/src/business/worker.test.ts +614 -0
  54. package/src/business/worker.ts +398 -0
  55. package/src/common/clock.ts +18 -0
  56. package/src/common/index.ts +5 -1
  57. package/src/common/performance.ts +44 -0
  58. package/src/common/random.ts +68 -0
  59. package/src/common/test/index.ts +2 -0
  60. package/src/common/test/render.ts +98 -0
  61. package/src/common/test/tracer.ts +359 -0
  62. package/src/common/tree.ts +33 -0
  63. package/src/common/utils.ts +40 -1
  64. package/src/config.ts +19 -11
  65. package/src/hotstate/abstractions.ts +48 -0
  66. package/src/hotstate/factory.ts +17 -0
  67. package/src/{secret → hotstate}/index.ts +1 -0
  68. package/src/hotstate/manager.ts +192 -0
  69. package/src/hotstate/memory.ts +100 -0
  70. package/src/hotstate/validation.ts +100 -0
  71. package/src/index.ts +2 -1
  72. package/src/library/abstractions.ts +24 -28
  73. package/src/library/factory.ts +2 -2
  74. package/src/library/local.ts +91 -111
  75. package/src/library/worker/evaluator.ts +36 -73
  76. package/src/library/worker/loader.lite.ts +54 -0
  77. package/src/library/worker/main.ts +15 -66
  78. package/src/library/worker/protocol.ts +6 -33
  79. package/src/lock/abstractions.ts +6 -0
  80. package/src/lock/factory.ts +15 -0
  81. package/src/lock/index.ts +4 -0
  82. package/src/lock/manager.ts +97 -0
  83. package/src/lock/memory.ts +19 -0
  84. package/src/lock/test.ts +108 -0
  85. package/src/orchestrator/manager.ts +118 -90
  86. package/src/orchestrator/operation-workset.ts +181 -93
  87. package/src/orchestrator/operation.ts +1021 -283
  88. package/src/project/abstractions.ts +27 -38
  89. package/src/project/evaluation.ts +248 -0
  90. package/src/project/factory.ts +1 -1
  91. package/src/project/index.ts +1 -2
  92. package/src/project/local.ts +107 -103
  93. package/src/pubsub/abstractions.ts +13 -0
  94. package/src/pubsub/factory.ts +19 -0
  95. package/src/{workspace → pubsub}/index.ts +1 -0
  96. package/src/pubsub/local.ts +36 -0
  97. package/src/pubsub/manager.ts +108 -0
  98. package/src/pubsub/validation.ts +33 -0
  99. package/src/runner/abstractions.ts +155 -68
  100. package/src/runner/artifact-env.ts +160 -0
  101. package/src/runner/factory.ts +20 -5
  102. package/src/runner/force-abort.ts +117 -0
  103. package/src/runner/local.ts +292 -372
  104. package/src/{common → runner}/pulumi.ts +89 -37
  105. package/src/services.ts +251 -40
  106. package/src/shared/index.ts +3 -11
  107. package/src/shared/models/backend/index.ts +3 -0
  108. package/src/shared/{library.ts → models/backend/library.ts} +4 -4
  109. package/src/shared/models/backend/project.ts +82 -0
  110. package/src/shared/models/backend/unlock-method.ts +20 -0
  111. package/src/shared/models/base.ts +68 -0
  112. package/src/shared/models/errors.ts +5 -0
  113. package/src/shared/models/index.ts +4 -0
  114. package/src/shared/models/project/api-key.ts +65 -0
  115. package/src/shared/models/project/artifact.ts +83 -0
  116. package/src/shared/models/project/index.ts +13 -0
  117. package/src/shared/models/project/lock.ts +91 -0
  118. package/src/shared/models/project/model.ts +14 -0
  119. package/src/shared/{operation.ts → models/project/operation.ts} +29 -8
  120. package/src/shared/models/project/page.ts +57 -0
  121. package/src/shared/models/project/secret.ts +98 -0
  122. package/src/shared/models/project/service-account.ts +22 -0
  123. package/src/shared/models/project/state.ts +449 -0
  124. package/src/shared/models/project/terminal.ts +98 -0
  125. package/src/shared/models/project/trigger.ts +56 -0
  126. package/src/shared/models/project/unlock-method.ts +38 -0
  127. package/src/shared/models/project/worker.ts +107 -0
  128. package/src/shared/resolvers/graph-resolver.ts +61 -18
  129. package/src/shared/resolvers/index.ts +5 -0
  130. package/src/shared/resolvers/input-hash.ts +53 -15
  131. package/src/shared/resolvers/input.ts +47 -13
  132. package/src/shared/resolvers/registry.ts +3 -2
  133. package/src/shared/resolvers/state.ts +2 -2
  134. package/src/shared/resolvers/validation.ts +82 -25
  135. package/src/shared/utils/args.ts +25 -0
  136. package/src/shared/{async-batcher.ts → utils/async-batcher.ts} +13 -1
  137. package/src/shared/utils/hash.ts +6 -0
  138. package/src/shared/utils/index.ts +4 -0
  139. package/src/shared/utils/promise-tracker.ts +23 -0
  140. package/src/state/abstractions.ts +199 -131
  141. package/src/state/encryption.ts +98 -0
  142. package/src/state/factory.ts +3 -5
  143. package/src/state/index.ts +4 -0
  144. package/src/state/keyring.ts +22 -0
  145. package/src/state/local/backend.ts +106 -0
  146. package/src/state/local/collection.ts +361 -0
  147. package/src/state/local/index.ts +2 -0
  148. package/src/state/manager.ts +875 -18
  149. package/src/state/memory/backend.ts +70 -0
  150. package/src/state/memory/collection.ts +270 -0
  151. package/src/state/memory/index.ts +2 -0
  152. package/src/state/repository/index.ts +2 -0
  153. package/src/state/repository/repository.index.ts +193 -0
  154. package/src/state/repository/repository.ts +507 -0
  155. package/src/state/test.ts +457 -0
  156. package/src/terminal/{shared.ts → abstractions.ts} +3 -3
  157. package/src/terminal/docker.ts +18 -14
  158. package/src/terminal/factory.ts +3 -3
  159. package/src/terminal/index.ts +1 -1
  160. package/src/terminal/manager.ts +131 -79
  161. package/src/terminal/run.sh.ts +21 -11
  162. package/src/unlock/abstractions.ts +49 -0
  163. package/src/unlock/index.ts +2 -0
  164. package/src/unlock/memory.ts +32 -0
  165. package/src/worker/abstractions.ts +42 -0
  166. package/src/worker/docker.ts +83 -0
  167. package/src/worker/factory.ts +20 -0
  168. package/src/worker/index.ts +3 -0
  169. package/src/worker/manager.ts +167 -0
  170. package/dist/chunk-KTGKNSKM.js +0 -979
  171. package/dist/chunk-KTGKNSKM.js.map +0 -1
  172. package/dist/chunk-WXDYCRTT.js +0 -234
  173. package/dist/chunk-WXDYCRTT.js.map +0 -1
  174. package/src/library/worker/loader.ts +0 -114
  175. package/src/preferences/shared.ts +0 -1
  176. package/src/project/lock.ts +0 -39
  177. package/src/project/manager.ts +0 -433
  178. package/src/secret/abstractions.ts +0 -59
  179. package/src/secret/factory.ts +0 -22
  180. package/src/secret/local.ts +0 -152
  181. package/src/shared/project.ts +0 -62
  182. package/src/shared/state.ts +0 -247
  183. package/src/shared/terminal.ts +0 -14
  184. package/src/state/local.ts +0 -612
  185. package/src/workspace/abstractions.ts +0 -41
  186. package/src/workspace/factory.ts +0 -14
  187. package/src/workspace/local.ts +0 -54
@@ -0,0 +1,215 @@
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
+ **Result:** `{}`
16
+
17
+ ### <a id="trace-3"></a> 3. 🔒 locked, released at [13](#trace-13)
18
+
19
+ **Keys:**
20
+
21
+ `"worker-image:test:ghcr.io/org/worker"`
22
+
23
+ ### <a id="trace-4"></a> 4. 📖 getAllItems
24
+
25
+ **Collection:** `workers:test`
26
+
27
+ **Result:** `[]`
28
+
29
+ ### <a id="trace-5"></a> 5. â„šī¸ info
30
+
31
+ `creating new worker for image "ghcr.io/org/worker:v1" with identity "ghcr.io/org/worker" in project "test"`
32
+
33
+ **Data:**
34
+
35
+ ```js
36
+ {
37
+ "service": "WorkerService",
38
+ "projectId": "test",
39
+ "image": "ghcr.io/org/worker:v1",
40
+ "identity": "ghcr.io/org/worker"
41
+ }
42
+ ```
43
+
44
+ ### <a id="trace-6"></a> 6. â„šī¸ info
45
+
46
+ `creating service account "00000000-0011-7000-8000-413b6b3d3f41" for worker identity "ghcr.io/org/worker" in project "test"`
47
+
48
+ **Data:**
49
+
50
+ ```js
51
+ {
52
+ "service": "WorkerService",
53
+ "projectId": "test",
54
+ "serviceAccountId": "00000000-0011-7000-8000-413b6b3d3f41",
55
+ "identity": "ghcr.io/org/worker"
56
+ }
57
+ ```
58
+
59
+ ### <a id="trace-7"></a> 7. 💾 putItem
60
+
61
+ **Collection:** `service-accounts:test`
62
+
63
+ **Batch ID:** `2`, written at [11](#trace-11)
64
+
65
+ **Key:** `"00000000-0011-7000-8000-413b6b3d3f41"`
66
+
67
+ **Value:**
68
+
69
+ ```js
70
+ {
71
+ "id": "00000000-0011-7000-8000-413b6b3d3f41",
72
+ "meta": {}
73
+ }
74
+ ```
75
+
76
+ ### <a id="trace-8"></a> 8. 💾 putItem
77
+
78
+ **Collection:** `api-keys:test`
79
+
80
+ **Batch ID:** `2`, written at [11](#trace-11)
81
+
82
+ **Key:** `"00000000-0023-7000-8000-8b4d7d4f5153"`
83
+
84
+ **Value:**
85
+
86
+ ```js
87
+ {
88
+ "id": "00000000-0023-7000-8000-8b4d7d4f5153",
89
+ "meta": {},
90
+ "token": "55575f585a5f6260655e8d5f8f6163656d66686d706e736c9b6d9d6f71737b74",
91
+ "scopes": [
92
+ {
93
+ "type": "service-account",
94
+ "actions": [
95
+ "full"
96
+ ],
97
+ "serviceAccountIds": [
98
+ "00000000-0011-7000-8000-413b6b3d3f41"
99
+ ]
100
+ }
101
+ ]
102
+ }
103
+ ```
104
+
105
+ ### <a id="trace-9"></a> 9. â„šī¸ info
106
+
107
+ `creating worker "00000000-0055-7000-8001-517faf818385" for image "ghcr.io/org/worker:v1" in project "test"`
108
+
109
+ **Data:**
110
+
111
+ ```js
112
+ {
113
+ "service": "WorkerService",
114
+ "projectId": "test",
115
+ "workerId": "00000000-0055-7000-8001-517faf818385",
116
+ "image": "ghcr.io/org/worker:v1",
117
+ "identity": "ghcr.io/org/worker",
118
+ "serviceAccountId": "00000000-0011-7000-8000-413b6b3d3f41"
119
+ }
120
+ ```
121
+
122
+ ### <a id="trace-10"></a> 10. 💾 putItem
123
+
124
+ **Collection:** `workers:test`
125
+
126
+ **Batch ID:** `2`, written at [11](#trace-11)
127
+
128
+ **Key:** `"00000000-0055-7000-8001-517faf818385"`
129
+
130
+ **Value:**
131
+
132
+ ```js
133
+ {
134
+ "id": "00000000-0055-7000-8001-517faf818385",
135
+ "meta": {},
136
+ "status": "starting",
137
+ "failedStartAttempts": 5,
138
+ "identity": "ghcr.io/org/worker",
139
+ "image": "ghcr.io/org/worker:v1",
140
+ "serviceAccountId": "00000000-0011-7000-8000-413b6b3d3f41",
141
+ "apiKeyId": "00000000-0023-7000-8000-8b4d7d4f5153"
142
+ }
143
+ ```
144
+
145
+ ### <a id="trace-11"></a> 11. 💾 write [7](#trace-7), [8](#trace-8), [10](#trace-10)
146
+
147
+ ### <a id="trace-12"></a> 12. ✅ workerManager.startWorker
148
+
149
+ **Args:**
150
+
151
+ `"test"`
152
+
153
+ `"00000000-0055-7000-8001-517faf818385"`
154
+
155
+ ### <a id="trace-13"></a> 13. 🔓 released, locked at [3](#trace-3)
156
+
157
+ **Keys:**
158
+
159
+ `"worker-image:test:ghcr.io/org/worker"`
160
+
161
+ ### <a id="trace-14"></a> 14. â„šī¸ info
162
+
163
+ `creating worker registration "00000000-0067-7000-8001-9b91c1939597" for unit worker "worker" in project "test"`
164
+
165
+ **Data:**
166
+
167
+ ```js
168
+ {
169
+ "service": "WorkerService",
170
+ "projectId": "test",
171
+ "registrationId": "00000000-0067-7000-8001-9b91c1939597",
172
+ "unitWorkerName": "worker",
173
+ "workerId": "00000000-0055-7000-8001-517faf818385",
174
+ "image": "ghcr.io/org/worker:v1"
175
+ }
176
+ ```
177
+
178
+ ### <a id="trace-15"></a> 15. 💾 putItem
179
+
180
+ **Collection:** `worker-registrations:test`
181
+
182
+ **Batch ID:** `1`, written at [17](#trace-17)
183
+
184
+ **Key:** `"00000000-0067-7000-8001-9b91c1939597"`
185
+
186
+ **Value:**
187
+
188
+ ```js
189
+ {
190
+ "id": "00000000-0067-7000-8001-9b91c1939597",
191
+ "meta": {},
192
+ "image": "ghcr.io/org/worker:v1",
193
+ "params": {},
194
+ "instanceId": "test",
195
+ "workerId": "00000000-0055-7000-8001-517faf818385"
196
+ }
197
+ ```
198
+
199
+ ### <a id="trace-16"></a> 16. 💾 put
200
+
201
+ **Collection:** `worker-registration-index:test:00000000-0055-7000-8001-517faf818385`
202
+
203
+ **Key:** `"00000000-0067-7000-8001-9b91c1939597"`
204
+
205
+ **Value:**
206
+
207
+ `""`
208
+
209
+ ### <a id="trace-17"></a> 17. 💾 write [15](#trace-15)
210
+
211
+ ### <a id="trace-18"></a> 18. 🔓 released, locked at [1](#trace-1)
212
+
213
+ **Keys:**
214
+
215
+ `"worker-image:test:ghcr.io/org/worker:v1"`
@@ -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"`