_create_project_source_dist: run subprocess as shell (#3390)

This commit is contained in:
tobitege
2024-08-14 18:55:21 +02:00
committed by GitHub
parent 09e67d90a4
commit 4095a7d5c9
2 changed files with 3 additions and 3 deletions

View File

@@ -188,12 +188,12 @@ class EventStreamRuntime(Runtime):
@tenacity.retry(
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):
logger.info('Reconnecting session')
container = self.docker_client.containers.get(self.container_name)
# print logs
# get logs
_logs = container.logs(tail=10).decode('utf-8').split('\n')
# add indent
_logs = '\n'.join([f' |{log}' for log in _logs])

View File

@@ -40,7 +40,7 @@ def _create_project_source_dist():
logger.info(f'Using project root: {project_root}')
# 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:
logger.error(f'Build failed: {result}')
raise Exception(f'Build failed: {result}')