Skip to content

[SDK Automation] Log the output of the 'tsp compile' command to the pipeline #7958

@raych1

Description

@raych1

The common automation scripts used to generate SDK based on TypeSpecs does not log the command output, making it hard to troubleshoot the root cause of failures.

Currently, when this command fails, the log of pipeline is as follows for this spec PR:

01:21:41.233 cmdout 	[Invoke-GenerateAndBuildV2.ps1] npx tsp compile /mnt/vss/_work/1/s/azure-sdk-for-net/sdk/applicationinsights.livemetrics/Azure.Monitor.OpenTelemetry.LiveMetrics/TempTypeSpecFiles/ApplicationInsights.LiveMetrics/main.tsp --emit @azure-tools/typespec-csharp --option @azure-tools/typespec-csharp.emitter-output-dir=/mnt/vss/_work/1/s/azure-sdk-for-net/sdk/applicationinsights.livemetrics/Azure.Monitor.OpenTelemetry.LiveMetrics/src
01:21:42.991 cmderr W 	[Invoke-GenerateAndBuildV2.ps1] Write-Error: /mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/Invoke-GenerateAndBuildV2.ps1:120
01:21:42.992 cmderr W 	[Invoke-GenerateAndBuildV2.ps1] Line |
01:21:42.992 cmderr W 	[Invoke-GenerateAndBuildV2.ps1]  120 |  … ectFolder = & $processScript $typespecFolder $commitid $repoHttpsUrl01:21:42.992 cmderr W 	[Invoke-GenerateAndBuildV2.ps1]      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
01:21:42.992 cmderr W 	[Invoke-GenerateAndBuildV2.ps1]      | Failed to generate sdk project at
01:21:42.992 cmderr W 	[Invoke-GenerateAndBuildV2.ps1]      | /mnt/vss/_work/1/s/azure-sdk-for-net/sdk/applicationinsights.livemetrics/Azure.Monitor.OpenTelemetry.LiveMetrics
01:21:43.066 warn 	Script return with result [warning] code [0] signal [null] cwd [azure-sdk-for-net]: pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1

@weshaggard , it appears that the tsp-client library adoption work for each SDK language automation is currently in backlogs. How do you think of improving the TypeSpec-Project-Generate.ps1 script to address this issue?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions