Selaa lähdekoodia

_create_project_source_dist: run subprocess as shell (#3390)

tobitege 1 vuosi sitten
vanhempi
sitoutus
4095a7d5c9

+ 2 - 2
opendevin/runtime/client/runtime.py

@@ -188,12 +188,12 @@ class EventStreamRuntime(Runtime):
 
 
     @tenacity.retry(
     @tenacity.retry(
         stop=tenacity.stop_after_attempt(10),
         stop=tenacity.stop_after_attempt(10),
-        wait=tenacity.wait_exponential(multiplier=2, min=4, max=60),
+        wait=tenacity.wait_exponential(multiplier=2, min=10, max=60),
     )
     )
     async def _wait_until_alive(self):
     async def _wait_until_alive(self):
         logger.info('Reconnecting session')
         logger.info('Reconnecting session')
         container = self.docker_client.containers.get(self.container_name)
         container = self.docker_client.containers.get(self.container_name)
-        # print logs
+        # get logs
         _logs = container.logs(tail=10).decode('utf-8').split('\n')
         _logs = container.logs(tail=10).decode('utf-8').split('\n')
         # add indent
         # add indent
         _logs = '\n'.join([f'    |{log}' for log in _logs])
         _logs = '\n'.join([f'    |{log}' for log in _logs])

+ 1 - 1
opendevin/runtime/utils/runtime_build.py

@@ -40,7 +40,7 @@ def _create_project_source_dist():
     logger.info(f'Using project root: {project_root}')
     logger.info(f'Using project root: {project_root}')
 
 
     # run "python -m build -s" on project_root to create project tarball
     # run "python -m build -s" on project_root to create project tarball
-    result = subprocess.run(['python', '-m', 'build', '-s', project_root])
+    result = subprocess.run(f'python -m build -s {project_root}', shell=True)
     if result.returncode != 0:
     if result.returncode != 0:
         logger.error(f'Build failed: {result}')
         logger.error(f'Build failed: {result}')
         raise Exception(f'Build failed: {result}')
         raise Exception(f'Build failed: {result}')