-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Bazel: improved lazy lfs files #16393
Conversation
This reintroduces lazy lfs file rules that were removed in #16117, now improved. The new rules will make the actual file download go through bazel's download manager, which includes: * caching into the repository cache * sane limiting of concurrent downloads * retries The bulk of the work is done by `git_lfs_probe.py`, which will use the LFS protocol (with authentication via SSH) to output short lived download URLs that can be consumed by `repository_ctx.download`.
This is shown to work on this internal PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One major question, I'll have a more detailed look at the rest of this later, but I don't think there's gonna be other big questions coming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments - what I don't understand yet is if we now still replace the LFS pointers on the source file system with the instantiated files.
As far as I understood, the previous iteration of the LFS rules did exactly that, therefore easily allowing developers to inspect/replace the lazy LFS files that were part of the build process. Is that still the case now?
Yes, and better than before. Previously, the non-LFS pointer files would still go through a smudge filter, which meant the files would be copied. Now:
|
Ah, but that's the other way, no? I meant:
I thought in the previous iteration of these rules, pointers were replaced by actual files, whereas now, that doesn't seem to be the case (anymore?). |
Ah, sorry, I didn't understand initially. That mode of operation (replacing pointer files) was one temporary iteration of how I had implemented it at some point, but it didn't stick 🙂. The final version currently present on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the in-depth discussion!
This reintroduces lazy lfs file rules that were removed in #16117, now improved.
The new rules will make the actual file download go through bazel's download manager, which includes:
The bulk of the work is done by
git_lfs_probe.py
, which will use the LFS protocolq to output short lived download URLs that can be consumed byrepository_ctx.download
.