Skip to content

Commit c169888

Browse files
committed
test removing context from build retry
Signed-off-by: vsoch <[email protected]>
1 parent 1cb2b21 commit c169888

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

fractale/agent/build/prompts.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@
2626
"""
2727

2828
rebuild_prompt = (
29-
f"""Act as a Dockerfile builder service expert. I am trying to build a Docker image named for the application '%s' in an environment for '%s'. The previous attempt to build or run the Dockerfile failed. Here is the problematic Dockerfile:
30-
31-
```dockerfile
32-
%s
33-
```
29+
f"""Your previous attempt to build or run the Dockerfile failed.
3430
3531
Here is the error message I received:
3632
```
@@ -48,15 +44,11 @@
4844
def get_rebuild_prompt(context):
4945
environment = context.get("environment", defaults.environment)
5046
application = context.get("application", required=True)
51-
return prompt_wrapper(
52-
rebuild_prompt % (application, environment, context.dockerfile, context.error_message),
53-
context=context,
54-
)
47+
return prompt_wrapper(rebuild_prompt % context.error_message, context=context)
5548

5649

5750
build_prompt = (
58-
f"""Act as a Dockerfile builder service expert.
59-
I need to create a Dockerfile for an application '%s'.
51+
f"""Act as a Dockerfile builder service expert. I need to create a Dockerfile for an application '%s'.
6052
The target environment is '%s'.
6153
6254
Please generate a robust, production-ready Dockerfile.

fractale/agent/kubernetes_job/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def deploy(self, job_crd, image_name, cleanup=True):
336336
if found_image != image_name:
337337
return (
338338
1,
339-
"Generated YAML has incorrect image name {found_image} - it should be {image_name}.",
339+
f"Generated YAML has incorrect image name {found_image} - it should be {image_name}.",
340340
)
341341

342342
deploy_dir = tempfile.mkdtemp()

0 commit comments

Comments
 (0)