diff --git a/cdci_data_analysis/analysis/renku_helper.py b/cdci_data_analysis/analysis/renku_helper.py index 7d4cc9380..24191f6de 100644 --- a/cdci_data_analysis/analysis/renku_helper.py +++ b/cdci_data_analysis/analysis/renku_helper.py @@ -7,7 +7,7 @@ import giturlparse import copy -from git import Repo, Actor +from git import Repo, Actor, RemoteProgress from configparser import ConfigParser from ..app_logging import app_logging @@ -16,6 +16,13 @@ from .hash import make_hash logger = app_logging.getLogger('renku_helper') +progress_logger = app_logging.getLogger('progress_git_commands_renku_helper') + + +class MyProgressPrinter(RemoteProgress): + def update(self, op_code, cur_count, max_count=None, message=""): + message = message or "NO MESSAGE" + progress_logger.info(f"op_code: {op_code}, cur_count: {cur_count}, max_count: {max_count}, message: {message}") def push_api_code(api_code, @@ -161,7 +168,7 @@ def clone_renku_repo(renku_repository_url, repo_dir=None, renku_gitlab_ssh_key_p # TODO or store known hosts on build/boot git_ssh_cmd = f'ssh -i {renku_gitlab_ssh_key_path} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' - repo = Repo.clone_from(renku_repository_url, repo_dir, branch='master', env=dict(GIT_SSH_COMMAND=git_ssh_cmd)) + repo = Repo.clone_from(renku_repository_url, repo_dir, branch='master', env=dict(GIT_SSH_COMMAND=git_ssh_cmd), progress=MyProgressPrinter()) logger.info(f'repository {renku_repository_url} successfully cloned') diff --git a/cdci_data_analysis/pytest_fixtures.py b/cdci_data_analysis/pytest_fixtures.py index 6371da90a..19705a3a7 100644 --- a/cdci_data_analysis/pytest_fixtures.py +++ b/cdci_data_analysis/pytest_fixtures.py @@ -484,7 +484,7 @@ def dispatcher_test_conf_with_renku_options_fn(dispatcher_test_conf_fn): f.write(f_default.read()) f.write('\n renku_options:' - '\n renku_gitlab_repository_url: "git@renkulab.io:gabriele.barni/old-test-dispatcher-endpoint.git"' + '\n renku_gitlab_repository_url: "git@gitlab.renkulab.io:gabriele.barni/old-test-dispatcher-endpoint.git"' '\n renku_base_project_url: "http://renkulab.io/projects"' f'\n ssh_key_path: "{os.getenv("SSH_KEY_FILE", "ssh_key_file")}"')