lakeFS icon indicating copy to clipboard operation
lakeFS copied to clipboard

[Bug]: Cherrypick and Import don't check branch protection

Open idanovo opened this issue 2 years ago • 4 comments

What happened?

Cherrypick and Import don't check branch protection

Expected behavior

No response

lakeFS version

No response

How lakeFS is installed

No response

Affected clients

No response

Relevant log output

No response

Contact details

No response

idanovo avatar Dec 25 '23 14:12 idanovo

Seems like the issue I was talking about (https://github.com/treeverse/lakeFS/issues/7029) is not related. We might need @treeverse/product's input on this. For cherry-pick the case seems more clear (do as git does). Import on the other hand - creates a merge commit, and since there is no corresponding git operation, this might need to be a product decision

N-o-Z avatar Dec 26 '23 09:12 N-o-Z

I want to clarify the difference between cherry-pick in lakeFS and git. As far as I understand, cherry-pick in git only stages the changes from a commit to a branch, while in lakeFS, it creates a new commit on our branch. This explains why cherry-pick to a protected branch is permitted in git, even though the push command will fail. However, it doesn't make sense in our case.

idanovo avatar Dec 26 '23 09:12 idanovo

@idanovo, I don't believe this is true: cherry pick in Git does create a commit by default.

johnnyaug avatar Dec 26 '23 12:12 johnnyaug

@idanovo, I don't believe this is true: cherry-pick in Git does create a commit by default.

@johnnyaug Sorry, you're right, it creates a new commit by default, but it doesn't push it, while in our case, there's no such thing (AFAIK), Commit == Commit & Push.

idanovo avatar Dec 26 '23 13:12 idanovo