From 64d5970382e35624abf9c26214e24d47074aead6 Mon Sep 17 00:00:00 2001 From: Xavier-Do Date: Mon, 29 Dec 2025 12:02:44 +0100 Subject: [PATCH] [FIX] runbot: fetch threehash Before this commit, to export some threehash, the commit is used to check if the commit is present or not. This can be a problem when rebuilding an old build that was linked to a previous one by a threehash after a forcepush, because the old commit may not be known by github anymore. Not sure why it was the case since it looks like fetch works fine with a threehash, so fixing it by fetching the threehash should be enough. --- runbot/models/commit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot/models/commit.py b/runbot/models/commit.py index 02973cfd3..255bb44f3 100644 --- a/runbot/models/commit.py +++ b/runbot/models/commit.py @@ -103,7 +103,7 @@ def _export(self, build): """Export a git repo into a sources""" # TODO add automated tests self.ensure_one() - self.repo_id._fetch(self.name) + self.repo_id._fetch(self.tree_hash) if not self.env['runbot.commit.export'].search([('build_id', '=', build.id), ('commit_id', '=', self.id)]): self.env['runbot.commit.export'].create({'commit_id': self.id, 'build_id': build.id}) export_path = self._source_path()