fix: clone all for nightly strategy

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
Aaron
2023-08-03 03:17:18 -04:00
parent b949106daf
commit 8f74e24c2f

View File

@@ -92,8 +92,8 @@ class RefResolver:
# Will do a clone bare to tempdir, and return the latest commit hash that we build the base image
# NOTE: this is a bit expensive, but it is ok since we only run this during build
with tempfile.TemporaryDirectory(prefix="openllm-bare-") as tempdir:
cls._git.clone(_URI, tempdir, bare=True, depth=1)
return next(it.hexsha for it in git.Repo(tempdir).iter_commits("main", max_count=10) if "[skip ci]" not in str(it.summary))
cls._git.clone(_URI, tempdir, bare=True)
return next(it.hexsha for it in git.Repo(tempdir).iter_commits("main", max_count=20) if "[skip ci]" not in str(it.summary))
@classmethod
def _nightly_ref(cls) -> RefTuple: return _RefTuple((cls.nightly_resolver(), "refs/heads/main", "nightly"))
@classmethod