Azure / Azure/azure-sdk-tools

Add retry to `prepare-pipelines` "Generate release pipelines for: ___" task

Open
#16,364 0 comments 0 reactions 0 assignees View on GitHub
needs-triage
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
144

Description

The tooling backing "Generate release pipelines for: ____" task can fail for transient reasons. To make the pipeline more reliable, introduce retries and backoff on failures.

Example failure: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6544309&view=logs&j=011e1ec8-6569-5e69-4f06-baf193d1351e&t=07ba3131-9dbf-5d34-279b-d3a6aa521384&l=5317

```
crit: PipelineGenerator.Program[0]
BOOM! Something went wrong, try running with --debug.
System.Exception: UpdatePipelinePermissionsAsync throw an error [InternalServerError]: {"$id":"1","innerException":null,"message":"TF400898: An Internal Error Occurred. Activity Id: f39069db-f2ca-4633-a25c-bbc0037857b3.","typeName":"Microsoft.Data.SqlClient.SqlException, Microsoft.Data.SqlClient","typeKey":"SqlException","errorCode":0,"eventId":0}
at PipelineGenerator.PipelineGenerationContext.UpdatePipelinePermissionsAsync(Guid serviceConnectionId, JsonNode serviceConnectionPermissions, CancellationToken cancellationToken) in /mnt/vss/_work/1/s/tools/pipeline-generator/Azure.Sdk.Tools.PipelineGenerator/PipelineGenerationContext.cs:line 247
at PipelineGenerator.Program.RunAsync(String organization, String project, String prefix, String path, String endpoint, String repository, String branch, String agentPool, String convention, Int32[] variableGroups, IEnumerable`1 serviceConnections, String devOpsPath, Boolean whatIf, Boolean open, Boolean destroy, Boolean noSchedule, Boolean setManagedVariables, Boolean overwriteTriggers, CancellationToken cancellationToken) in /mnt/vss/_work/1/s/tools/pipeline-generator/Azure.Sdk.Tools.PipelineGenerator/Program.cs:line 245

##[error]Script failed with exit code: 1
```

Contributor guide

Open the contributing guide

Research direction

Start in tools/pipeline-generator/Azure.Sdk.Tools.PipelineGenerator/PipelineGenerationContext.cs at UpdatePipelinePermissionsAsync, then inspect its caller in Program.cs. Use the linked InternalServerError example to understand the transient failure path. Done means the prepare-pipelines task retries failures with backoff and can complete after a transient error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
devops, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.