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

Git LFS 2.0.0 File Locking Mechanism (Work In Progress) #36

Closed
SRombauts opened this issue Mar 8, 2017 · 29 comments
Closed

Git LFS 2.0.0 File Locking Mechanism (Work In Progress) #36

SRombauts opened this issue Mar 8, 2017 · 29 comments
Assignees

Comments

@SRombauts
Copy link
Owner

SRombauts commented Mar 8, 2017

I've started work on the Git Plugin to add explicite Git LFS support with the new "lock" mechanism.

I am developing this in a branch on my fork of the UnrealEngine repository (git-plugin-add-git-lfs-lock-support branch)
Now available in this repository add-git-lfs2-file-lock-support (release "2.3-lfs2-lock-preview")

@SRombauts
Copy link
Owner Author

I currently have a "Proof Of Concept" branch more or less working with LFS locks 👍

@fire
Copy link

fire commented Mar 20, 2017

What do I need to test this?

@fire
Copy link

fire commented Mar 20, 2017

Can you separate the changes into a plugin? It would be so helpful.

@SRombauts
Copy link
Owner Author

Hi @fire, thanks for you interest!

I believe it's still a bit too early to test: everything is on a branch on my fork, as stated above (https://github.com/SRombauts/UnrealEngine) so you need to rebuild the full Editor from source.

I've started the process of backporting all into this repository so that it will be easier for other to test, but it will take a few more hours/nights to get it in.

@fire
Copy link

fire commented Mar 20, 2017

I was able to extract it as a plugin. What servers support the git-lfs locking?

@SRombauts
Copy link
Owner Author

SRombauts commented Mar 20, 2017

I am testing it with Github. They are behind Git LFS and are probably the only one with a server implementation ready at this time.

Edit: I hope to finish the work on the plugin configuration in a few days, there are currently some big holes (remote, credentials...) and a few hard-coded spots (in the "State" class for instance)

@SRombauts
Copy link
Owner Author

Hi @fire, I discovered that the two last commits, about discovering Git LFS capabilities, and about Settings to enable/disable the Locking workflow was both broken: this was effectively disabling the "lock"/"unlock" commands entirely!

Also, I have a lot of TODOs and small in-progress improvement locally that are not ready to go public:

  1. don't try to lock a new ("Added") asset
  2. don't try to unlock a file that is not locked

At this stage, the whole thing assumes you have set up the repository correctly and have it working in command line, so that the plugin can just reuse the credentials.

Also everything is awfully slow (LFS is slow, and the Editor double some status commands) and awfully buggy

@fire
Copy link

fire commented Apr 5, 2017

Ah, how did it go? Did you get stuck on something?

@SRombauts
Copy link
Owner Author

Hi @fire,
I got it to a point where I could make a checkin and push, but it needs far more works to be production ready. For now:

  1. you need to complete the setup of the repository by command line (remote url and Github user credentials)
  2. for now, I assume the whole Content/ directory is tracked, but this does not enable editing of Config/ and uproject files since the Lock command fails for them

In the meantime, I discovered more bugs/limitations of the current Git plugin, so I am working on a few merge requests to fix those ASAP.

I have also updated this plugin repository, and am going to switch it to the main dev as the "Git LFS" plugin so you could have both in Engine.

I will keep you inform, for now my main problem is trying to focus on one task at the time...

@fire
Copy link

fire commented May 4, 2017

Can't wait!

@SRombauts
Copy link
Owner Author

I've spent some time polishing the UE4.16 release.

I've spent a greater amount of time updating this repo and shaping it into a standalone "Git (dev)" replacement plugin that you can put in your project's Plugins folder to replace the default in Engine "Git (beta version)" plugin (so you can not have both at the same time)

@fire I am currently busy on another project, but please keep asking to push me :) !

@BenjaminDSmithy
Copy link

BenjaminDSmithy commented Jun 23, 2017

@SRombauts any new advancements? Also GitLab by far has the best implementation of Git LFS v2.x File Locking capabilities as they actually offer a front-end website GUI solution as seen here: https://docs.gitlab.com/ee/user/project/file_lock.html

GitHub comes in probably at 2nd place in that regards and Bitbucket Cloud + Server offerings aren't even supported yet and they have open community tickets pending for requesting those features as seen here: https://jira.atlassian.com/browse/BSERV-9623

@jfaz13
Copy link

jfaz13 commented Jul 11, 2017

@SRombauts I don't know why this isn't being talked about more. Locking files is one of the main reasons UE4 devs tend to use Perforce

