From e42541f152a5b9ff1c5ce01a4cb32a39491a7978 Mon Sep 17 00:00:00 2001 From: Andrey Anshin Date: Mon, 13 Mar 2023 15:15:35 +0400 Subject: [PATCH] Terminate doc build only on third-party sphinx inventories fetching errors --- docs/exts/docs_build/fetch_inventories.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/exts/docs_build/fetch_inventories.py b/docs/exts/docs_build/fetch_inventories.py index 1cd3e94c1ce2f..c2f9025646919 100644 --- a/docs/exts/docs_build/fetch_inventories.py +++ b/docs/exts/docs_build/fetch_inventories.py @@ -151,10 +151,17 @@ def fetch_inventories(): failed, success = list(failed), list(success) print(f"Result: {len(success)} success, {len(failed)} failed") if failed: + terminate = False print("Failed packages:") for pkg_no, (pkg_name, _) in enumerate(failed, start=1): print(f"{pkg_no}. {pkg_name}") - print("Terminate execution.") - raise SystemExit(1) + if not terminate and not pkg_name.startswith("apache-airflow"): + # For solve situation that newly created Community Provider doesn't upload inventory yet. + # And we terminate execution only if any error happen during fetching + # third party intersphinx inventories. + terminate = True + if terminate: + print("Terminate execution.") + raise SystemExit(1) return [pkg_name for pkg_name, status in failed]