Skip to content

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

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#9320
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:30
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.
Copilot AI review requested due to automatic review settings October 21, 2025 22:40
@azure-sdk azure-sdk requested a review from a team as a code owner October 21, 2025 22:40
@azure-sdk azure-sdk requested a review from weshaggard 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 synchronizes the eng/common directory with azure-sdk-tools PR 12532, modifying logging and command invocation behavior in PowerShell scripts. The changes standardize error handling and improve exit code management.

Key changes:

  • Replaces Write-Warning and Write-Error cmdlets with Write-Host using colored output
  • Adds a DoNotExitOnFailedExitCode switch parameter for better control over script termination
  • Standardizes exit code variable usage to $LASTEXITCODE

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 Replaces PowerShell warning/error cmdlets with colored Write-Host calls for consistent output formatting
eng/common/scripts/Helpers/CommandInvocation-Helpers.ps1 Adds DoNotExitOnFailedExitCode parameter, standardizes LASTEXITCODE usage, and simplifies error handling logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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