New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: block non-linear merges #11277
Merged
Merged
ci: block non-linear merges #11277
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changelog[uncommitted] (2022-11-08) |
AaronFriel
changed the title
ci: block merge commits from being merged
ci: block non-linear merges
Nov 7, 2022
AaronFriel
added
the
impact/no-changelog-required
This issue doesn't require a CHANGELOG update
label
Nov 7, 2022
AaronFriel
force-pushed
the
friel/block-reverse-merge
branch
2 times, most recently
from
November 8, 2022 04:53
9518384
to
941be35
Compare
AaronFriel
force-pushed
the
friel/block-reverse-merge
branch
2 times, most recently
from
November 8, 2022 05:18
d9460b9
to
d14f084
Compare
Frassle
reviewed
Nov 8, 2022
AaronFriel
force-pushed
the
friel/block-reverse-merge
branch
from
November 8, 2022 19:04
d14f084
to
e44778d
Compare
kpitzen
approved these changes
Nov 8, 2022
bors merge |
🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
AaronFriel
force-pushed
the
friel/block-reverse-merge
branch
from
November 8, 2022 19:22
e44778d
to
d6e03eb
Compare
bors merge |
bors bot
added a commit
that referenced
this pull request
Nov 8, 2022
11277: ci: block non-linear merges r=AaronFriel a=AaronFriel This ensures commit history is linear, enabling customer-owned forks of the pulumi CLI to more easily maintain their fork. Reverse merges into PR branches result in a more complex process for them and for us. To test this PR, I based my PR branch off an older commit from the target branch and added a merge commit. That resulted in the check failing: https://github.com/pulumi/pulumi/actions/runs/3416559764/jobs/5686840393 > Checking merge commit efb7be0 for non-linear history > Main branch parent is: 83c9dfc Merge #11262 > PR branch parents are d9460b9 > Checking: d9460b9 Merge remote-tracking branch 'origin/master' into friel/block-reverse-merge > Error: Non-linear history, PR contains a merge d9460b9. Remove this by rebasing on the target. > Error: Detected non-linear history. > Error: Process completed with exit code 1. Fixes #10903 The script used by this lint contains several "tests" and useful diagnostics. Example outputs: ```shell $ ./scripts/git-linear-history-check.sh f033d9d Checking merge commit f033d9d for non-linear history Main branch parent is: 0797f29 Merge #10817 PR branch parents are 110dd76 ffbb03c cdf8f20 396650a Checking: 110dd76 ci: Pin yarn lockfile for security & dependency scanning Checking: ffbb03c ci: Build binary with .exe extension on Windows Checking: cdf8f20 ci: Remove several test skips, check if unnecessary Checking: 396650a ci: Re-enable Windows tests with temp dir ✅ Commit history is linear. ``` ```shell $ ./scripts/git-linear-history-check.sh 0f3e536 Checking merge commit 0f3e536 for non-linear history Main branch parent is: bc704af Merge #10703 #10717 PR branch parents are 9065d7c 22f2989 9f5ec4a Checking: 9065d7c refactored defaultServiceLoop into its own method ::error::Non-linear history, PR contains a merge fa09da6. Remove this by rebasing on the target. ::error::Non-linear history, PR contains a merge 536f3d6. Remove this by rebasing on the target. Checking: 22f2989 ci: Fix package parallelism assignment Checking: 9f5ec4a Add missing `ProgramTestOptions` overrides in `With` ::error::Detected non-linear history. ``` The `::error::` messages should appear in GitHub Actions logs at the top level (the workflow level) as well as in the detailed output of the action. Co-authored-by: Aaron Friel <mayreply@aaronfriel.com>
Build failed: |
bors retry |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This ensures commit history is linear, enabling customer-owned forks of the pulumi CLI to more easily maintain their fork. Reverse merges into PR branches result in a more complex process for them and for us.
To test this PR, I based my PR branch off an older commit from the target branch and added a merge commit. That resulted in the check failing:
https://github.com/pulumi/pulumi/actions/runs/3416559764/jobs/5686840393
Fixes #10903
The script used by this lint contains several "tests" and useful diagnostics. Example outputs:
The
::error::
messages should appear in GitHub Actions logs at the top level (the workflow level) as well as in the detailed output of the action.