Skip to content

Conversation

@raych1
Copy link
Member

@raych1 raych1 commented Nov 20, 2025

Fixed a JSON parse error:

Formatted command: . 'D:\a\_work\1\azure-sdk-for-java\eng\common\scripts\Create-APIReview.ps1' -PackageInfoFiles ('[
  "D:\a\_work\1/packages-signed/PackageInfo/azure-sdk-template.json",
  "D:\a\_work\1/packages-signed/PackageInfo/azure-sdk-template-two.json"
]' | ConvertFrom-Json -NoEnumerate) -ArtifactList ('[]' | ConvertFrom-Json | Select-Object Name) -ArtifactPath 'D:\a\_work\1/packages-signed' -ArtifactName packages-signed -APIKey '***' -PackageName '' -SourceBranch 'update-pipeline-script-for-v2' -DefaultBranch 'main' -ConfigFileDir 'D:\a\_work\1/packages-signed/PackageInfo' -BuildId '5592577' -RepoName 'Azure/azure-sdk-for-java' -MarkPackageAsShipped $True
========================== Starting Command Output ===========================
"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_work\_temp\a4d2f187-5ffe-47e8-8251-3646f08da395.ps1'"
ConvertFrom-Json : Conversion from JSON failed with error: Bad JSON escape sequence: \a. Path '', line 2, position 7

Test run:
template-batch-release

@raych1 raych1 requested a review from a team as a code owner November 20, 2025 02:38
Copilot AI review requested due to automatic review settings November 20, 2025 02:38
@raych1 raych1 self-assigned this Nov 20, 2025
@raych1 raych1 changed the title Used another way to construct package info array Used another way to create package info array Nov 20, 2025
@raych1 raych1 requested a review from weshaggard November 20, 2025 02:38
@raych1 raych1 moved this from 🤔 Triage to 🔬 Dev in PR in Azure SDK EngSys 🍔🌭 Nov 20, 2025
Copilot finished reviewing on behalf of raych1 November 20, 2025 02:42
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

Copy link
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 fixes a JSON parse error that occurred when passing Windows file paths through the convertToJson Azure Pipelines template function. The error Bad JSON escape sequence: \a was caused by backslashes in paths like D:\a\_work\1\... being interpreted as escape characters when the JSON string was parsed by PowerShell's ConvertFrom-Json.

The fix replaces the JSON serialization/deserialization approach with a simpler PowerShell array construction using the join template expression.

Reviewed Changes

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

File Description
eng/common/pipelines/templates/steps/validate-all-packages.yml Changes -PackageInfoFiles parameter construction from JSON conversion to direct array syntax using join
eng/common/pipelines/templates/steps/create-apireview.yml Changes -PackageInfoFiles parameter construction from JSON conversion to direct array syntax using join

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

azure-sdk added a commit to Azure/azure-sdk-for-js that referenced this pull request Nov 21, 2025
azure-sdk added a commit to Azure/azure-sdk-for-rust that referenced this pull request Nov 21, 2025
@raych1 raych1 merged commit 2f08891 into main Nov 21, 2025
11 checks passed
@raych1 raych1 deleted the users/raych1/fixed-JSON-parse-err branch November 21, 2025 19:37
@kurtzeborn kurtzeborn moved this from 🔬 Dev in PR to 🎊 Closed in Azure SDK EngSys 🍔🌭 Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎊 Closed

Development

Successfully merging this pull request may close these issues.

4 participants