Skip to content

Sync eng/common directory with azure-sdk-tools for PR 12532#36299

Merged
azure-sdk merged 4 commits intomainfrom
sync-eng/common-weshaggard-patch-2-12532
Oct 22, 2025
Merged

Sync eng/common directory with azure-sdk-tools for PR 12532#36299
azure-sdk merged 4 commits intomainfrom
sync-eng/common-weshaggard-patch-2-12532

Conversation

@azure-sdk
Copy link
Copy Markdown
Collaborator

Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#12532 See eng/common workflow

weshaggard and others added 4 commits October 21, 2025 22:31
Change logging helpers to always write to host and either set color or use devops/gh formatting.

We do not want to use Write-Error or Write-Warning directly because they can stop the script or not depending on preferences which makes it difficult to ensure local runs of scripts work the same as in the pipelines. So, we should never depend on these logging commands to cause a script to stop execution.
Removed legacy error handling for command failures.
@azure-sdk azure-sdk requested a review from a team as a code owner October 21, 2025 22:40
@azure-sdk azure-sdk added EngSys This issue is impacting the engineering system. Central-EngSys This issue is owned by the Engineering System team. labels Oct 21, 2025
Copy link
Copy Markdown
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 syncs the eng/common directory with changes from azure-sdk-tools PR #12532, focusing on improving command execution error handling and logging behavior in PowerShell scripts.

Key changes:

  • Standardized logging output methods to use Write-Host with color formatting instead of Write-Warning and Write-Error
  • Enhanced command invocation error handling with a new opt-out parameter for exit-on-failure behavior
  • Simplified error handling logic by removing redundant CI-specific conditional checks

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
eng/common/scripts/logging.ps1 Replaced Write-Warning and Write-Error cmdlets with Write-Host using color parameters for consistent output formatting
eng/common/scripts/Helpers/CommandInvocation-Helpers.ps1 Added DoNotExitOnFailedExitCode parameter, standardized $LASTEXITCODE variable casing, and streamlined error handling by removing CI-specific conditional logic

@azure-sdk azure-sdk merged commit 7e084f0 into main Oct 22, 2025
18 checks passed
@azure-sdk azure-sdk deleted the sync-eng/common-weshaggard-patch-2-12532 branch October 22, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants