Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add squash-merging flag to transactions, default to
False
(#313)
lakeFS v1.48.0 added squash-merging, which, as the name suggests, merges a source branch into a target branch by squashing the additional history into a single commit (which is also actually the merge commit in lakeFS). The interesting thing is that it enables squashing _by default_, which changes the user-facing behavior of our (merge-based) transactions, and also all other merges done via `tx.merge()`. This broke some of our transaction tests, which try to assert correct behavior by counting commits since branch creation, and verify by commit message. This commit fixes the tests by introducing a new `squash` flag to the transaction class, which controls squash-merging of the transaction branch and any other branches/refs merged via `tx.merge()`. Interestingly, no special logic is needed to backport the extra keyword argument to `Reference.merge_into()` - I suspect that this is some pydantic compatibility detail.
- Loading branch information