ci: raise RuntimeError instead of SystemExit to avoid kill the process

otherwise the pytest process will be killed immediately
This commit is contained in:
Fu Hanxi
2024-01-16 20:21:40 +01:00
parent 4afb86fce3
commit 23c339e231
2 changed files with 12 additions and 5 deletions

View File

@ -123,6 +123,11 @@ class BuildReportDownloader:
def download_app(
self, app_build_path: str, artifact_type: ArtifactType = ArtifactType.BUILD_DIR_WITHOUT_MAP_AND_ELF_FILES
) -> None:
if app_build_path not in self.app_presigned_urls_dict:
raise ValueError(f'No presigned url found for {app_build_path}. '
f'Usually this should not happen, please re-trigger a pipeline.'
f'If this happens again, please report this bug to the CI channel.')
url = self.app_presigned_urls_dict[app_build_path][artifact_type.value]
logging.debug('Downloading app from %s', url)