Skip to content

Fix incremental PR builds affected by baseline drift - #2361

Draft
Alexander Holstrup (aholstrup1) wants to merge 2 commits into
microsoft:mainfrom
aholstrup1:aholstrup1-review-workitem-647482
Draft

Fix incremental PR builds affected by baseline drift#2361
Alexander Holstrup (aholstrup1) wants to merge 2 commits into
microsoft:mainfrom
aholstrup1:aholstrup1-review-workitem-647482

Conversation

@aholstrup1

Copy link
Copy Markdown
Collaborator

❔What, Why & How

Incremental pull request builds currently use the last successful target-branch build for both change detection and artifact reuse. On busy branches, this attributes changes merged after that baseline to the pull request, potentially triggering fullBuildPatterns and building everything for an otherwise unrelated PR.

This separates those decisions:

  • The pull request merge-base diff determines whether the PR modifies a project and whether fullBuildPatterns requires all projects or apps to be built.
  • The successful workflow baseline diff continues to determine which artifacts can safely be reused, ensuring dependencies changed since the baseline are rebuilt.
  • The app-level behavior is applied to both standard and workspace compilation paths.

A shared Test-IsPullRequest helper is used for PR event handling.

Related work item: AB#647482

Related to issue: N/A

✅ Checklist

  • Add tests (E2E, unit tests)
  • Update RELEASENOTES.md
  • Update documentation (e.g. for new settings or scenarios) - N/A, no settings or user configuration changed
  • Add telemetry - N/A, existing incremental-build telemetry remains applicable

Use the pull request merge-base to decide whether anything or everything must be built, while retaining the successful workflow baseline for safe artifact reuse.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6bb9e482-1543-411e-9fb4-f316a810139d
Rename baseline-oriented variables and the Get-ProjectsToBuild parameter while retaining modifiedFiles as a compatibility alias.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6bb9e482-1543-411e-9fb4-f316a810139d
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