@kumori/aurora-backend-handler 1.1.53 → 1.1.55
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.
|
@@ -243,8 +243,8 @@ const createRevision = (
|
|
|
243
243
|
cost: 0,
|
|
244
244
|
},
|
|
245
245
|
status: handleRevisionStatus(eventData.status),
|
|
246
|
-
errorCode: eventData.status?.error ? eventData.status.error.code : containerError?.code
|
|
247
|
-
errorMsg: eventData.status?.error ? eventData.status.error.message : containerError?.message
|
|
246
|
+
errorCode: eventData.status?.error ? eventData.status.error.code : containerError?.code === "CrashLoopBackOff" ? containerError.code : "",
|
|
247
|
+
errorMsg: eventData.status?.error ? eventData.status.error.message : containerError?.code === "CrashLoopBackOff" ? containerError.message : "",
|
|
248
248
|
createdAt:
|
|
249
249
|
(eventData.status && eventData.status.runtime?.status?.createdAt) || "",
|
|
250
250
|
};
|
|
@@ -137,13 +137,20 @@ const determineFinalStatusAndError = (
|
|
|
137
137
|
const bestCandidateTs = Math.max(incomingTs, revisionTs);
|
|
138
138
|
const isNewer = !existingService || bestCandidateTs > currentTs;
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
const removingStatus = {
|
|
141
|
+
code: "REMOVING_SERVICE",
|
|
142
|
+
message: `Service ${entityId} is being removed`,
|
|
143
|
+
args: [],
|
|
144
|
+
timestamp: new Date().toISOString(),
|
|
145
|
+
};
|
|
142
146
|
|
|
143
|
-
if (existingService?.status?.code === "REMOVING_SERVICE") {
|
|
144
|
-
return { finalStatus, finalError, pendingErrorIndex: -1 };
|
|
147
|
+
if (eventData.meta?.deleted || existingService?.status?.code === "REMOVING_SERVICE") {
|
|
148
|
+
return { finalStatus: removingStatus, finalError: undefined, pendingErrorIndex: -1 };
|
|
145
149
|
}
|
|
146
150
|
|
|
151
|
+
let finalStatus = existingService?.status;
|
|
152
|
+
let finalError = existingService?.error;
|
|
153
|
+
|
|
147
154
|
if (isNewer) {
|
|
148
155
|
const revisionHasError = !!currentRevision?.errorCode;
|
|
149
156
|
finalStatus = (revisionHasError || (currentRevision?.status && revisionTs >= incomingTs))
|