dsccommunity / dsccommunity/CommonTasks

Error in publish_module_to_gallery task with Get-ChangeLogData

Open
#156 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
45
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Problem description

In AzurePipeline, there is an error when you use Get-ChangeLogData function on Windows with PowerShell 7.
No problem with Windows PowerShell 5.1, or PowerShell 7 on Linux.

Get-ChangeLogData based the split to get date value with [environment]::NewLine.
But, in Windows, it's not the same character in each version of PowerShell:

#Powershell 5.1
[char[]][environment]::NewLine | % {[int]$_}

13
10
#Powershell 7.1.2
[int][environment]::NewLine
0

And now, the module is packaged with 'ubuntu-latest' image. That might cause some encoding or carriage return troubles.

Verbose logs
ERROR: Cannot bind parameter 'Date'. Cannot convert value "2022-03-08

### Added

- `VirtualMemoryFiles` Composite for adjusting the system page file via the resource `VirtualMemory` from the `ComputerManagementDsc` Module.
- `SharePointSetup` Composite for installing the SharePoint Prerequisits, Setup and optionally Language Packs.
### Changed

- Changed the build pipeline to Sampler.
  - Debugging Sampler migration:
    - Added 'Sampler.GitHubTasks'.
    - Moved DSCResources for faster build.
    - Removed dependencies for faster build.
- Fixed badges.
- Added back configurations and dependencies.
- Fixing issue with Cluster when only NodeMajority is used.
  - Fixed the fix: Quorum is not required in some SQL Always-On scenarios which did not work after the fix.
- Add new resource LocalUsers.
- Make DscLcmController independent from the DscDiagnostics resource.
- Add optional attributes to DscTagging resource.
- Update documentation.
- Applied HQRM standards.
- Fixing issue with AddsOrgUnitsAndGroups when OUs contain other non-word characters.
- Added MmaAgent to configure Microsoft Monitoring Agent.
- Added AddsServicePrincipalNames to configure SPNs.
- Disabling RebootNodeIfNeeded when LCM is on Monitor mode.
- Made 'WaitForClusterRetryIntervalSec' and 'WaitForClusterRetryCount' configurable in Cluster config.
- Added new configuration 'WebConfigPropertyCollections'.
- Fixed an issue with duplicate resource identifiers in 'WebConfigProperties'.
- Changed parameter 'Name' to 'Names' in 'WindowsFeatures' and 'WindowsOptionalFeatures' resources according to coding convention.
- Made the Office Online Server resources actually work and redesigned them.
  - Added 'OfficeOnlineServerMachineConfig' configuration.
- WindowsFeatures configuration does not longer install all sub features. If needed, use prefix '*'.
How to reproduce

Using Windows and PowerShell 7.1.2

Get-ChangeLogData -Path ./output/CHANGELOG.md
Expected behavior

Pipeline works without issue.

Current behavior

An error when Get-ChangelogData search the date in release title.

Suggested solution

Use ubuntu-latest image in pipeline for deploy task.

Operating system the target node is running
Windows Server 2019
PowerShell version and build the target node is running
$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.1
PSEdition                      Core
GitCommitId                    7.2.1
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Module version used
Latest

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the publish_module_to_gallery task and the Get-ChangeLogData function used by AzurePipeline. Reproduce the failure with Get-ChangeLogData -Path ./output/CHANGELOG.md on Windows with PowerShell 7. Compare its handling of [environment]::NewLine and the release date, then verify that the pipeline completes without the date conversion error.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.