Skip to content

Fix PMC publishing script and mapping#1635

Draft
SteveL-MSFT wants to merge 6 commits into
PowerShell:mainfrom
SteveL-MSFT:pmc-path
Draft

Fix PMC publishing script and mapping#1635
SteveL-MSFT wants to merge 6 commits into
PowerShell:mainfrom
SteveL-MSFT:pmc-path

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
Member

PR Summary

  • disable color, appears that NO_COLOR is no longer working
  • package name should just be dsc as the preview is part of the version
  • fix mapping for rpm which should be a period between version and arch

Copilot AI review requested due to automatic review settings July 17, 2026 19:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the EV2 publishing workflow for DSC Linux packages uploaded to packages.microsoft.com, correcting RPM filename mapping and aligning the published package name with the current versioning scheme while attempting to suppress colored output in logs.

Changes:

  • Update RPM PackageFormat in the PMC mapping to use the correct .arch separator (e.g., -1.x86_64.rpm).
  • Adjust the publishing script to force package name to dsc (preview/stable distinction is now carried in the version).
  • Switch from NO_COLOR to PowerShell output rendering controls to reduce ANSI color output in logs.

Reviewed changes

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

File Description
tools/packages.microsoft.com/mapping.json Fix RPM package filename format to match standard RPM naming (release.arch).
.pipelines/EV2Specs/ServiceGroupRoot/Shell/Run/Run.ps1 Update publishing behavior (color suppression approach + package naming).

Comment thread .pipelines/EV2Specs/ServiceGroupRoot/Shell/Run/Run.ps1
Copilot AI review requested due to automatic review settings July 20, 2026 18:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comments suppressed due to low confidence (1)

.pipelines/EV2Specs/ServiceGroupRoot/Shell/Run/Run.ps1:20

  • $PSStyle.OutputRendering is not available in older pwsh versions; assigning it unconditionally can throw (e.g., when $PSStyle is $null) and abort the EV2 deployment. Guard this assignment so the script still runs on older PowerShell while keeping NO_COLOR as a fallback.
$PSStyle.OutputRendering = 'PlainText'

Comment thread .pipelines/EV2Specs/ServiceGroupRoot/Shell/Run/Run.ps1 Outdated
Copilot AI review requested due to automatic review settings July 20, 2026 21:27
@SteveL-MSFT
SteveL-MSFT marked this pull request as draft July 20, 2026 21:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comments suppressed due to low confidence (2)

.pipelines/EV2Specs/ServiceGroupRoot/Shell/Run/Run.ps1:20

  • $PSStyle.OutputRendering is set unconditionally. $PSStyle (and/or the OutputRendering property) is not available in older pwsh versions, so this line can throw at script start and fail the EV2 run. Guard the assignment so it only runs when supported.
$PSStyle.OutputRendering = 'PlainText'

.pipelines/EV2Specs/ServiceGroupRoot/Shell/Run/Run.ps1:110

  • Get-PackageObjects mutates the function parameter $ReleaseVersion inside the foreach loop when handling RPM. Because the mapping lists RPM packages before DEB packages, this will also change the version string used to construct subsequent DEB filenames (e.g., preview versions will incorrectly use '~' instead of '-'), causing package path lookup failures.
        if ($pkg.PackageFormat.EndsWith('.rpm')) {
            # RPM requires no dashes in the version string, so replace any dashes with tildes
            $ReleaseVersion = $ReleaseVersion.Replace('-', '~')
        }

Comment on lines 301 to 304
} catch {
Write-Error -ErrorAction Stop $_.Exception.Message
Write-Error -ErrorAction Stop (Get-Error | Out-String)
return 1
}
Copilot AI review requested due to automatic review settings July 20, 2026 21:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comments suppressed due to low confidence (2)

.pipelines/EV2Specs/ServiceGroupRoot/Shell/Run/Run.ps1:20

  • $PSStyle.OutputRendering is assigned unconditionally. On older PowerShell versions where $PSStyle (or the OutputRendering property) isn't available, this will throw and can fail the EV2 deployment script early. Guard the assignment based on the PowerShell version so the script still runs when OutputRendering isn't supported.
$env:NO_COLOR = 1
$PSStyle.OutputRendering = 'PlainText'

.pipelines/EV2Specs/ServiceGroupRoot/Shell/Run/Run.ps1:305

  • In the catch block, Write-Error -ErrorAction Stop ... raises a new terminating error, so return 1 will never execute (the script will terminate with the new error instead). If the intent is to log the detailed error and exit with a non-zero code, write the error without -ErrorAction Stop and then return 1.
} catch {
    Write-Error -ErrorAction Stop (Get-Error | Out-String)
    return 1
}

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.

2 participants