@kumori/aurora-backend-handler 1.1.107 → 1.1.109
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.
- package/helpers/revision-helper.ts +17 -9
- package/package.json +1 -1
|
@@ -224,7 +224,7 @@ const createRevision = (
|
|
|
224
224
|
cpu: { max: eventData.spec.intensives?.vcpu / 1000 || 0, min: 0 },
|
|
225
225
|
memory: { max: eventData.spec.intensives?.ram / 1000 || 0, min: 0 },
|
|
226
226
|
storage: {
|
|
227
|
-
max: eventData.spec.intensives?.
|
|
227
|
+
max: (eventData.spec.intensives?.volatile_disk / 1000 || 0) + (eventData.spec.intensives?.nrpersistent_disk / 1000 || 0) + (eventData.spec.intensives?.persistent_disk / 1000 || 0),
|
|
228
228
|
min: 0,
|
|
229
229
|
},
|
|
230
230
|
volatileStorage: {
|
|
@@ -281,13 +281,21 @@ const updateServiceWithRevision = (
|
|
|
281
281
|
String(rev.id) === String(entityId) ? newRevision : rev,
|
|
282
282
|
);
|
|
283
283
|
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
284
|
+
const isCurrentRevision =
|
|
285
|
+
String(existingService.currentRevision) === String(entityId);
|
|
286
|
+
|
|
287
|
+
const updatedService: Service = isCurrentRevision
|
|
288
|
+
? {
|
|
289
|
+
...existingService,
|
|
290
|
+
revisions: updatedRevisions,
|
|
291
|
+
role: roles.length > 0 ? roles : existingService.role,
|
|
292
|
+
usage: newRevision.usage,
|
|
293
|
+
startedAt: newRevision.createdAt || existingService.startedAt,
|
|
294
|
+
}
|
|
295
|
+
: {
|
|
296
|
+
...existingService,
|
|
297
|
+
revisions: updatedRevisions,
|
|
298
|
+
};
|
|
291
299
|
|
|
292
300
|
const deploymentErrorEvent = eventData.status?.error ? updatedService : null;
|
|
293
301
|
|
|
@@ -717,7 +725,7 @@ export const processRevisionData = (
|
|
|
717
725
|
cpu: { max: revisionData.intensives?.vcpu / 1000 || 0, min: 0 },
|
|
718
726
|
memory: { max: revisionData.intensives?.ram / 1000 || 0, min: 0 },
|
|
719
727
|
storage: {
|
|
720
|
-
max: revisionData.intensives?.
|
|
728
|
+
max: (revisionData.intensives?.volatile_disk / 1000 || 0) + (revisionData.intensives?.nrpersistent_disk / 1000 || 0) + (revisionData.intensives?.persistent_disk / 1000 || 0),
|
|
721
729
|
min: 0,
|
|
722
730
|
},
|
|
723
731
|
volatileStorage: {
|