@SRombauts
Copy link
Owner Author

Well, in my experience, Git LFS 2.0.0 was a bit shaky, and verrrry slow compared to Perforce and Plastic SCM, so that got me a bit demotivated. I am also very busy on other projects, sorry about that :(

@faemir
Copy link

faemir commented Jul 29, 2017

Just chiming in to say that I'm eagerly awaiting this feature, and happy to help test it!

@Totoro83
Copy link

I can't wait too! (Hoping this will help pushing the work ❤️ )

@SRombauts
Copy link
Owner Author

Hi @fire @BenjaminDSmithy @aztekyi @faemir @Totoro83, thanks for you support on this!

I really mean it, that is, I really need some motivation to get back on this! It's a bit of a daunting task since I let it in a not so good shape, and during this work I've discovered some bugs on other parts of the plugin. And now the code is diverging more and more on each release...

So hey, I should be back on the plugin, I have no other personal project going on currently, so I'll try to start by refreshing the code, and probably at least doing another general bugfix before Git LFS 2.

@YotaVGA
Copy link

YotaVGA commented Sep 1, 2017

Really thanks for the work you're doing!

@SRombauts
Copy link
Owner Author

SRombauts commented Sep 21, 2017

Hi all!

I have published yesterday a "Early-Access" preview-version of the Git LFS 2 plugin with some first level of support for File Lock.

Please note that:

  1. Fixed in Git LFS 2.3.0 released 7 days ago! I have found Git LFS 2 to be not totally reliable (under Windows at least). An early tester found that sometimes "read-only" flags are not in sync with "file lock" which can totally mess with the Editor assumptions on those!
    1. This was reported testing OUSTIDE UE, so WITHOUT the plugin!
    2. The plugin would probably have to handle this, but this could be non-trivial (think medium-term goal).
  2. This pre-release have a known issue about File Locked by others not correctly handled!. This needs to be addressed ASAP, but I felt that I could still published the code as-is for early tests.

You have been warned enough ;) add-git-lfs2-file-lock-support (release "2.3-lfs2-lock-preview")

Cheers!

@SRombauts
Copy link
Owner Author

SRombauts commented Sep 21, 2017

I found an issue about this on the Git LFS project issue tracker: "git lfs unlock" does not reset the readonly file system attribute. #2494
It is solved in Git LFS v2.3.0 released 7 days ago!

So you cannot rely on the previous Git LFS v2.2.1 release, the one integrated in latest "git for windows" (2.14.1) (like I did)

@SRombauts
Copy link
Owner Author

Okay, so initial support of Git LFS 2 File Locks is release in v2.3 of the plugin :)

Let me know if it breaks/works for you.

Documentation should be improved on how to use this...

@SRombauts
Copy link
Owner Author

SRombauts commented Sep 26, 2017

So if you want my opinion on the remaining works:

  1. LFS locks on Windows command line needs to improve performance wise
  2. I shall discover and eradicate a few minor bugs (like errors on logs and some quirks on some specific commands
  3. I have to try to improve the robustness of the whole thing (like how to handle disconnection, failure modes...)
  4. I have to document the whole thing!

@jfaz13
Copy link

jfaz13 commented Sep 27, 2017 via email

@ArtyMcLabin
Copy link

hey, any news about that project?

@SRombauts
Copy link
Owner Author

Well yes, Git LFS 2 was released in v2.3 about 4 months ago, I've released bug fixes and a few new features in two releases, with v2.5 yesterday.

I am deeply missing feedbacks since I don't use LFS 2 myself in my daily workflow!

@ArtyMcLabin
Copy link

ArtyMcLabin commented Jan 28, 2018

as i understand it will still not work like perforce mechanism, and wont prevent people from editing locked files, and instead just disabling their pushes, am i right?
if i might ask, what do you use instead?

@SRombauts
Copy link
Owner Author

  1. The Git Plugin enforce the Lock, so the user is not allowed to checkout already locked by someone else, exactly like in Perforce. It is still possible to make it writable, like in Perforce, but then you are not able to Checkin, like in Perforce.
  2. I am using plain git most of the time, that is without LFS or LFS 2 as I am working mostly alone.

@SRombauts
Copy link
Owner Author

To install this, please just download the latest release and put it in your project Plugins/ folder (not in Engine, to override the Git plugin present in Engine)

@ArtyMcLabin
Copy link

Yes thank you, i have erased my previous comment after realising that :]
It works. thank you very much for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants