Skip to content

Engineering - Implement checkpoint reuse for test tasks in pipelines - #334926

Draft
Ladislau Szomoru (lszomoru) wants to merge 1 commit into
mainfrom
lszomoru/product-build-test-checkpoint
Draft

Engineering - Implement checkpoint reuse for test tasks in pipelines#334926
Ladislau Szomoru (lszomoru) wants to merge 1 commit into
mainfrom
lszomoru/product-build-test-checkpoint

Conversation

@lszomoru

Copy link
Copy Markdown
Member

This pull request introduces a mechanism to reuse successful test tasks in the product build pipelines by implementing checkpoint artifacts. Key changes include:

  • New YAML Files: Created several YAML files for publishing, restoring, and running tests with checkpoints.
  • New TypeScript File: Added testCheckpoint.ts to handle checkpoint logic.
  • Documentation: Updated test-checkpoints.md to reflect the new functionality and usage.
  • Pipeline Modifications: Edited existing pipeline templates for Linux, Windows, and macOS to incorporate checkpoint handling, ensuring tests are only rerun if they haven't passed in the current pipeline run.
  • Test Coverage: Added extensive unit tests to validate the checkpoint functionality.

This implementation aims to reduce redundant test executions, improving build efficiency and reliability, especially in the presence of flaky tests.

Copilot AI balanced review requested due to automatic review settings September 7, 2026 14:26
@lszomoru Ladislau Szomoru (lszomoru) changed the title Implement checkpoint reuse for test tasks in pipelines Engineering - Implement checkpoint reuse for test tasks in pipelines Sep 7, 2026

Copilot AI left a comment

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.

Copilot review overview

🟡 Changes recommended

The checkpoint documentation does not match the implemented setting, scope, or validation tests.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 Low severity

New issues introduced by this change (1)
Severity Finding
Low severity build/​azure-pipelines/​common/​test-checkpoints.md — This document describes an obsolete Linux-only pilot: VSCODE_REUSE_SUCCESSFUL_TESTS is not…
What changed in this PR

Adds reusable test checkpoints so successful product-pipeline tasks can be skipped during retries.

Changes:

  • Adds checkpoint restoration, recording, and publishing.
  • Integrates checkpointing across supported platform, smoke, integration, and Copilot tests.
  • Adds helper and template test coverage.
File Summary
build/​lib/​test/​testCheckpointTemplates.test.ts Validates checkpoint templates and wiring.
build/​lib/​test/​testCheckpoint.test.ts Tests checkpoint logic and metadata.
build/​azure-pipelines/​win32/​steps/​product-build-win32-test.yml Checkpoints Windows tests.
build/​azure-pipelines/​win32/​steps/​product-build-win32-compile.yml Checkpoints the Windows Agent Host smoke test.
build/​azure-pipelines/​win32/​product-smoke-flaky-win32.yml Forwards the checkpoint setting.
build/​azure-pipelines/​win32/​product-build-win32.yml Configures Windows checkpointing.
build/​azure-pipelines/​win32/​product-build-win32-ci.yml Forwards the CI checkpoint setting.
build/​azure-pipelines/​product-smoke-flaky.yml Disables reuse for flaky pipelines.
build/​azure-pipelines/​product-build.yml Adds the product-build checkpoint parameter.
build/​azure-pipelines/​product-build-TSA.yml Disables checkpoint reuse for TSA.
build/​azure-pipelines/​product-build-template.yml Propagates checkpoint configuration.
build/​azure-pipelines/​product-build-ado-ci.yml Disables reuse for ADO CI.
build/​azure-pipelines/​linux/​steps/​product-build-linux-test.yml Checkpoints Linux tests.
build/​azure-pipelines/​linux/​steps/​product-build-linux-compile.yml Checkpoints the Linux Agent Host smoke test.
build/​azure-pipelines/​linux/​product-smoke-flaky-linux.yml Forwards the checkpoint setting.
build/​azure-pipelines/​linux/​product-build-linux.yml Configures Linux checkpointing.
build/​azure-pipelines/​linux/​product-build-linux-ci.yml Forwards the CI checkpoint setting.
build/​azure-pipelines/​darwin/​steps/​product-build-darwin-test.yml Checkpoints macOS tests.
build/​azure-pipelines/​darwin/​steps/​product-build-darwin-compile.yml Checkpoints the macOS Agent Host smoke test.
build/​azure-pipelines/​darwin/​product-smoke-flaky-darwin.yml Forwards the checkpoint setting.
build/​azure-pipelines/​darwin/​product-build-darwin.yml Configures macOS checkpointing.
build/​azure-pipelines/​darwin/​product-build-darwin-ci.yml Forwards the CI checkpoint setting.
build/​azure-pipelines/​copilot/​test-integration-steps.yml Checkpoints Copilot tests.
build/​azure-pipelines/​common/​testCheckpoint.ts Implements checkpoint state management.
build/​azure-pipelines/​common/​test-checkpoints.md Documents obsolete pilot behavior and must be updated for the implemented setting, scope, and tests.
build/​azure-pipelines/​common/​run-test-with-checkpoint.yml Wraps tests with checkpoint handling.
build/​azure-pipelines/​common/​restore-test-checkpoints.yml Restores checkpoint artifacts.
build/​azure-pipelines/​common/​publish-test-checkpoint.yml Publishes successful-test checkpoints.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1 to +4
# Linux unit-test checkpoint pilot

The product pipeline's `VSCODE_REUSE_SUCCESSFUL_TESTS` queue parameter enables
success checkpoints for Linux x64 unit tests only:
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.

2 participants