feat: git change detection works on any commit#1235
Draft
snakster wants to merge 1 commit into
Draft
Conversation
✅ Deploy Preview for terramate-io-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
ab25e41 to
318124b
Compare
|
123e97a to
767bcf8
Compare
i4ki
reviewed
Nov 20, 2023
767bcf8 to
14158a3
Compare
mariux
requested changes
Dec 18, 2023
Contributor
mariux
left a comment
There was a problem hiding this comment.
finally tested the PR, please check the notion document for comments on a case this PR now creates wrong results when calculating changes.
14158a3 to
d6d7d1d
Compare
✅ Deploy Preview for docs-terramate-io canceled.
|
9b7088b to
c6895ee
Compare
ddfe460 to
99a1ed3
Compare
Contributor
99a1ed3 to
39f0dd0
Compare
f9f3a79 to
9815ff7
Compare
9815ff7 to
d3f17fc
Compare
d3f17fc to
04e123d
Compare
04e123d to
3c0d658
Compare
This file contains hidden or 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
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.

Reason for This Change
Currently, the Git revision that's used for change comparison with
terramate (run | list) --changedis selected based on these rules (simplified):This means for the two cases of either getting a preview of a deployment, or executing the deployment, it will select the changed stacks relative to the previous deployment (w.r.t. to the commit graph).
For anything before origin/main, it will not select the changed stacks relative to the previous deployment, but the changed stacks compared to the latest deployment.
This is inconsistent, and more importantly, can lead to unintended behaviour in case of queued CI jobs that are behind origin/main when multiple PRs are merged in parallel.
Description of Changes
The selection logic for the compared base revision is changed so that "select the changed stacks relative to the previous deployment"-behaviour works on any commit.
Simplified, this means any commit is now compared its fork point from origin/main.