Skip to content
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

adding try-catch block to prevent crashes #1906

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions core/pipeline-driver/lib/tasks/task-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,13 @@ class TaskRunner {
}

log.debug(`task ${status} ${taskId} ${error || ''}`, { component, jobId: this._jobId, pipelineName: this.pipeline.name, taskId });
this._progress.debug({ jobId: this._jobId, pipeline: this.pipeline.name, status: DriverStates.ACTIVE });
this._boards.update(task);
try {
this._progress.debug({ jobId: this._jobId, pipeline: this.pipeline.name, status: DriverStates.ACTIVE });
this._boards.update(task);
}
catch (e) {
log.error(`jobId: ${this._jobId}, pipeline name: ${this.pipeline.name}, ${e.message}`, { component, jobId: this._jobId, pipelineName: this.pipeline.name, taskId });
}
}

// TODO: MAKE THIS THROW
Expand All @@ -891,7 +896,7 @@ class TaskRunner {
this._nodes.updateTaskState(taskId, state);
}
catch (e) {
log.error(`jobId: ${this._jobId}, ${e.message}`, { component, jobId: this._jobId, pipelineName: this.pipeline.name, taskId });
log.error(`jobId: ${this._jobId}, pipeline name: ${this.pipeline.name}, ${e.message}`, { component, jobId: this._jobId, pipelineName: this.pipeline.name, taskId });
}
}

Expand Down
Loading