Azure / Azure/azure-sdk-tools

Add troubleshooting for push failures to pipeline-created SDK PR branches

Open
#15,532 2 comments 0 reactions 0 assignees View on GitHub
AzSDK Tools Agent design-discussion
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

## Summary

Add troubleshooting guidance for cases where the AzSDK Tools Agent cannot push commits to a branch created by SDK generation pipelines.

## Scenario

A service team uses Azure SDK pipelines to generate SDK libraries. The pipeline opens a PR to merge generated code into the SDK repo. If the team needs to customize the generated code, the recommended path is to commit directly to the pipeline-created branch so they can continue using the same PR.

## Current behavior

If the user does not have the required repository permissions, direct commits to the pipeline-created branch are blocked. The agent does not currently recognize this as a permissions issue, so the user gets stuck without clear next steps.

## Desired behavior

When the AzSDK Tools Agent fails to push commits to a pipeline-created branch, it should detect whether the failure is caused by missing repository permissions. If permissions are missing, the agent should clearly explain the issue and direct the user to the right process for obtaining access.

## Suggested troubleshooting flow

1. Detect that the failed operation was a push to a pipeline-created SDK PR branch.
2. Inspect the push failure details for permission-related errors.
3. Check the user's permissions for the target SDK repository.
4. If the user lacks the required permissions, inform them that they cannot commit directly to the pipeline branch until access is granted.
5. Explain that the recommended workflow still requires committing to the existing pipeline-created branch and PR.
6. Point the user to the repo permission request process.
7. If permissions appear sufficient, continue with the existing push failure troubleshooting path.

## How user obtains permissions

TBD — link to repo onboarding doc

## Open questions

- Should this permission check also be added to the verify-setup tool, so users discover the missing permissions before they try to push?

## References

Source thread: [Engineering System Teams thread](https://teams.microsoft.com/l/message/19:59dbfadafb5e41c4890e2cd3d74cc7ba@thread.skype/1778091627933?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&groupId=3e17dcb0-4257-4a30-b843-77f47f1d4121&parentMessageId=1778091627933&teamName=Azure%20SDK&channelName=Engineering%20System%20%F0%9F%9B%A0%EF%B8%8F&createdTime=1778091627933)

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing push failure troubleshooting path in the AzSDK Tools Agent and inspect the verify-setup tool for related permission checks. Trace how pipeline-created SDK PR branches and push errors are handled, then ensure missing repository permissions produce guidance to request access while sufficient permissions continue through the existing path.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.