Skip to content

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

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#3249
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:33
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:41
@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 synchronizes the eng/common directory with azure-sdk-tools PR 12532, updating PowerShell logging and command invocation utilities. The changes improve error handling consistency and add new command execution options.

Key Changes:

  • Replaced Write-Warning and Write-Error cmdlets with Write-Host using colored output for better cross-platform compatibility
  • Added DoNotExitOnFailedExitCode switch parameter to Invoke-LoggedCommand for more flexible error handling
  • Simplified error handling logic by removing conditional CI-specific error writing

Reviewed Changes

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

File Description
eng/common/scripts/logging.ps1 Replaced PowerShell error/warning cmdlets with colored Write-Host calls for consistent output across environments
eng/common/scripts/Helpers/CommandInvocation-Helpers.ps1 Added optional exit code bypass parameter and streamlined error handling by removing redundant Write-Error calls

@azure-sdk azure-sdk merged commit 14ec093 into main Oct 22, 2025
22 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