@kumori/aurora-backend-handler 1.1.15 → 1.1.16
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.
|
@@ -262,7 +262,7 @@ const updateEnvironmentConsumption = (
|
|
|
262
262
|
|
|
263
263
|
servicesMap.forEach((service, svcId) => {
|
|
264
264
|
if (service.environment === serviceEnvironmentId) {
|
|
265
|
-
const currentRevisionKey = `${svcId}
|
|
265
|
+
const currentRevisionKey = `${svcId}_${service.currentRevision}`;
|
|
266
266
|
const currentRevision = revisionsMap.get(currentRevisionKey);
|
|
267
267
|
if (currentRevision) {
|
|
268
268
|
totalEnvCpu += currentRevision.usage.limit.cpu.max || 0;
|
|
@@ -300,7 +300,7 @@ const updateAccountConsumption = (
|
|
|
300
300
|
|
|
301
301
|
servicesMap.forEach((service, svcId) => {
|
|
302
302
|
if (service.account === serviceAccountId) {
|
|
303
|
-
const currentRevisionKey = `${svcId}
|
|
303
|
+
const currentRevisionKey = `${svcId}_${service.currentRevision}`;
|
|
304
304
|
const currentRevision = revisionsMap.get(currentRevisionKey);
|
|
305
305
|
if (currentRevision) {
|
|
306
306
|
totalAccountCpu += currentRevision.usage.limit.cpu.max || 0;
|
|
@@ -338,7 +338,7 @@ export const handleRevisionEvent = ({
|
|
|
338
338
|
accountsMap,
|
|
339
339
|
}: HandleRevisionEventParams): HandleRevisionEventResult => {
|
|
340
340
|
const serviceId = `${parentParts.tenant}/${parentParts.service}`;
|
|
341
|
-
const revisionKey = `${serviceId}
|
|
341
|
+
const revisionKey = `${serviceId}_${entityId}`;
|
|
342
342
|
const { roles, instances, usedCpu, usedMemory } = processRolesAndInstances(
|
|
343
343
|
eventData,
|
|
344
344
|
serviceId,
|
|
@@ -180,7 +180,7 @@ export const handleServiceEvent = ({
|
|
|
180
180
|
}: HandleServiceEventParams): HandleServiceEventResult => {
|
|
181
181
|
const serviceFullKey = `${parentParts.tenant}/${entityId}`;
|
|
182
182
|
const serviceTenantId = parentParts.tenant;
|
|
183
|
-
const currentRevisionKey = `${serviceFullKey}
|
|
183
|
+
const currentRevisionKey = `${serviceFullKey}_${eventData.status.revision}`;
|
|
184
184
|
const currentRevision = revisionsMap.get(currentRevisionKey);
|
|
185
185
|
|
|
186
186
|
const projectLabel = eventData.meta?.labels?.project;
|
|
@@ -189,7 +189,7 @@ export const handleServiceEvent = ({
|
|
|
189
189
|
|
|
190
190
|
const serviceRevisions: Revision[] = [];
|
|
191
191
|
revisionsMap.forEach((revision, key) => {
|
|
192
|
-
if (key.startsWith(`${serviceFullKey}
|
|
192
|
+
if (key.startsWith(`${serviceFullKey}_`)) {
|
|
193
193
|
serviceRevisions.push(revision);
|
|
194
194
|
}
|
|
195
195
|
});
|
package/package.json
CHANGED
package/websocket-manager.ts
CHANGED
|
@@ -1996,7 +1996,7 @@ const resolveServiceStatus = (service: Service): Service => {
|
|
|
1996
1996
|
return service;
|
|
1997
1997
|
}
|
|
1998
1998
|
|
|
1999
|
-
const revisionKey = `${service.tenant}/${service.name}
|
|
1999
|
+
const revisionKey = `${service.tenant}/${service.name}_${service.currentRevision}`;
|
|
2000
2000
|
const currentRevision = revisionsMap.get(revisionKey);
|
|
2001
2001
|
|
|
2002
2002
|
if (!currentRevision) {
|