This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new 3eceb26 Fix broken docs build on Master (#14496)
3eceb26 is described below
commit 3eceb26672d310523201168d06e7bcc7f59522f7
Author: Kaxil Naik <[email protected]>
AuthorDate: Sat Feb 27 08:19:26 2021 +0000
Fix broken docs build on Master (#14496)
Currently docs build are broken, example:
https://github.com/apache/airflow/runs/1991279427
because of the following error:
```
sphinx.errors.SphinxWarning: failed to reach any of the inventories with
the following issues:
intersphinx inventory
'/opt/airflow/docs/_inventory_cache/apache-airflow-providers-tableau/objects.inv'
not fetchable due to <class 'FileNotFoundError'>: [Errno 2] No such file or
directory:
'/opt/airflow/docs/_inventory_cache/apache-airflow-providers-tableau/objects.inv'
```
This PR fixes it and takes care of the case when inventory is not present,
which happens when. a new provider is added. Once the docs are built the
objects.env file is uploaded successfully.
---
docs/exts/airflow_intersphinx.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/exts/airflow_intersphinx.py b/docs/exts/airflow_intersphinx.py
index a3bd262..2f80fbb 100644
--- a/docs/exts/airflow_intersphinx.py
+++ b/docs/exts/airflow_intersphinx.py
@@ -53,6 +53,10 @@ def _generate_provider_intersphinx_mapping():
doc_inventory =
f'{DOCS_DIR}/_build/docs/{package_name}/{current_version}/objects.inv'
cache_inventory =
f'{DOCS_DIR}/_inventory_cache/{package_name}/objects.inv'
+ # Skip adding the mapping if the path does not exist
+ if not os.path.exists(doc_inventory) and not
os.path.exists(cache_inventory):
+ continue
+
airflow_mapping[package_name] = (
# base URI
provider_base_url,