Repository navigation
Fix reproducibility pipeline creating a single shared PR for both jobs - #7632
Conversation
The reproducibility Compare stage runs two PR-publishing jobs (SourceBuilt and Msft). Both invoked CreateBaselineUpdatePR with pipeline=reproducibility and the same target branch, so BuildHeadBranchName produced an identical head branch and the jobs collided on one PR instead of two. Add an optional --identifier discriminator that is folded into the generated head branch name (and its hash) and thread it through the pipeline templates, passing the build type (SourceBuilt/Msft) so each job gets a distinct branch and PR. When no identifier is supplied the branch name and hash input are unchanged, so the sdk and license pipelines' existing PRs are unaffected. Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR updates the VMR’s baseline-update PR publishing tool and pipeline templates to prevent collisions when multiple jobs in the same pipeline target the same branch (specifically in the reproducibility Compare stage). It introduces an optional identifier that’s incorporated into the deterministic head-branch naming, ensuring each job publishes to a distinct PR.
Changes:
- Add a
--identifierCLI option toCreateBaselineUpdatePRand plumb it through to PR creation. - Include the identifier in the generated PR head branch name (while preserving the historical branch name when no identifier is provided).
- Extend the baseline-update pipeline templates to pass an optional identifier, and set it for reproducibility jobs using
buildType.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| eng/tools/CreateBaselineUpdatePR/Program.cs | Adds the --identifier option and passes it into PRCreator. |
| eng/tools/CreateBaselineUpdatePR/PRCreator.cs | Incorporates the identifier into deterministic head branch naming for distinct PRs per job. |
| eng/pipelines/templates/steps/run-baseline-update-pr-tool.yml | Adds an optional identifier parameter and conditionally forwards --identifier to the tool. |
| eng/pipelines/templates/steps/create-baseline-update-pr.yml | Adds and forwards the identifier parameter to the runner template for both GH and AzDO paths. |
| eng/pipelines/templates/jobs/reproducibility-test.yml | Supplies identifier: ${{ parameters.buildType }} so SourceBuilt/Msft jobs publish distinct PRs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/backport to release/10.0.1xx |
|
Started backporting to |
|
@mthalman backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix reproducibility pipeline creating a single shared PR for both jobs
Using index info to reconstruct a base tree...
A eng/pipelines/templates/jobs/reproducibility-test.yml
M eng/pipelines/templates/steps/create-baseline-update-pr.yml
M eng/tools/CreateBaselineUpdatePR/PRCreator.cs
M eng/tools/CreateBaselineUpdatePR/Program.cs
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): eng/pipelines/templates/jobs/reproducibility-test.yml deleted in HEAD and modified in Fix reproducibility pipeline creating a single shared PR for both jobs. Version Fix reproducibility pipeline creating a single shared PR for both jobs of eng/pipelines/templates/jobs/reproducibility-test.yml left in tree.
Auto-merging eng/pipelines/templates/steps/create-baseline-update-pr.yml
Auto-merging eng/tools/CreateBaselineUpdatePR/PRCreator.cs
Auto-merging eng/tools/CreateBaselineUpdatePR/Program.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Fix reproducibility pipeline creating a single shared PR for both jobs
Error: The process '/usr/bin/git' failed with exit code 128 |
The reproducibility
Comparestage runs two PR-publishing jobs (SourceBuiltandMsft). Both invokedCreateBaselineUpdatePRwith the same target branch, so it produced an identical head branch and the jobs collided on one PR instead of two.Add an optional
--identifierdiscriminator that is folded into the generated head branch name so each job gets a distinct branch and PR. When no identifier is supplied the branch name is unchanged, so the sdk and license pipelines' existing PRs are unaffected.