storage for btfhub artifacts
itaysk opened this issue · 5 comments
we use git to store both the btf generation script, and also the resulting btf artifacts. this was very easy for the poc stage of btfhub, but now is a good opportunity to reevaluate the storage requirements. If we want to stay in github world, we have:
basic requirements are:
- being able to HTTP GET every file individually
- Reputable as stable and robust
- easy to manage artifact (add/update/remove BTFs)
- download stats
(note it doesn't have to be a free service. paid services are also fine)
- git (current solution)
- I'm not sure we really need a VCS to manage the BTF artifacts. we are not interested in their evolutions over time, or in their history. managing blobs in git is not ideal.
- combining the generation script (code) with the btf files (artifact) is unnecessary and pollutes the git history and makes it harder to collaborate on the script (which is the only thing that requires collaboration).
- no stats
- managing all artifacts in the same repo also results in huge repo which is hard to clone
- easy to get all btfs in one action (git clone) but this is a rare use case.
- git with lfs
- still the same cons as git option except issue 1.4 (hard to clone)
- requires a client-side tooling
- GitHub Releases (we can create a release and add individual btfs as "Assets")
- suitable for external distribution of artifacts
- code and artifacts remain in same repo
- maybe harder to manipulate existing assets
- not sure how it will throttle/limit in the future. seems like there are no hard limits
- AWS S3
- not closely coupled with the github repo
- most flexible for future requirements
I'm in favor of option 4 - AWS S3.
I would be in favor of GitHub Releases. Assuming we do get download stats, it marks all the basic requirements, plus it'd be easier to manage than S3.
easy to get all btfs in one action (git clone) but this is a rare use case.
I think this use case is important for BTFGen. I also think that in any case we could have a "sync" script that downloads all available BTFs.
@mauriciovasquezbernal agree. This was written with use case of apps using BTF Hub directly and downloading the BTF for the runtime environment. But with BTF Gen it's probably not very appealing anymore
We have decided on the following:
btfhub
repo will be the "landing" repo and contain the tooling and docs, but not the archive.btfhub-archive
is a new repo that will contain just the released artifacts.- it seems that some users prefer to
git clone
the archive which this will allow. - will not use LFS due to dependency on extra client.
- it seems that some users prefer to
- A GitHub workflow on btfhub will build BTFs and push them to btfhub-archive.
- The script will groom the git history to reduce cloning overhead.
- In the future, we might want to also use GH Releases on btfhub repo. out of scope for now.
This has been sorted out already.