-
-
Notifications
You must be signed in to change notification settings - Fork 713
Fixes for internal error reattempts #1436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
75d292b
ad5fb5f
b66b46c
3c60f3f
d2d6f99
fefd719
f371d21
5695f57
3e78086
6811b40
ad94b5b
e0c8fe2
e54aa85
0324dc1
1a75c33
98b4b1f
c444f2d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -24,6 +24,7 @@ import { Redis } from "ioredis"; | |||||||||||||
import { createAdapter } from "@socket.io/redis-adapter"; | ||||||||||||||
import { CrashTaskRunService } from "./services/crashTaskRun.server"; | ||||||||||||||
import { CreateTaskRunAttemptService } from "./services/createTaskRunAttempt.server"; | ||||||||||||||
import { UpdateFatalRunErrorService } from "./services/updateFatalRunError.server"; | ||||||||||||||
|
||||||||||||||
export const socketIo = singleton("socketIo", initalizeIoServer); | ||||||||||||||
|
||||||||||||||
|
@@ -123,12 +124,13 @@ function createCoordinatorNamespace(io: Server) { | |||||||||||||
await resumeAttempt.call(message); | ||||||||||||||
}, | ||||||||||||||
TASK_RUN_COMPLETED: async (message) => { | ||||||||||||||
const completeAttempt = new CompleteAttemptService(); | ||||||||||||||
const completeAttempt = new CompleteAttemptService({ | ||||||||||||||
supportsRetryCheckpoints: message.version === "v1", | ||||||||||||||
}); | ||||||||||||||
Comment on lines
+127
to
+129
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Future-proof the version check in The current check Apply this diff to improve the version check: - supportsRetryCheckpoints: message.version === "v1",
+ supportsRetryCheckpoints: message.version !== "v0", 📝 Committable suggestion
Suggested change
|
||||||||||||||
await completeAttempt.call({ | ||||||||||||||
completion: message.completion, | ||||||||||||||
execution: message.execution, | ||||||||||||||
checkpoint: message.checkpoint, | ||||||||||||||
supportsRetryCheckpoints: message.version === "v1", | ||||||||||||||
}); | ||||||||||||||
}, | ||||||||||||||
TASK_RUN_FAILED_TO_RUN: async (message) => { | ||||||||||||||
|
@@ -301,11 +303,13 @@ function createProviderNamespace(io: Server) { | |||||||||||||
handlers: { | ||||||||||||||
WORKER_CRASHED: async (message) => { | ||||||||||||||
try { | ||||||||||||||
const service = new CrashTaskRunService(); | ||||||||||||||
|
||||||||||||||
await service.call(message.runId, { | ||||||||||||||
...message, | ||||||||||||||
}); | ||||||||||||||
if (message.overrideCompletion) { | ||||||||||||||
const updateErrorService = new UpdateFatalRunErrorService(); | ||||||||||||||
await updateErrorService.call(message.runId, { ...message }); | ||||||||||||||
} else { | ||||||||||||||
const crashRunService = new CrashTaskRunService(); | ||||||||||||||
await crashRunService.call(message.runId, { ...message }); | ||||||||||||||
} | ||||||||||||||
nicktrn marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
} catch (error) { | ||||||||||||||
logger.error("Error while handling crashed worker", { error }); | ||||||||||||||
} | ||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.