File tree 1 file changed +29
-0
lines changed
apps/webapp/app/v3/services 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ export class CreateCheckpointService extends BaseService {
122
122
logger . error ( "CreateCheckpointService: Checkpoint not for most recent child run" , {
123
123
attemptId : attempt . id ,
124
124
runId : attempt . taskRunId ,
125
+ lastChild : lastChildRun . friendlyId ,
126
+ checkpointFor : reason . friendlyId ,
125
127
params,
126
128
} ) ;
127
129
@@ -134,6 +136,33 @@ export class CreateCheckpointService extends BaseService {
134
136
break ;
135
137
}
136
138
case "WAIT_FOR_BATCH" : {
139
+ const lastChildRun = attempt . taskRun . childRuns [ 0 ] ;
140
+
141
+ if ( ! lastChildRun ) {
142
+ logger . warn ( "CreateCheckpointService: No child runs, creating checkpoint regardless" , {
143
+ attemptId : attempt . id ,
144
+ runId : attempt . taskRunId ,
145
+ params,
146
+ } ) ;
147
+
148
+ break ;
149
+ }
150
+
151
+ if ( ! reason . runFriendlyIds . includes ( lastChildRun . friendlyId ) ) {
152
+ logger . error ( "CreateCheckpointService: Checkpoint not for most recent batch" , {
153
+ attemptId : attempt . id ,
154
+ runId : attempt . taskRunId ,
155
+ lastChild : lastChildRun . friendlyId ,
156
+ checkpointFor : reason . runFriendlyIds ,
157
+ params,
158
+ } ) ;
159
+
160
+ return {
161
+ success : false ,
162
+ keepRunAlive : true ,
163
+ } ;
164
+ }
165
+
137
166
break ;
138
167
}
139
168
default : {
You can’t perform that action at this time.
0 commit comments