From 3ea75553e157a2754e9c68fced80d5a291707125 Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Fri, 14 Apr 2023 12:59:38 +0200 Subject: [PATCH] feat: skip dependency issue checking for certain errors --- src/executor_factory.py | 4 ++++ src/prompt_tasks.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/executor_factory.py b/src/executor_factory.py index fde0d51..9da35fa 100644 --- a/src/executor_factory.py +++ b/src/executor_factory.py @@ -254,6 +254,10 @@ Please provide the complete file with the exact same syntax to wrap the code. pass def is_dependency_issue(self, error, docker_file: str): + # a few heuristics to quickly jump ahead + if any([error_message in error for error_message in ['AttributeError', 'NameError', 'AssertionError']]): + return False + conversation = self.gpt_session.get_conversation([]) answer = conversation.query( f'Your task is to assist in identifying the root cause of a Docker build error for a python application. ' diff --git a/src/prompt_tasks.py b/src/prompt_tasks.py index 21a9973..2629df2 100644 --- a/src/prompt_tasks.py +++ b/src/prompt_tasks.py @@ -86,7 +86,7 @@ def docker_file_task(): "The base image of the Dockerfile is FROM jinaai/jina:3.14.1-py39-standard. " 'The entrypoint is ENTRYPOINT ["jina", "executor", "--uses", "config.yml"]. ' 'Make sure the all files are in the /workdir. ' - "The Dockerfile runs the test during the build process. " + not_allowed(), + "The Dockerfile runs the test during the build process. ", DOCKER_FILE_TAG, DOCKER_FILE_NAME )