@@ -211,6 +211,7 @@ async def complete_runtime(
211
211
212
212
def init_replay (replay_dir : str | Path ) -> None :
213
213
replay_dir = Path (replay_dir )
214
+
214
215
if not replay_dir .exists ():
215
216
replay_dir .mkdir (parents = True )
216
217
@@ -221,6 +222,7 @@ def init_replay(replay_dir: str | Path) -> None:
221
222
for repo_url in repo_urls :
222
223
repo_name = repo_url .split ('/' )[- 1 ]
223
224
repo_path = replay_dir / repo_name
225
+ logger .info (f'[Replay] Preparing { repo_name } in { repo_path } ' )
224
226
if not repo_path .exists ():
225
227
logger .info (
226
228
f'[Replay] Repository { repo_name } not found in { replay_dir } , cloning...'
@@ -284,8 +286,9 @@ async def process_issue(
284
286
timeout = 300 ,
285
287
),
286
288
replay = ReplayConfig (
287
- # Don't set config.replay.dir here in the resolver workflow.
288
- dir = os .environ .get ('REPLAY_DIR' , None ),
289
+ dir = os .environ .get (
290
+ 'REPLAY_DIR' , os .path .abspath (os .path .join (output_dir , 'replay' ))
291
+ ),
289
292
api_key = os .environ .get ('REPLAY_API_KEY' , None ),
290
293
),
291
294
# do not mount workspace
@@ -303,8 +306,9 @@ async def process_issue(
303
306
await runtime .connect ()
304
307
305
308
# Force-update the Replay repos, if necessary:
306
- replay_dir = os .path .abspath (os .path .join (output_dir , 'replay' ))
307
- init_replay (replay_dir )
309
+ if config .replay .dir is None :
310
+ raise ValueError ('config.replay.dir is not set.' )
311
+ init_replay (config .replay .dir )
308
312
309
313
async def on_event (evt ):
310
314
logger .info (evt )
0 commit comments