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

[Bug]: lakectl local commit commits staged changes outside of its directory #7687

Closed
arielshaqed opened this issue Apr 18, 2024 · 3 comments · Fixed by #7796
Closed

[Bug]: lakectl local commit commits staged changes outside of its directory #7687

arielshaqed opened this issue Apr 18, 2024 · 3 comments · Fixed by #7796
Assignees
Labels
bug Something isn't working contributor

Comments

@arielshaqed
Copy link
Contributor

What happened?

What actually happened, including error codes if applies.

Steps to Reproduce:

  1. Ensure lakefs://repo/main is dirty but has no "directory" path xyzzy.

  2. lakectl local init lakefs://repo/main/xyzzy

  3. touch x

  4. lakectl local commit --message 'add xyzzy for lulz'

  5. lakectl diff lakefs://repo/main{~,}:

    Left ref: lakefs://ariels-repo/main~
    Right ref: lakefs://ariels-repo/main
    + added .hidden-foo
    + added foofoo
    + added xyzzy/x
    

These 2 files were added by lakectl local because I added them elsewhere.

Expected behavior

lakectl commit should fail with an error about the branch being dirty, or lakectl should be more like Git LFS and not hide changes from me.

lakeFS version

No response

How lakeFS is installed

No response

Affected clients

No response

Relevant log output

No response

Contact details

No response

@arielshaqed arielshaqed added bug Something isn't working contributor labels Apr 18, 2024
@N-o-Z
Copy link
Member

N-o-Z commented May 13, 2024

Requires @treeverse/product specification

@talSofer talSofer assigned talSofer and unassigned talSofer May 15, 2024
@talSofer
Copy link
Contributor

talSofer commented May 15, 2024

Expected behavior

  • Fail the commit
  • Print an error message:
error: The branch you are trying to commit to contains uncommitted changes outside the lakeFS path your local directory '<DIR_NAME>' is synced with.
To proceed, use the --force option.
  • add a --force -f flag lakectl local commit

FYI @N-o-Z

@eladlachmi eladlachmi self-assigned this May 21, 2024
@N-o-Z
Copy link
Member

N-o-Z commented May 22, 2024

@eladlachmi @arielshaqed @talSofer making sure we understand the implications of this since it is a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contributor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants