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

Log task errors immediately when raised; Do not deferring logging till end of task #1612

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
Don't defer logging of task output errors until the end of the task, …
…log them immediately as they are reported
  • Loading branch information
Rhys Koedijk committed Mar 11, 2025
commit 0fddf60450275e57d493284602bfbcca52645888
2 changes: 2 additions & 0 deletions extension/tasks/dependabotV2/dependabot/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ export class DependabotCli {
} catch (e) {
operationResult.success = false;
operationResult.error = e;
error(`An unhandled exception occurred while processing '${type}': ${e}`);
console.debug(e); // Dump the stack trace to help with debugging
} finally {
operationResults.push(operationResult);
}
Expand Down
3 changes: 0 additions & 3 deletions extension/tasks/dependabotV2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,6 @@ export async function performDependabotUpdatesAsync(
}
}

// Log the errors of all failed updateoperations
failedOperations.forEach((u) => exception(u.error));

// Return an overall result based on the success/failure of all the update operations
if (successfulOperations.length > 0) {
return failedOperations.length == 0 ? TaskResult.Succeeded : TaskResult.SucceededWithIssues;
Expand Down