Skip to content

Conversation

@dagood
Copy link
Member

@dagood dagood commented Jan 21, 2026

The signing diagnosis artifact was only being created upon success of the main signing process. This works for diagnosing false successes, but not actual errors. Use defer to always create it.

Also, consolidate as many files as possible rather than stopping upon error.

@dagood dagood requested a review from a team as a code owner January 21, 2026 20:20
@dagood dagood requested a review from Copilot January 21, 2026 20:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the signing diagnostic file consolidation process to ensure it always runs, even when the main signing process fails. Previously, diagnostic artifacts were only created on success, which prevented diagnosing actual errors. The fix uses a deferred function to guarantee execution, and implements error accumulation to consolidate as many files as possible instead of stopping at the first error.

Changes:

  • Moved diagnostic file consolidation to a deferred function in run() to ensure it executes regardless of success or failure
  • Refactored error handling in consolidateDiagnosticFiles() to accumulate errors using errors.Join rather than returning immediately on first error

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
eng/_util/cmd/sign/sign.go Adds defer block to ensure diagnostic consolidation always runs and joins consolidation errors with main errors using named return value
eng/_util/cmd/sign/archive.go Refactors consolidateDiagnosticFiles() to accumulate all errors with errors.Join instead of early returns

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dagood dagood enabled auto-merge (squash) January 21, 2026 20:43
@dagood dagood merged commit 49eafa3 into microsoft/main Jan 21, 2026
43 checks passed
@dagood dagood deleted the dev/dagood/fix-sign-diag branch January 21, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants