diff --git a/dev_gpt/apis/jina_cloud.py b/dev_gpt/apis/jina_cloud.py index fc204f3..b295f30 100644 --- a/dev_gpt/apis/jina_cloud.py +++ b/dev_gpt/apis/jina_cloud.py @@ -101,13 +101,13 @@ def _push_executor(dir_path): 'buildEnv': f'{{"OPENAI_API_KEY": "{os.environ["OPENAI_API_KEY"]}", "GOOGLE_API_KEY": "{os.environ.get("GOOGLE_API_KEY","")}", "GOOGLE_CSE_ID": "{os.environ.get("GOOGLE_CSE_ID","")}"}}', 'md5sum': md5_digest, } - with suppress_stdout(): - headers = get_request_header() - headers['jinameta-platform'] = 'Darwin' - headers['jinameta-platform-release'] = '21.1.0' - headers['jinameta-platform-version'] = 'Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64' - headers['jinameta-architecture'] = 'x86_64' - headers['jinameta-processor'] = 'i386' + # with suppress_stdout(): + headers = get_request_header() + headers['jinameta-platform'] = 'Darwin' + headers['jinameta-platform-release'] = '21.1.0' + headers['jinameta-platform-version'] = 'Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64' + headers['jinameta-architecture'] = 'x86_64' + headers['jinameta-processor'] = 'i386' resp = upload_file( 'https://api.hubble.jina.ai/v2/rpc/executor.push', diff --git a/dev_gpt/options/generate/generator.py b/dev_gpt/options/generate/generator.py index 22fcc81..9348236 100644 --- a/dev_gpt/options/generate/generator.py +++ b/dev_gpt/options/generate/generator.py @@ -20,6 +20,7 @@ from dev_gpt.constants import FILE_AND_TAG_PAIRS, NUM_IMPLEMENTATION_STRATEGIES, REQUIREMENTS_FILE_NAME, REQUIREMENTS_FILE_TAG, DOCKER_FILE_NAME, IMPLEMENTATION_FILE_NAME, \ IMPLEMENTATION_FILE_TAG, LANGUAGE_PACKAGES, UNNECESSARY_PACKAGES, DOCKER_BASE_IMAGE_VERSION, SEARCH_PACKAGES, \ INDICATOR_TO_IMPORT_STATEMENT +from dev_gpt.options.generate.conversation_logger import Timer from dev_gpt.options.generate.pm.pm import PM from dev_gpt.options.generate.templates_user import template_generate_microservice_name, \ template_generate_possible_packages, \ @@ -355,10 +356,14 @@ pytest for i in range(1, MAX_DEBUGGING_ITERATIONS): print('Debugging iteration', i) print('Trying to debug the microservice. Might take a while...') + print(f'{Timer().get_time_since_start()} - Clean requirements.txt...') clean_requirements_txt(self.cur_microservice_path) + print(f'{Timer().get_time_since_start()} - Build executor...') log_hubble = push_executor(self.cur_microservice_path) + print(f'{Timer().get_time_since_start()} - Analyze logs...') error = process_error_message(log_hubble) if error: + print('Handling error...') if not self_healing: print(error) raise Exception('Self-healing is disabled. Please fix the error manually.')