Skip to content
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

Generate revertibles for commits incoming from a merge #22644

Merged
merged 9 commits into from
Sep 26, 2024

Conversation

noencke
Copy link
Contributor

@noencke noencke commented Sep 26, 2024

Description

This corrects some behavior in the (currently alpha) branching APIs. Currently, merging one or more commits into a target branch from a source branch does not generate revertibles on the target branch. This PR updates it so that each merge commit fires a "commitApplied" event and generates the proper revertible.

@noencke noencke requested a review from a team as a code owner September 26, 2024 04:24
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: tree base: main PRs targeted against main branch labels Sep 26, 2024
@msfluid-bot
Copy link
Collaborator

msfluid-bot commented Sep 26, 2024

@fluid-example/bundle-size-tests: +345 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 461.42 KB 461.45 KB +35 Bytes
azureClient.js 559.03 KB 559.08 KB +49 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 261.68 KB 261.69 KB +14 Bytes
fluidFramework.js 404.79 KB 404.85 KB +64 Bytes
loader.js 134.17 KB 134.19 KB +14 Bytes
map.js 42.43 KB 42.44 KB +7 Bytes
matrix.js 146.8 KB 146.8 KB +7 Bytes
odspClient.js 526.18 KB 526.23 KB +49 Bytes
odspDriver.js 97.8 KB 97.82 KB +21 Bytes
odspPrefetchSnapshot.js 42.76 KB 42.78 KB +14 Bytes
sharedString.js 163.79 KB 163.8 KB +7 Bytes
sharedTree.js 395.25 KB 395.31 KB +57 Bytes
Total Size 3.31 MB 3.31 MB +345 Bytes

Baseline commit: 5575b1e

Generated by 🚫 dangerJS against 576d41f

@noencke noencke requested a review from a team as a code owner September 26, 2024 15:02

Branch merges generate revertibles

Merging any number of commits into a target branch (via the 'merge' method) now generates a revertible for each commit on the target branch.
Copy link
Contributor

@Josmithr Josmithr Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this include a revertible for the merge commit itself, or just the commits that made up the merged branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. There is no such thing as a merge commit, at least not as a primitive. Merge simply applies all the divergent changes of one branch to another branch (after rebasing them). The git-style "squash merge commit" is accomplished by the user running the merge inside of a transaction (because the transaction will squash all the commits that came in from the other branch). I expect that's going to be a pretty common pattern. Unfortunately we don't support it yet (you'll crash if you try) because there is some rebaser work that needs to be done first (I think it's in progress though!).

Copy link
Contributor

@Josmithr Josmithr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Primarily reviewed the docs. Someone with a better understanding of the underlying logic should review too :)

@noencke noencke merged commit c168c6f into microsoft:main Sep 26, 2024
32 checks passed
@noencke noencke deleted the undo-merge branch September 26, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds: tree area: dds Issues related to distributed data structures base: main PRs targeted against main branch changeset-present
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants