From c401345629694d2468098f262b218a93525963ee Mon Sep 17 00:00:00 2001 From: Mahendra Paipuri Date: Wed, 27 Oct 2021 15:48:59 +0200 Subject: [PATCH 1/2] Typecast git_timeout var Casting the git_timeout var into float to avoid errors when env var RFM_GIT_TIMEOUT is set which is str type --- reframe/core/pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reframe/core/pipeline.py b/reframe/core/pipeline.py index b9347c041e..d5a8dda893 100644 --- a/reframe/core/pipeline.py +++ b/reframe/core/pipeline.py @@ -1296,7 +1296,7 @@ def _clone_to_stagedir(self, url): self.logger.debug(f'Cloning URL {url} into stage directory') osext.git_clone( self.sourcesdir, self._stagedir, - timeout=rt.runtime().get_option('general/0/git_timeout') + timeout=float(rt.runtime().get_option('general/0/git_timeout')) ) @final From f25484d97ee727466785c84144747dbe6ffb4b5f Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Thu, 28 Oct 2021 13:35:05 +0200 Subject: [PATCH 2/2] Add a short note why we need the type cast --- reframe/core/pipeline.py | 1 + 1 file changed, 1 insertion(+) diff --git a/reframe/core/pipeline.py b/reframe/core/pipeline.py index d5a8dda893..e0f369e7e7 100644 --- a/reframe/core/pipeline.py +++ b/reframe/core/pipeline.py @@ -1296,6 +1296,7 @@ def _clone_to_stagedir(self, url): self.logger.debug(f'Cloning URL {url} into stage directory') osext.git_clone( self.sourcesdir, self._stagedir, + # FIXME: cast to float explicitly due to GH #2246 timeout=float(rt.runtime().get_option('general/0/git_timeout')) )