Skip to content

Additional information for when runs are retained.#14362

Open
arkoppan wants to merge 3 commits intoMicrosoftDocs:mainfrom
arkoppan:patch-23
Open

Additional information for when runs are retained.#14362
arkoppan wants to merge 3 commits intoMicrosoftDocs:mainfrom
arkoppan:patch-23

Conversation

@arkoppan
Copy link
Copy Markdown
Contributor

Only successful or partially succeeded runs are retained.

Clarified the calculation for retention days based on run completion time.

Clarified retention policy for Azure Repos regarding the latest runs retained for default and protected branches (only successful or partially succeeded runs are retained).
Clarified the retention policy for pipeline runs, specifying conditions under which runs are retained based on deployment success.
Only successful or partially succeeded runs are retained. 

Clarified the calculation for retention days based on run completion time.
@prmerger-automator
Copy link
Copy Markdown
Contributor

@arkoppan : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

| Run 1 | main | Not retained | Neither latest 3 for main, nor for pipeline |


Further, the number of days to retain is calculated from when the run is completed. For example, there are two runs on a master branch on Jan 19th. The run that completed later is retained.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Further, the number of days to retain is calculated from when the run is completed. For example, there are two runs on a master branch on Jan 19th. The run that completed later is retained.
Further, the number of days to retain is calculated from when the run is completed. For example, there are two runs on a main branch on Jan 19th. The run that completed later is retained.

@v-regandowner
Copy link
Copy Markdown
Contributor

@juliakm

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Copy link
Copy Markdown
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

Updates Azure Pipelines retention policy documentation to clarify which runs are kept under “recent runs” retention and how retention days are calculated relative to run completion time.

Changes:

  • Adds clarification that only successful or partially succeeded runs are considered for “latest runs” retention (Azure Repos case).
  • Adds explanation/example that retention days are calculated from run completion time, including an illustrative screenshot.
  • Minor formatting adjustments in the retention policy instructions section.

Comment on lines +96 to 97
Only latest successful or partially succeeded pipeline runs are retained. If deployment to only specific environment or stage succeeded, the run is not retained.

Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new sentence is not indented under the “- Azure Repos: …” list item, so it will render as a separate paragraph (and can interrupt the list). Indent it to be part of the Azure Repos bullet, and consider separating it into its own indented paragraph for readability.

Suggested change
Only latest successful or partially succeeded pipeline runs are retained. If deployment to only specific environment or stage succeeded, the run is not retained.
Only latest successful or partially succeeded pipeline runs are retained. If deployment to only specific environment or stage succeeded, the run is not retained.

Copilot uses AI. Check for mistakes.

- **Azure Repos:** Azure Pipelines retains the configured number of latest runs for the [pipeline's default branch](../process/pipeline-default-branch.md) and for each protected branch of the repository. A branch that has any branch policies configured is considered to be a protected branch.
- **Azure Repos:** Azure Pipelines retains the configured number of latest runs for the [pipeline's default branch](../process/pipeline-default-branch.md) and for each protected branch of the repository. A branch that has any branch policies configured is considered to be a protected branch.
Only latest successful or partially succeeded pipeline runs are retained. If deployment to only specific environment or stage succeeded, the run is not retained.
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar is unclear in “If deployment to only specific environment or stage succeeded…”. Please reword to something grammatically correct and unambiguous (for example, clarify whether you mean a partially successful multi-stage run vs. a fully successful run).

Suggested change
Only latest successful or partially succeeded pipeline runs are retained. If deployment to only specific environment or stage succeeded, the run is not retained.
Only pipeline runs whose overall result is **Successful** or **Partially succeeded** are retained. Runs where deployments succeed in only certain environments or stages, and the overall run result is not **Successful** or **Partially succeeded**, are not retained.

Copilot uses AI. Check for mistakes.
| Run 1 | main | Not retained | Neither latest 3 for main, nor for pipeline |


Further, the number of days to retain is calculated from when the run is completed. For example, there are two runs on a master branch on Jan 19th. The run that completed later is retained.
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example introduces “master branch”, which is inconsistent with the earlier main terminology and can be confusing. Consider using “default branch” (or main) consistently, and clarify the outcome in terms of the computed deletion time/date (rather than saying the run “is retained”, which can be read as a different retention rule).

Suggested change
Further, the number of days to retain is calculated from when the run is completed. For example, there are two runs on a master branch on Jan 19th. The run that completed later is retained.
Further, the number of days to retain is calculated from when the run is completed. For example, suppose there are two runs on the default branch (for example, `main`) on Jan 19th. The run that completed later will have a later deletion time because its retention period is counted from its completion time.

Copilot uses AI. Check for mistakes.
Comment on lines +117 to +123

<img width="700" height="267" alt="Screenshot 2026-03-26 095010" src="https://github.com/user-attachments/assets/d43056cc-649b-40b5-a66a-3ad8252d5d22" />





Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image is embedded via a GitHub user-attachments URL and uses non-descriptive alt text. Please move the screenshot into this doc’s media/ folder (as the rest of the page does) and reference it consistently (for example via the existing :::image pattern), with meaningful alt text describing what the screenshot shows.

Suggested change
<img width="700" height="267" alt="Screenshot 2026-03-26 095010" src="https://github.com/user-attachments/assets/d43056cc-649b-40b5-a66a-3ad8252d5d22" />
:::image type="content" source="media/retention-run-completion-time.png" alt-text="Example of pipeline run retention where, for two runs on the same day, the run that completed later is retained.":::

Copilot uses AI. Check for mistakes.
Comment on lines +120 to +123




Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are multiple consecutive blank lines after the image. Please remove the extra empty lines to keep the Markdown tidy and avoid unexpected spacing in rendering.

Suggested change

Copilot uses AI. Check for mistakes.
Comment on lines +79 to +80


Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two blank lines here (with whitespace) inside the numbered list. This can break Markdown list rendering and introduces trailing whitespace; please remove the extra empty/space-only lines so the list terminates cleanly before the moniker block.

Suggested change

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants