Recreate deleted worktrees for followups and log-normalization (#512)
This commit is contained in:
@@ -148,6 +148,12 @@ pub async fn follow_up(
|
||||
) -> Result<ResponseJson<ApiResponse<ExecutionProcess>>, ApiError> {
|
||||
tracing::info!("{:?}", task_attempt);
|
||||
|
||||
// Ensure worktree exists (recreate if needed for cold task support)
|
||||
deployment
|
||||
.container()
|
||||
.ensure_container_exists(&task_attempt)
|
||||
.await?;
|
||||
|
||||
// Get session_id with simple query
|
||||
let session_id = ExecutionProcess::find_latest_session_id_by_task_attempt(
|
||||
&deployment.db().pool,
|
||||
|
||||
@@ -295,6 +295,14 @@ pub trait ContainerService {
|
||||
}
|
||||
};
|
||||
|
||||
if let Err(err) = self.ensure_container_exists(&task_attempt).await {
|
||||
tracing::warn!(
|
||||
"Failed to recreate worktree before log normalization for task attempt {}: {}",
|
||||
task_attempt.id,
|
||||
err
|
||||
);
|
||||
}
|
||||
|
||||
let current_dir = self.task_attempt_to_current_dir(&task_attempt);
|
||||
|
||||
let executor_action = if let Ok(executor_action) = process.executor_action() {
|
||||
|
||||
Reference in New Issue
Block a user