@kumori/aurora-backend-handler 1.0.83 → 1.0.85
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/service-helper.ts +17 -23
- package/package.json +1 -1
- package/websocket-manager.ts +5 -3
|
@@ -210,30 +210,24 @@ export const handleServiceEvent = ({
|
|
|
210
210
|
updatedPendingRevisionErrors.splice(pendingErrorIndex, 1);
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
const currentRevisionId =
|
|
214
|
-
eventData.status.revision ||
|
|
215
|
-
(serviceRevisions.length > 0
|
|
216
|
-
? Math.max(...serviceRevisions.map((r) => Number(r.id))).toString()
|
|
217
|
-
: "");
|
|
218
|
-
|
|
219
213
|
const baseServiceData = {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
214
|
+
tenant: serviceTenantId,
|
|
215
|
+
account: eventData.spec.metadata.targetAccount || pathParts.account,
|
|
216
|
+
environment:
|
|
217
|
+
eventData.spec.metadata.targetEnvironment || pathParts.environment,
|
|
218
|
+
name: entityId,
|
|
219
|
+
revisions: [...serviceRevisions].sort(
|
|
220
|
+
(a, b) => Number(b.id) - Number(a.id),
|
|
221
|
+
),
|
|
222
|
+
status: finalStatus || eventData.status.state,
|
|
223
|
+
error: finalError,
|
|
224
|
+
role: serviceRoles.length > 0 ? serviceRoles : existingService?.role || [],
|
|
225
|
+
usage: serviceUsage,
|
|
226
|
+
lastDeployed: eventData.spec.ctstamp,
|
|
227
|
+
project: projectLabel || existingService?.project || "",
|
|
228
|
+
currentRevision: String(eventData.spec.ctstamp || eventData.status.revision || ""),
|
|
229
|
+
startedAt: currentRevision?.createdAt || existingService?.startedAt || "",
|
|
230
|
+
};
|
|
237
231
|
|
|
238
232
|
let newService: Service;
|
|
239
233
|
|
package/package.json
CHANGED
package/websocket-manager.ts
CHANGED
|
@@ -706,6 +706,8 @@ const handleEvent = async (message: WSMessage) => {
|
|
|
706
706
|
if (
|
|
707
707
|
revisionResult.serviceDeploymentErrorEvent &&
|
|
708
708
|
resolvedRevisionService &&
|
|
709
|
+
resolvedRevisionService.error &&
|
|
710
|
+
resolvedRevisionService.status?.code !== "REMOVING_SERVICE" &&
|
|
709
711
|
String(entityId) ===
|
|
710
712
|
String(revisionResult.updatedService?.currentRevision)
|
|
711
713
|
) {
|
|
@@ -1917,13 +1919,13 @@ const resolveServiceStatus = (service: Service): Service => {
|
|
|
1917
1919
|
return service;
|
|
1918
1920
|
}
|
|
1919
1921
|
|
|
1920
|
-
if (service.error) {
|
|
1921
|
-
return service;
|
|
1922
|
-
}
|
|
1923
1922
|
const revisionKey = `${service.tenant}/${service.name}-${service.currentRevision}`;
|
|
1924
1923
|
const currentRevision = revisionsMap.get(revisionKey);
|
|
1925
1924
|
|
|
1926
1925
|
if (!currentRevision) {
|
|
1926
|
+
if (service.error) {
|
|
1927
|
+
return service;
|
|
1928
|
+
}
|
|
1927
1929
|
return service;
|
|
1928
1930
|
}
|
|
1929
1931
|
|