From 8f74e24c2f05a39d21befe38788f9ec6e2e649fa Mon Sep 17 00:00:00 2001 From: Aaron <29749331+aarnphm@users.noreply.github.com> Date: Thu, 3 Aug 2023 03:17:18 -0400 Subject: [PATCH] fix: clone all for nightly strategy Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> --- src/openllm/bundle/oci/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openllm/bundle/oci/__init__.py b/src/openllm/bundle/oci/__init__.py index 789218a1..61f78ea4 100644 --- a/src/openllm/bundle/oci/__init__.py +++ b/src/openllm/bundle/oci/__init__.py @@ -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