google / goblet Goto Github PK
View Code? Open in Web Editor NEWGit caching proxy
License: Apache License 2.0
Git caching proxy
License: Apache License 2.0
When using goblet to serve a repository for a large concurrent CI setup, it might be desirable to make use of https://git-scm.com/docs/git-config#Documentation/git-config.txt-uploadpackpackObjectsHook to wrap around git-pack-objects and cache the output per unique request.
Multiple requests (from CI workers) asking for a same combination of objects would only trigger a single git-pack-objects which will simultaneously write to both process stdout and to an on-disk cache dir. Subsequent requests can be served from the cache dir instead of having to re-trigger git-pack-objects, which will save a lot of CPU time.
Prior art could be found in Gitlab's Gitaly https://gitlab.com/gitlab-org/gitaly/-/blob/master/doc/design_pack_objects_cache.md
Hello,
I wanted to say hi and discuss a project that my team has been working on at Renault in a similar timeframe
https://gitlab.com/grouperenault/git_cdn
our design looks very similar, and it makes sense to share experience.
git_cdn is written in python asyncio, and we did not experience much performance bottleneck with the python.
Most of our load comes from the git upload-pack process.
In order to mitigate this load from upload-pack, we had to implement caching of the bigger upload-packs.
This is because our CI users are doing a lot of clone from scratch for reasons that are hard to negociate..
our design also implements cache of LFS files, which can be handy.
We do not support protocol v2 yet, and to my understanding goblet only supports v2.
We would be glad to have a discussions with you either in this issue or in a live hangout session.
Use https://github.com/go-git/go-git
Project is using gopkg.in/src-d/go-git.v4 v4.13.1
which is fairly old.
Src-d is shutdown and the project has moved.
From V4 to V5, there were several memory issues fixed. Upgrading is a good idea
Current code should pass staticcheck linting
git_protocol_v2_handler.go:133:55: should use time.Since instead of time.Now().Sub (S1012)
managed_repository.go:118:41: should use time.Since instead of time.Now().Sub (S1012)
reporting.go:96:40: should use time.Since instead of time.Now().Sub (S1012)
reporting.go:148:9: infinite recursive call (SA5007)
bazel test //...
should succeed
fetch_test.go:57: cannot execute a git command
Error: exit status 128
Args: []string{"/usr/local/bin/git", "-c", "http.extraHeader=Authorization: Bearer valid-server-auth-token", "push", "-f", "http://[::]:42989/", "master:master"}
Output: fatal: unable to access 'http://[::]:42989/': URL using bad/illegal format or missing URL
bazel test //...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.