Skip to content

Support PR-targeted Azure DevOps build retries - #54

Merged
jaredpar merged 1 commit into
mainfrom
jaredpar-build-retry-pr-targeting
Oct 9, 2026
Merged

jaredpar merged 1 commit into
mainfrom
jaredpar-build-retry-pr-targeting

Conversation

@jaredpar

@jaredpar jaredpar commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Retrying a PR should not require looking up its Azure DevOps build ID first. This adds tiger azdo retry --pr <number> --repo <owner/repo> --org <organization>, while preserving positional build-ID retries and --failed-only.

PR targeting uses a live lookup explicitly ordered by descending queue time and selects one build across matching pipelines, regardless of status or result. The target forms are mutually exclusive, and missing builds or invalid arguments fail without starting a retry. Command help, README, and the CLI skill document the behavior.

Live testing also exposed an existing full-retry API bug: Azure DevOps requires an empty request body when using sourceBuildId. This fixes that request and includes server response details in retry errors, without falling back to another retry mode or bypassing pipeline policies.

Validation

  • dotnet test --nologo: all 302 tests passed, including request sequences, CLI parsing, validation, cancellation, and failure behavior.
  • Tested against Make RunTests framework defaults OS-specific dotnet/roslyn#85966 in dnceng-public/public. Correctly selected build 1628408 (roslyn-integration-CI), but Azure DevOps blocked the full retry because its queue-time variable policy rejects copying system.pullRequest.* variables. No new build was queued and no pipeline settings were changed.

Resolve the latest queued build for --pr and --repo, preserve build-ID and failed-only retries, and validate exclusive targets. Fix sourceBuildId retries to send an empty body and surface server error details.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jaredpar
jaredpar merged commit 2b3488c into main Oct 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant